summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
...
* objective-C blocks: bring back the CharUnit patch forFariborz Jahanian2012-11-071-45/+46
| | | | | | | captured block variable layout meta-data. No intended change in functionality. llvm-svn: 167549
* Fix the Objective-C exception rethrow from cleanups (GNU runtimes). Note thatDavid Chisnall2012-11-073-7/+9
| | | | | | | a bug in the inliner still causes the wrong thing to happen at -O2 and above (PR14116). llvm-svn: 167534
* Put something sane in the DWARF offset field for bitfield ObjC ivars.Eli Friedman2012-11-063-6/+29
| | | | | | | | | This is useful because unnamed bitfields can have effects on the offsets which are not otherwise reflected in the DWARF information. <rdar://problem/12629719> llvm-svn: 167503
* Implement codegen for init_priority attribute properly - make sure itAnton Korobeynikov2012-11-062-19/+48
| | | | | | | | works between the modules. No functionality change on Darwin/Windows. This fixes PR11480. llvm-svn: 167496
* Back out 167431+167437+167487; I didn't realize how incomplete our testEli Friedman2012-11-064-135/+141
| | | | | | coverage of this code is. llvm-svn: 167495
* Fix a silly mistake in r167437.Eli Friedman2012-11-061-2/+2
| | | | llvm-svn: 167487
* Cleanup: 80-column violationManman Ren2012-11-061-4/+6
| | | | llvm-svn: 167476
* ARM byval: when type alignment is bigger than ABI alignment, instead ofManman Ren2012-11-061-5/+4
| | | | | | | | | | | | 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 llvm-svn: 167440
* Propagate CharUnits through CGObjCMac.cpp.Eli Friedman2012-11-061-84/+78
| | | | llvm-svn: 167437
* Minor fix to ObjC layout bitmap metadata. Found while I was trying toEli Friedman2012-11-061-1/+1
| | | | | | refactor the code. llvm-svn: 167436
* Classify the INT_MIN/-1 check as -fsanitize=signed-integer-overflow, not as ↵Richard Smith2012-11-061-9/+17
| | | | | | -fsanitize=divide-by-zero. llvm-svn: 167433
* Propagate CharUnits into ObjC CodeGen. No intended functional change.Eli Friedman2012-11-064-66/+66
| | | | llvm-svn: 167431
* Have the parser initialize Sema before it consumes the firstDouglas Gregor2012-11-051-1/+3
| | | | | | | | 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. llvm-svn: 167423
* ARM byval: when type alignment is bigger than ABI alignment, we can't guaranteeManman Ren2012-11-051-2/+10
| | | | | | | | | | | 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 llvm-svn: 167416
* Use the individual -fsanitize=<...> arguments to control which of the UBSanRichard Smith2012-11-055-42/+52
| | | | | | | checks to enable. Remove frontend support for -fcatch-undefined-behavior, -faddress-sanitizer and -fthread-sanitizer now that they don't do anything. llvm-svn: 167413
* Rename LangOptions members for address sanitizer and thread sanitizer fromRichard Smith2012-11-053-6/+6
| | | | | | *Sanitizer to Sanitize* in preparation for later patches. llvm-svn: 167405
* On PowerPC64, integer arguments and return values need to be sign- orUlrich Weigand2012-11-051-0/+58
| | | | | | | | | | | | | | | | 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. llvm-svn: 167393
* Fixes liftime of captured block variables in mrr mode, per John's feedback, asFariborz Jahanian2012-11-041-17/+12
| | | | | | well as couple of tests which were not being excercised because of TYPOs. llvm-svn: 167374
* Emit debug info for C++ struct definitions as DW_TAG_structure_type (instead ↵David Blaikie2012-11-021-4/+2
| | | | | | of class_type). llvm-svn: 167336
* objective-C mrr block. Block variable layout metadata inFariborz Jahanian2012-11-021-5/+26
| | | | | | mrr mode. llvm-svn: 167331
* Fix debug tag type of forward declarations of struct/class in C++.David Blaikie2012-11-021-10/+6
| | | | llvm-svn: 167308
* Update the front end to use minsize attributeQuentin Colombet2012-11-011-0/+3
| | | | llvm-svn: 167266
* Simplify: replace getContext().getLangOpts() with just getLangOpts().Richard Smith2012-11-0114-48/+48
| | | | llvm-svn: 167261
* Clean up misapplication of diff.Richard Smith2012-11-011-1/+0
| | | | llvm-svn: 167260
* Split emission of -ftrapv checks and -fcatch-undefined-behavior checks intoRichard Smith2012-11-013-25/+34
| | | | | | separate functions, since they share essentially no code. llvm-svn: 167259
* Remove divison-by-zero checks from -ftrapv. These checks were incompatible withRichard Smith2012-11-011-6/+2
| | | | | | | g++'s -ftrapv, failed to call the -ftrapv overflow handler, and are still available under -fcatch-undefined-behavior. llvm-svn: 167258
* Silence -Wformat on platforms where uint64_t is unsigned long.Matt Beaumont-Gay2012-11-011-1/+1
| | | | llvm-svn: 167249
* objective-C block meta-data. This patch completes meta-dataFariborz Jahanian2012-11-013-18/+174
| | | | | | | | 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. llvm-svn: 167241
* -fcatch-undefined-behavior: Start checking loads and stores for null pointers.Richard Smith2012-11-011-11/+11
| | | | | | | | 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. llvm-svn: 167219
* ARM AAPCS-VFP: fix tracking of allocated VFP registers.Manman Ren2012-10-311-24/+50
| | | | | | | According to the spec, we can backfill VFP registers that were skipped due to alignment constraints. llvm-svn: 167159
* ARM AAPCS-VFP: fix handling of homogeneous aggreate.Manman Ren2012-10-301-6/+80
| | | | | | | 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. llvm-svn: 167058
* objective-C arc/mrr: Another patch for the new captured block variable Fariborz Jahanian2012-10-301-23/+191
| | | | | | layout meta-data. It is currently off (so no tests). This is wip. llvm-svn: 167047
* Change ForceSizeOpt attribute into MinSize attributeQuentin Colombet2012-10-301-1/+1
| | | | llvm-svn: 167021
* Don't crash on bad atomic operations. PR14176.Eli Friedman2012-10-301-7/+13
| | | | llvm-svn: 166992
* Revert commit r166946Quentin Colombet2012-10-291-3/+0
| | | | llvm-svn: 166957
* Make forcesizeopt attribute available to the end userQuentin Colombet2012-10-291-0/+3
| | | | llvm-svn: 166946
* Handle '*' and '#' asm constraint modifiers.Ulrich Weigand2012-10-291-0/+4
| | | | llvm-svn: 166924
* objective-C arc/mrr: Patch for the new block variable layout meta-data.Fariborz Jahanian2012-10-274-6/+176
| | | | | | It is currently off (so no tests). This is wip. llvm-svn: 166892
* Move two helper functions to AST so that sema can use them.Rafael Espindola2012-10-271-113/+2
| | | | llvm-svn: 166853
* Refactor some code into a new findMaterializedTemporary function.Rafael Espindola2012-10-271-25/+32
| | | | llvm-svn: 166849
* Refactor some code into a new skipRValueSubobjectAdjustments function.Rafael Espindola2012-10-271-45/+51
| | | | llvm-svn: 166848
* Delay codegen to after collecting all SubobjectAdjustment so that the collectionRafael Espindola2012-10-271-6/+6
| | | | | | can be refactored and used in Sema. llvm-svn: 166847
* Add missing safety check to an optimization for do-while loops. PR14191.Eli Friedman2012-10-261-0/+4
| | | | llvm-svn: 166832
* Don't crash synthesizing an ObjC property with an empty struct type. ↵Eli Friedman2012-10-261-0/+8
| | | | | | <rdar://problem/12547611>. llvm-svn: 166825
* Add comment for my patch in r166809.Fariborz Jahanian2012-10-261-0/+2
| | | | llvm-svn: 166823
* Remove BLOCK_BYREF_LAYOUT_BYREF flags from list ofFariborz Jahanian2012-10-261-3/+2
| | | | | | flags for __block variable meta-data. llvm-svn: 166811
* objective-C IRGen: for @implementation nested in Fariborz Jahanian2012-10-261-1/+8
| | | | | | | | | extern "C", its method definitions must be IRGen'ed before meta-data for class is generated. Otherwise, IRGen crashes (to say the least). // rdar://12581683 llvm-svn: 166809
* This patch addresses a 64-bit PowerPC ELF ABI compatibility issue withBill Schmidt2012-10-261-15/+0
| | | | | | | | | | | | | | | | | | | | | | | | | varargs parameter passing. A strict reading of the ABI indicates that any argument with alignment greater than 8 may require skipping doublewords in the parameter save area to align the argument, and hence require skipping GPRs. In practice, this is not done by GCC. The alignment restriction is used for internal alignment of a structure, but a structure with 16-byte alignment, for example, is not itself 16-byte aligned in the parameter save area. Although this is messy, it has become the de facto standard used in building existing libraries. My initial varargs support followed the ABI language, but not the de facto standard. Running the GCC compatibility test suite exposed this issue, and indeed showed that LLVM didn't pass parameters self-consistently with my original logic. Removing the additional alignment logic allows the affected tests to now pass. I modified the ppc64-varargs-struct.c test case to remove the existing test for generation of alignment code, which is no longer appropriate. Built and tested on powerpc64-unknown-linux-gnu with no new regressions. llvm-svn: 166805
* Declare type of flags to be used in a __block (byref)Fariborz Jahanian2012-10-261-0/+12
| | | | | | variable descriptor captured by a block. llvm-svn: 166746
* Oz optimization level sets ForceSizeOpt attribute for each functionQuentin Colombet2012-10-261-0/+2
| | | | llvm-svn: 166744
OpenPOWER on IntegriCloud