summaryrefslogtreecommitdiff
path: root/lib/CodeGen
Commit message (Collapse)AuthorAge
* Merging r167935: into the 3.2 release branch.Pawel Wodnicki2012-11-26
| | | | | | | | | The ObjC++-to-C++ personality trick is only necessary on NeXT runtimes, which is not coincidentally the only place it works, either (because of how it tests for EH_TYPE symbols). git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_32@168611 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r167925: into the 3.2 release branch.Pawel Wodnicki2012-11-26
| | | | | | | | Move some GNUStep-specific code out of CGObjCGNU. Patch by Jonathan Schleifer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_32@168609 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r168355: into the 3.2 release branch.Pawel Wodnicki2012-11-22
| | | | | | | Update method calls to the new interface re r168354. git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_32@168487 91177308-0d34-0410-b5e6-96231b3b80d8
* Merge r168260 from trunk:Benjamin Kramer2012-11-19
| | | | | | | | | | Enable inlining of 4 byte atomic ops on ppc32, 8 byte atomic ops on ppc64. Also fixes a bit/byte mismatch when checking if a target supports atomic ops of a certain size. git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_32@168313 91177308-0d34-0410-b5e6-96231b3b80d8
* objective-C blocks: Change BLOCK_HAS_EXTENDED_LAYOUT to be 1<<31.Fariborz Jahanian2012-11-10
| | | | | | | lower 24bit is currently being used. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167678 91177308-0d34-0410-b5e6-96231b3b80d8
* Turn FrontendInputFile into an immutable class and have it also acceptArgyrios Kyrtzidis2012-11-09
| | | | | | a memory buffer instead of only a filename. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167627 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement -mstrict-align using '-backend-option -arm-strict-align' as this savesChad Rosier2012-11-09
| | | | | | | us from having to make any backend changes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167623 91177308-0d34-0410-b5e6-96231b3b80d8
* [driver] Add a -mstrict-align compiler option for ARM targets.Chad Rosier2012-11-09
| | | | | | rdar://12340498 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167619 91177308-0d34-0410-b5e6-96231b3b80d8
* When deciding whether to convert an array construction loop into a memcpy, lookRichard Smith2012-11-07
| | | | | | | | | at whether the *selected* constructor would be trivial rather than considering whether the array's element type has *any* non-trivial constructors of the relevant kind. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167562 91177308-0d34-0410-b5e6-96231b3b80d8
* objective-C blocks: bring back the CharUnit patch forFariborz Jahanian2012-11-07
| | | | | | | | captured block variable layout meta-data. No intended change in functionality. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167549 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix the Objective-C exception rethrow from cleanups (GNU runtimes). Note thatDavid Chisnall2012-11-07
| | | | | | | | | a bug in the inliner still causes the wrong thing to happen at -O2 and above (PR14116). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167534 91177308-0d34-0410-b5e6-96231b3b80d8
* Put something sane in the DWARF offset field for bitfield ObjC ivars.Eli Friedman2012-11-06
| | | | | | | | | | | This is useful because unnamed bitfields can have effects on the offsets which are not otherwise reflected in the DWARF information. <rdar://problem/12629719> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167503 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement codegen for init_priority attribute properly - make sure itAnton Korobeynikov2012-11-06
| | | | | | | | | works between the modules. No functionality change on Darwin/Windows. This fixes PR11480. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167496 91177308-0d34-0410-b5e6-96231b3b80d8
* Back out 167431+167437+167487; I didn't realize how incomplete our testEli Friedman2012-11-06
| | | | | | | | coverage of this code is. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167495 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a silly mistake in r167437.Eli Friedman2012-11-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167487 91177308-0d34-0410-b5e6-96231b3b80d8
* Cleanup: 80-column violationManman Ren2012-11-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167476 91177308-0d34-0410-b5e6-96231b3b80d8
* ARM byval: when type alignment is bigger than ABI alignment, instead ofManman Ren2012-11-06
| | | | | | | | | | | | | disabling byval, we set realign to true. It will perform an aligned alloca, and call memcpy to copy the byval argument to the local variable. Change the size threshold back to 64 bytes. rdar://12596507 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167440 91177308-0d34-0410-b5e6-96231b3b80d8
* Propagate CharUnits through CGObjCMac.cpp.Eli Friedman2012-11-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167437 91177308-0d34-0410-b5e6-96231b3b80d8
* Minor fix to ObjC layout bitmap metadata. Found while I was trying toEli Friedman2012-11-06
| | | | | | | | refactor the code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167436 91177308-0d34-0410-b5e6-96231b3b80d8
* Classify the INT_MIN/-1 check as -fsanitize=signed-integer-overflow, not as ↵Richard Smith2012-11-06
| | | | | | -fsanitize=divide-by-zero. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167433 91177308-0d34-0410-b5e6-96231b3b80d8
* Propagate CharUnits into ObjC CodeGen. No intended functional change.Eli Friedman2012-11-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167431 91177308-0d34-0410-b5e6-96231b3b80d8
* Have the parser initialize Sema before it consumes the firstDouglas Gregor2012-11-05
| | | | | | | | | token. This is important because the first token could actually be after an #include that triggers a module import, which might use either Sema or the AST consumer before it would have been initialized. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167423 91177308-0d34-0410-b5e6-96231b3b80d8
* ARM byval: when type alignment is bigger than ABI alignment, we can't guaranteeManman Ren2012-11-05
| | | | | | | | | | | | the type alignment of the byval argument. This patch will disable byval in this case, it also increases the size threshold for turning on byval. A backend fix will be attempted. rdar://12596507 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167416 91177308-0d34-0410-b5e6-96231b3b80d8
* Use the individual -fsanitize=<...> arguments to control which of the UBSanRichard Smith2012-11-05
| | | | | | | | checks to enable. Remove frontend support for -fcatch-undefined-behavior, -faddress-sanitizer and -fthread-sanitizer now that they don't do anything. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167413 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename LangOptions members for address sanitizer and thread sanitizer fromRichard Smith2012-11-05
| | | | | | | *Sanitizer to Sanitize* in preparation for later patches. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167405 91177308-0d34-0410-b5e6-96231b3b80d8
* On PowerPC64, integer arguments and return values need to be sign- orUlrich Weigand2012-11-05
| | | | | | | | | | | | | | | | | zero-extended to 64 bits. This information is currently provided to the back end by setting "signext" or "zeroext" attributes. However, this is done only for integer types *smaller* than i32, not for i32 itself. This causes clang to generate code violating the ABI, which results in a failure of the tramp3d-v4 test case (due to calling a system library routine without ABI-required extension). This patch implements custom versions of classifyArgumentType and classifyReturnType for PPC64_SVR4_ABIInfo, which are the same as the default versions except that they also classify "int" and "unsigned int" as types needing extending. This fixed tramp3d-v4 on PowerPC64. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167393 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixes liftime of captured block variables in mrr mode, per John's feedback, asFariborz Jahanian2012-11-04
| | | | | | | well as couple of tests which were not being excercised because of TYPOs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167374 91177308-0d34-0410-b5e6-96231b3b80d8
* Emit debug info for C++ struct definitions as DW_TAG_structure_type (instead ↵David Blaikie2012-11-02
| | | | | | of class_type). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167336 91177308-0d34-0410-b5e6-96231b3b80d8
* objective-C mrr block. Block variable layout metadata inFariborz Jahanian2012-11-02
| | | | | | | mrr mode. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167331 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix debug tag type of forward declarations of struct/class in C++.David Blaikie2012-11-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167308 91177308-0d34-0410-b5e6-96231b3b80d8
* Update the front end to use minsize attributeQuentin Colombet2012-11-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167266 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify: replace getContext().getLangOpts() with just getLangOpts().Richard Smith2012-11-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167261 91177308-0d34-0410-b5e6-96231b3b80d8
* Clean up misapplication of diff.Richard Smith2012-11-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167260 91177308-0d34-0410-b5e6-96231b3b80d8
* Split emission of -ftrapv checks and -fcatch-undefined-behavior checks intoRichard Smith2012-11-01
| | | | | | | separate functions, since they share essentially no code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167259 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove divison-by-zero checks from -ftrapv. These checks were incompatible withRichard Smith2012-11-01
| | | | | | | | g++'s -ftrapv, failed to call the -ftrapv overflow handler, and are still available under -fcatch-undefined-behavior. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167258 91177308-0d34-0410-b5e6-96231b3b80d8
* Silence -Wformat on platforms where uint64_t is unsigned long.Matt Beaumont-Gay2012-11-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167249 91177308-0d34-0410-b5e6-96231b3b80d8
* objective-C block meta-data. This patch completes meta-dataFariborz Jahanian2012-11-01
| | | | | | | | | generation for captured block variables in arc mode. This includes inlined version of the meta-data when it can be done. It also includes severat tests. This is wip. // rdar://12184410. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167241 91177308-0d34-0410-b5e6-96231b3b80d8
* -fcatch-undefined-behavior: Start checking loads and stores for null pointers.Richard Smith2012-11-01
| | | | | | | | | We want the diagnostic, and if the load is optimized away, we still want to trap it. Stop checking non-default address spaces; that doesn't work in general. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167219 91177308-0d34-0410-b5e6-96231b3b80d8
* ARM AAPCS-VFP: fix tracking of allocated VFP registers.Manman Ren2012-10-31
| | | | | | | | According to the spec, we can backfill VFP registers that were skipped due to alignment constraints. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167159 91177308-0d34-0410-b5e6-96231b3b80d8
* ARM AAPCS-VFP: fix handling of homogeneous aggreate.Manman Ren2012-10-30
| | | | | | | | If HA can only partially fit into VFP registers, we add padding to make sure HA will be on stack and later VFP CPRCs will be on stack as well. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167058 91177308-0d34-0410-b5e6-96231b3b80d8
* objective-C arc/mrr: Another patch for the new captured block variable Fariborz Jahanian2012-10-30
| | | | | | | | layout meta-data. It is currently off (so no tests). This is wip. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167047 91177308-0d34-0410-b5e6-96231b3b80d8
* Change ForceSizeOpt attribute into MinSize attributeQuentin Colombet2012-10-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167021 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't crash on bad atomic operations. PR14176.Eli Friedman2012-10-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166992 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert commit r166946Quentin Colombet2012-10-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166957 91177308-0d34-0410-b5e6-96231b3b80d8
* Make forcesizeopt attribute available to the end userQuentin Colombet2012-10-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166946 91177308-0d34-0410-b5e6-96231b3b80d8
* Handle '*' and '#' asm constraint modifiers.Ulrich Weigand2012-10-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166924 91177308-0d34-0410-b5e6-96231b3b80d8
* objective-C arc/mrr: Patch for the new block variable layout meta-data.Fariborz Jahanian2012-10-27
| | | | | | | It is currently off (so no tests). This is wip. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166892 91177308-0d34-0410-b5e6-96231b3b80d8
* Move two helper functions to AST so that sema can use them.Rafael Espindola2012-10-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166853 91177308-0d34-0410-b5e6-96231b3b80d8
* Refactor some code into a new findMaterializedTemporary function.Rafael Espindola2012-10-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166849 91177308-0d34-0410-b5e6-96231b3b80d8
* Refactor some code into a new skipRValueSubobjectAdjustments function.Rafael Espindola2012-10-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166848 91177308-0d34-0410-b5e6-96231b3b80d8