Anton Korobeynikov
f0c267e6e0
Provide half floating point support as a storage only type.
...
Lack of half FP was a regression compared to llvm-gcc.
llvm-svn: 142016
2011-10-14 23:23:15 +00:00
Eli Friedman
4b72fddd99
Misc fixes for atomics. Biggest fix is doing alignment correctly for _Atomic types.
...
llvm-svn: 142002
2011-10-14 20:59:01 +00:00
Benjamin Kramer
47b5b31e61
Simplify code to avoid a useless string copy.
...
llvm-svn: 141970
2011-10-14 18:45:16 +00:00
Benjamin Kramer
fd0b05f341
Upgrade to PathV2.
...
llvm-svn: 141969
2011-10-14 18:45:11 +00:00
Benjamin Kramer
13481e27cb
Add parens to pacify GCC.
...
llvm-svn: 141968
2011-10-14 18:45:06 +00:00
Eli Friedman
fde961dbf3
PR11124: Don't overwrite memory outside of a base class when performing zero-initialization before running its constructor.
...
llvm-svn: 141933
2011-10-14 02:27:24 +00:00
Eric Christopher
7cdf948601
Recommit:
...
Start handling debug line and scope information better:
Migrate most of the location setting within the larger API in CGDebugInfo and
update a lot of callers.
Remove the existing file/scope change machinery in UpdateLineDirectiveRegion
and replace it with DILexicalBlockFile usage.
Finishes off the rest of rdar://10246360
after fixing a few bugs that were exposed in gdb testsuite testing.
llvm-svn: 141893
2011-10-13 21:45:18 +00:00
Peter Collingbourne
adcf7c9203
TCE target: conversion of OpenCL reqd_work_group_size attr to metadata
...
Patch by Pekka Jääskeläinen!
llvm-svn: 141865
2011-10-13 16:24:41 +00:00
Rafael Espindola
2d21ab024e
Add returns_twice to functions that are known to return twice. This implements
...
the same behavior of gcc by keeping the attribute out of the function type.
llvm-svn: 141803
2011-10-12 19:51:18 +00:00
Eric Christopher
93663b3c62
Revert file/scope handling patches. gdb testing revealed a couple of bugs.
...
llvm-svn: 141796
2011-10-12 18:39:35 +00:00
Jim Goodnow II
5a793d3762
Removed extra line in comment.
...
llvm-svn: 141773
2011-10-12 09:55:01 +00:00
Eric Christopher
663b7f353e
Remember to set the location in EmitGlobalVariable to the current decl
...
if we're going to delete the setLocation as we did in 141732.
llvm-svn: 141762
2011-10-12 01:11:30 +00:00
Eric Christopher
498b7fd7fe
Start handling debug line and scope information better:
...
Migrate most of the location setting within the larger API in CGDebugInfo and
update a lot of callers.
Remove the existing file/scope change machinery in UpdateLineDirectiveRegion
and replace it with DILexicalBlockFile usage.
Finishes off the rest of rdar://10246360
llvm-svn: 141732
2011-10-11 23:00:55 +00:00
Eric Christopher
fefafacf68
80-column and tab cleanup.
...
llvm-svn: 141731
2011-10-11 23:00:51 +00:00
Eric Christopher
fb4cd4082c
Reorder this to make it easier to add more changes for a location set.
...
llvm-svn: 141730
2011-10-11 23:00:45 +00:00
Eli Friedman
c2025567f5
Silence some -Wuninitialized false positives with gcc.
...
llvm-svn: 141701
2011-10-11 20:00:47 +00:00
Eli Friedman
df14b3a837
Initial implementation of __atomic_* (everything except __atomic_is_lock_free).
...
llvm-svn: 141632
2011-10-11 02:20:01 +00:00
Richard Smith
caf3390d44
Constant expression evaluation refactoring:
...
- Remodel Expr::EvaluateAsInt to behave like the other EvaluateAs* functions,
and add Expr::EvaluateKnownConstInt to capture the current fold-or-assert
behaviour.
- Factor out evaluation of bitfield bit widths.
- Fix a few places which would evaluate an expression twice: once to determine
whether it is a constant expression, then again to get the value.
llvm-svn: 141561
2011-10-10 18:28:20 +00:00
David Chisnall
e0dc7cb2e2
Apparently getPtrToInt() takes an explicit type parameter to allow you to generate invalid bitcode, not so that it can actually produce a value of this type. This should fix PR11085.
...
llvm-svn: 141482
2011-10-08 08:54:36 +00:00
Ted Kremenek
c168e50722
Free 'TheTargetCodeGenInfo' in the class CodeGenModule. This looks like an obvious memory leak that was reported from LLDB devs. The comment indicates the leak is deliberate, but I have no idea why this needs to be so. Please comment/revert if you know otherwise.
...
llvm-svn: 141479
2011-10-08 05:28:26 +00:00
Eli Friedman
235266700a
Fix warning on MSVC. Patch by Aaron Ballman.
...
llvm-svn: 141467
2011-10-08 01:03:47 +00:00
John McCall
f937c023bf
Rename TagDecl::isDefinition -> isCompleteDefinition
...
for better self-documenting code, since the semantics
are subtly different from getDefinition().
llvm-svn: 141355
2011-10-07 06:10:15 +00:00
John McCall
0710e551ef
Record layout requires not just a definition, but a complete
...
definition. Assert this. Change IR generation to not try to
aggressively emit the IR translation of a record during its
own definition. Fixes PR10912.
llvm-svn: 141350
2011-10-07 02:39:22 +00:00
Eli Friedman
c8b57f6683
llvm.memory.barrier is going away; remove the wrapper intrinsic __builtin_llvm_memory_barrier.
...
__atomic_thread_fence will be landing soon as a replacement, wrapping around the new fence instruction.
llvm-svn: 141332
2011-10-06 23:12:03 +00:00
Eli Friedman
0dfb889575
Support for C1x _Atomic specifier (see testcase). This is primarily being committed at the moment to help support C++0x <atomic>, but it should be a solid base for implementing the full specification of C1x _Atomic.
...
Thanks to Jeffrey Yasskin for the thorough review!
llvm-svn: 141330
2011-10-06 23:00:33 +00:00
Peter Collingbourne
fa4d6033a3
CUDA: IR generation support for device stubs
...
llvm-svn: 141304
2011-10-06 18:51:56 +00:00
Peter Collingbourne
a9455ec9f8
CUDA: add -fcuda-is-device flag
...
This frontend-only flag is used by the IR generator to determine
whether to filter CUDA declarations for the host or for the device.
llvm-svn: 141301
2011-10-06 18:29:46 +00:00
Peter Collingbourne
fe88342240
CUDA: IR generation support for kernel call expressions
...
llvm-svn: 141300
2011-10-06 18:29:37 +00:00
Peter Collingbourne
5bad4afa2f
CUDA: set proper calling conventions for PTX
...
llvm-svn: 141296
2011-10-06 16:49:54 +00:00
Eric Christopher
fab289a47d
When constructing debug information for synthesized variables for the
...
non-fragile ABI we may not be able to lay out the type and the debugger
would ignore us even if we did put in the offset. Go ahead and just
put any value there and don't look up the offset since it may not exist.
rdar://10210157
llvm-svn: 141261
2011-10-06 00:31:18 +00:00
Eric Christopher
8c552308c6
Reformat comment.
...
llvm-svn: 141260
2011-10-06 00:30:52 +00:00
Justin Holewinski
38031978b5
PTX: Set proper calling conventions for PTX in OpenCL mode.
...
llvm-svn: 141193
2011-10-05 17:58:44 +00:00
David Chisnall
cdd207e43e
Add bitmaps for strong / weak ivar layout (GNUstep runtime).
...
llvm-svn: 141085
2011-10-04 15:35:30 +00:00
John McCall
ff61303bd0
Mark calls to objc_retainBlock that don't result from casts
...
to id so that we can still optimize them appropriately.
llvm-svn: 141064
2011-10-04 06:23:45 +00:00
Rafael Espindola
70107f989c
Propagate __attribute__((returns_twice)) from C to IL.
...
llvm-svn: 141002
2011-10-03 14:59:42 +00:00
Argyrios Kyrtzidis
b8c3aaf479
Allow getting all source locations of selector identifiers in a ObjCMethodDecl.
...
Instead of always storing all source locations for the selector identifiers
we check whether all the identifiers are in a "standard" position; "standard" position is
-Immediately before the arguments: -(id)first:(int)x second:(int)y;
-With a space between the arguments: -(id)first: (int)x second: (int)y;
-For nullary selectors, immediately before ';': -(void)release;
In such cases we infer the locations instead of storing them.
llvm-svn: 140989
2011-10-03 06:37:04 +00:00
Argyrios Kyrtzidis
dfd6570643
Pass from the parser the locations of selector identifiers when creating
...
objc method decls.
They are not stored in the AST yet.
llvm-svn: 140984
2011-10-03 06:36:36 +00:00
John McCall
9b0a7cea0f
Make -fobjc-nonfragile-abi the -cc1 default, since it's the
...
increasingly prevailing case to the point that new features
like ARC don't even support the fragile ABI anymore.
This required a little bit of reshuffling with exceptions
because a check was assuming that ObjCNonFragileABI was
only being set in ObjC mode, and that's actually a bit
obnoxious to do.
Most, though, it involved a perl script to translate a ton
of test cases.
Mostly no functionality change for driver users, although
there are corner cases with disabling language-specific
exceptions that we should handle more correctly now.
llvm-svn: 140957
2011-10-02 01:16:38 +00:00
John McCall
248512a573
When performing an @throw in ARC, retain + autorelease
...
the pointer, being sure to do so before running cleanups
associated with that full-expression. rdar://10042689
llvm-svn: 140945
2011-10-01 10:32:24 +00:00
Fariborz Jahanian
0c78427d50
objc gc: assigning to an objc object struct member through an ivar
...
pointer to this struct must go through the none ivar writer barrier.
llvm-svn: 140867
2011-09-30 18:23:36 +00:00
Eli Friedman
1b87b29bfd
Minor cleanup.
...
llvm-svn: 140866
2011-09-30 18:19:16 +00:00
Eric Christopher
2f45aaa755
Change "Regions" to be "LexicalBlocks" since that's what they
...
correspond to.
llvm-svn: 140740
2011-09-29 00:00:45 +00:00
Eric Christopher
bfa4dc5512
Rename EmitStopPoint in CGDebugInfo to EmitLocation. "stop points" don't
...
exist anymore.
llvm-svn: 140739
2011-09-29 00:00:41 +00:00
Eric Christopher
4fd315ffbd
Reorder functions in the file.
...
llvm-svn: 140738
2011-09-29 00:00:37 +00:00
Eric Christopher
e655657c94
Call UpdateLineDirectiveRegion every time we want to emit a stop
...
point in the code. Ensures that we don't miss any places and the
check is reasonably cheap.
llvm-svn: 140737
2011-09-29 00:00:35 +00:00
Eric Christopher
250511bc75
Update comment.
...
llvm-svn: 140736
2011-09-29 00:00:31 +00:00
Benjamin Kramer
76399eb2ad
de-tmpify clang.
...
llvm-svn: 140637
2011-09-27 21:06:10 +00:00
Eric Christopher
9c13eeac99
Update comments.
...
llvm-svn: 140531
2011-09-26 15:03:22 +00:00
Eric Christopher
22e157009c
Fix comment to reflect reality.
...
llvm-svn: 140530
2011-09-26 15:03:19 +00:00
Peter Collingbourne
cfd2356180
Move VTable builder to AST
...
llvm-svn: 140510
2011-09-26 01:57:12 +00:00