summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
...
* objc-arc: Perform null check on receiver before sending methods whichFariborz Jahanian2012-01-301-3/+52
| | | | | | | | | consume one or more of their arguments. If not done, this will cause a leak as method will not consume the argument when receiver is null. In this patch, the null path releases consumed argument. // rdar://10444474 llvm-svn: 149279
* Remove long dead code for handling vector shift by immediate builtins.Craig Topper2012-01-301-107/+0
| | | | llvm-svn: 149237
* Remove custom handling for cmpsd/cmpss/cmppd/cmpps builtins. The builtins ↵Craig Topper2012-01-301-16/+0
| | | | | | are now in IntrinsicsX86.td. llvm-svn: 149235
* Cleanup 3dnow builtin handling. Most of them were already handled by LLVM ↵Craig Topper2012-01-301-117/+1
| | | | | | connecting intrinsics and builtins in IntrinsicsX86.td. llvm-svn: 149233
* Simplify code by using the new getAggregateElement method that got addedChris Lattner2012-01-301-10/+4
| | | | | | | recently. This also conveniently gets clang ready for a change about to land in mainline. llvm-svn: 149225
* revert r149184Fariborz Jahanian2012-01-293-103/+62
| | | | llvm-svn: 149205
* When emitting an ARC epilogue that looks like a return of 'self',John McCall2012-01-291-0/+56
| | | | | | | | kill the retain from the return site. This has the workaround nature. It's badness all around. llvm-svn: 149193
* Get a little bit smarter about killing off the ReturnValue allocaJohn McCall2012-01-291-10/+45
| | | | | | | in the presence of straight-line cleanups. This is a simple but important case, particularly for ARC. llvm-svn: 149190
* objc-arc: Perform null check on receiver before sending methods whichFariborz Jahanian2012-01-283-62/+103
| | | | | | | | consume one or more of their arguments. If not done, this will cause a leak as method will not consume the argument when receiver is null. // rdar://10444474 llvm-svn: 149184
* Make the __builtin_c[lt]zs builtins target independent.Benjamin Kramer2012-01-281-26/+2
| | | | | | | | | There is really no reason to have these only available on x86. It's just __builtin_c[tl]z for shorts. Modernize the test while at it. llvm-svn: 149183
* Placate gcc's -Wreturn-typeMatt Beaumont-Gay2012-01-271-0/+1
| | | | llvm-svn: 149104
* Make clz/ctz builtins defined for zero on ARM targets. rdar://10732455Bob Wilson2012-01-261-2/+4
| | | | | | | | | | | | | | | | ARM supports clz and ctz directly and both operations have well-defined results for zero. There is no disadvantage in performance to using the defined-at-zero versions of llvm.ctlz/cttz intrinsics. We're running into ARM-specific code written with the assumption that __builtin_clz(0) == 32, even though that value is technically undefined. The code is failing now because of llvm optimizations that are taking advantage of the undef behavior (specifically svn r147255). There's nothing wrong with that optimization on x86 where any incorrect assumptions about __builtin_clz(0) will quickly be exposed. For ARM, though, optimizations based on that undef behavior are likely to cause subtle bugs. Other targets with defined-at-zero clz/ctz support may want to override the default behavior as well. llvm-svn: 149086
* Use createRecordFwdDecl here since that's what we're doing.Eric Christopher2012-01-261-9/+2
| | | | llvm-svn: 149051
* Revert previous patch unifying all of the C++ record prep in one area,Eric Christopher2012-01-261-6/+11
| | | | | | | | | the gdb testsuite complains too much about the ordering of items printed, even if the offsets in the debug info are correct. This reverts commit 027cb30af828f07750f9185782822297a5c57231. llvm-svn: 149049
* Remove another duplicated variable.Eric Christopher2012-01-261-8/+7
| | | | llvm-svn: 149047
* Use function pointers, rather than references, to pass DestroyersPeter Collingbourne2012-01-268-55/+41
| | | | | | | around, in the process cleaning up the various gcc/msvc compiler workarounds. llvm-svn: 149036
* Tidy and remove some unused variables.Eric Christopher2012-01-261-7/+5
| | | | llvm-svn: 149015
* Collect this information together. No reason to have it split.Eric Christopher2012-01-261-7/+5
| | | | llvm-svn: 149013
* Refactor into its own function.Eric Christopher2012-01-262-22/+30
| | | | llvm-svn: 149012
* Add some ABI tweaks for i386-pc-win32 triple so that we return structs in an ↵Eli Friedman2012-01-251-14/+28
| | | | | | MSVC-compatible way. Patch by Joe Groff. llvm-svn: 148992
* Clean up comment.Eric Christopher2012-01-251-1/+1
| | | | llvm-svn: 148982
* Fixup r148926, for -Asserts.NAKAMURA Takumi2012-01-251-1/+1
| | | | llvm-svn: 148943
* reapply r148902:Chris Lattner2012-01-253-50/+24
| | | | | | | | | | "use the new ConstantVector::getSplat method where it makes sense." Also simplify a bunch of code to use the Builder->getInt32 instead of doing it the hard and ugly way. Much more progress could be made here, but I don't plan to do it. llvm-svn: 148926
* Fix a crash for an edge case of the GNU ?: extension.Eli Friedman2012-01-251-2/+2
| | | | llvm-svn: 148923
* Revert 148902 which was part of 148901 which was reverted in r148906.Argyrios Kyrtzidis2012-01-253-24/+48
| | | | | | | Original log: use the new ConstantVector::getSplat method where it makes sense. llvm-svn: 148907
* Refactor the record decl forward declaration code a bit.Eric Christopher2012-01-252-37/+31
| | | | llvm-svn: 148904
* Typo.Eric Christopher2012-01-251-1/+1
| | | | llvm-svn: 148903
* use the new ConstantVector::getSplat method where it makes sense.Chris Lattner2012-01-253-48/+24
| | | | llvm-svn: 148902
* The following patch adds __attribute__((no_address_safety_analysis)) which ↵Kostya Serebryany2012-01-241-0/+8
| | | | | | | | | | | | | | | will allow to disable address safety analysis (such as e.g. AddressSanitizer or SAFECode) for a specific function. When building with AddressSanitizer, add AddressSafety function attribute to every generated function except for those that have __attribute__((no_address_safety_analysis)). With this patch we will be able to 1. disable AddressSanitizer for a particular function 2. disable AddressSanitizer-hostile optimizations (such as some cases of load widening) when AddressSanitizer is on. llvm-svn: 148842
* Make sure the integer type used to align the vaarg address is the same as theAkira Hatanaka2012-01-231-7/+9
| | | | | | type of pointers. llvm-svn: 148753
* Ignore return type if its size is zero.Akira Hatanaka2012-01-231-2/+3
| | | | llvm-svn: 148744
* Add support for -fno-optimize-sibling-calls. Currently only implemented in theNick Lewycky2012-01-231-0/+1
| | | | | | X86 backend in LLVM. llvm-svn: 148689
* Add an assertion that our use-marking actually covers all uses of a ↵Eli Friedman2012-01-211-0/+7
| | | | | | variable. The assertion doesn't cover quite as much as it should, but it's a good start, at least. llvm-svn: 148625
* When adding types to the context chain for record types, just emitEric Christopher2012-01-202-3/+57
| | | | | | | | | a forward declaration unless we already have a type. We can fill it in later if it's actually used. Fixes PR11345 llvm-svn: 148584
* More dead code removal (using -Wunreachable-code)David Blaikie2012-01-2015-40/+6
| | | | llvm-svn: 148577
* use llvm:Attributes instead of unsignedKostya Serebryany2012-01-201-10/+10
| | | | llvm-svn: 148554
* test svn commit accessSeth Cantrell2012-01-181-0/+1
| | | | llvm-svn: 148388
* Fix a string over-run detected by ASAN.Nick Lewycky2012-01-181-2/+3
| | | | llvm-svn: 148375
* Fix special king of typo.Nick Lewycky2012-01-181-1/+1
| | | | llvm-svn: 148368
* output body of folded case again.Fariborz Jahanian2012-01-171-1/+3
| | | | llvm-svn: 148361
* Folding away unreachable case statement.Fariborz Jahanian2012-01-171-7/+15
| | | | | | patch (slightly revised) by Aaron Ballman. llvm-svn: 148359
* Make sure to initialize ExternalProtocolPtrTyDouglas Gregor2012-01-171-1/+2
| | | | llvm-svn: 148358
* Add __builtin_labs and __builtin_llabs, to complete the set of ↵Eli Friedman2012-01-171-1/+3
| | | | | | __builtin_*abs. Patch by Ruben Van Boxem. llvm-svn: 148340
* Remove constant member pointer support from Expr-based constant emission nowRichard Smith2012-01-174-118/+13
| | | | | | that APValue-based constant emission knows how to emit member pointers. llvm-svn: 148336
* Enable the new ObjC ARC autorelease pool elimination pass.Dan Gohman2012-01-171-0/+7
| | | | llvm-svn: 148331
* When initializing a catch variable in ARC, be sure to emit retainsJohn McCall2012-01-172-3/+35
| | | | | | | | | or whatever else is required for the initialization instead of assuming it can be done with a simple store. Fixes PR11732. llvm-svn: 148325
* Don't eagerly deserialize the 'Protocol' type when initializing codeDouglas Gregor2012-01-171-8/+19
| | | | | | generation for Objective-C; it may not be needed. llvm-svn: 148317
* Remove unnecessary default cases in switches over enums.David Blaikie2012-01-173-7/+2
| | | | | | This allows -Wswitch-enum to find switches that need updating when these enums are modified. llvm-svn: 148281
* Add support for OpenCL 1.1 logical operations.Tanya Lattner2012-01-161-0/+33
| | | | llvm-svn: 148254
* Fixes a crash during constant folding of a switch and case Fariborz Jahanian2012-01-161-0/+10
| | | | | | | statement which has an unscoped case inside it. Patch by Aaron Ballman llvm-svn: 148243
OpenPOWER on IntegriCloud