summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
* Let an ivar directly refer property TAG.Devang Patel2012-02-061-2/+1
| | | | llvm-svn: 149881
* Fix vector splat casts to cast element to the appropriate vector element ↵Craig Topper2012-02-061-0/+2
| | | | | | before inserting into the vector. Fixes PR11930. llvm-svn: 149855
* reapply the patches reverted in r149477, which enable ConstantDataArray.Chris Lattner2012-02-055-37/+39
| | | | llvm-svn: 149801
* Basic: import SmallString<> into clang namespaceDylan Noblesmith2012-02-0510-22/+22
| | | | | | | (I was going to fix the TODO about DenseMap too, but that would break self-host right now. See PR11922.) llvm-svn: 149799
* Basic: import OwningPtr<> into clang namespaceDylan Noblesmith2012-02-055-9/+9
| | | | llvm-svn: 149798
* Preserve alignment for Neon vld1_lane/dup and vst1_lane intrinsics.Bob Wilson2012-02-041-7/+17
| | | | | | | | We had been generating load/store instructions with the default alignment for the vector element type, even when the pointer argument had less alignment. <rdar://problem/10538555> llvm-svn: 149794
* Move various diagnostic operator<< overloads out of line and remove includes ↵Benjamin Kramer2012-02-043-1/+4
| | | | | | | | | of Diagnostic.h. Fix all the files that depended on transitive includes of Diagnostic.h. With this patch in place changing a diagnostic no longer requires a full rebuild of the StaticAnalyzer. llvm-svn: 149781
* Create new tag for the property. This is a work in progress.Devang Patel2012-02-041-1/+7
| | | | llvm-svn: 149734
* Fix -ftrap-function fallout from llvm r145714. <rdar://problem/10799325>Bob Wilson2012-02-031-0/+1
| | | | | | | | | That llvm change removed the -trap-func backend option, so that using -ftrap-function with clang would cause the backend to complain. Fix it by adding the trap function name to the CodeGenOptions and passing it through to the TargetOptions. llvm-svn: 149679
* unnecessary include of TargetMachine.h?Andrew Trick2012-02-021-1/+0
| | | | llvm-svn: 149638
* Move the code that sets the AddressSafetyAlexander Potapenko2012-02-021-8/+7
| | | | | | | | | | attribute into CodeGenModule::SetLLVMFunctionAttributesForDefinition(). Previously it resided in CodeGenModule::GetOrCreateLLVMFunction, which for some reason wasn't called for ObjC class methods, see http://code.google.com/p/address-sanitizer/issues/detail?id=33 llvm-svn: 149605
* r149474 went a bit too far when combined with type caching. If we wantEric Christopher2012-02-011-2/+5
| | | | | | | | | a full type go ahead and emit it if we currently only have a forward declaration. Fixes gdb bots for gdb1090.exp and call-ar-st.exp. llvm-svn: 149560
* Remove duplicated comment.Eric Christopher2012-02-011-1/+0
| | | | llvm-svn: 149544
* Fix comment.Eric Christopher2012-02-011-2/+2
| | | | llvm-svn: 149543
* Add missing dependency to unbreak the CMake buildDouglas Gregor2012-02-011-0/+1
| | | | llvm-svn: 149531
* size() == 0 -> empty().David Chisnall2012-02-011-1/+1
| | | | | | Spotted by rjmcall. llvm-svn: 149526
* Compatability fix for SwitchInst refactoring.Stepan Dyatkovskiy2012-02-012-3/+3
| | | | | | | | | | | | | | | | | The purpose of refactoring is to hide operand roles from SwitchInst user (programmer). If you want to play with operands directly, probably you will need lower level methods than SwitchInst ones (TerminatorInst or may be User). After this patch we can reorganize SwitchInst operands and successors as we want. What was done: 1. Changed semantics of index inside the getCaseValue method: getCaseValue(0) means "get first case", not a condition. Use getCondition() if you want to resolve the condition. I propose don't mix SwitchInst case indexing with low level indexing (TI successors indexing, User's operands indexing), since it may be dangerous. 2. By the same reason findCaseValue(ConstantInt*) returns actual number of case value. 0 means first case, not default. If there is no case with given value, ErrorIndex will returned. 3. Added getCaseSuccessor method. I propose to avoid usage of TerminatorInst::getSuccessor if you want to resolve case successor BB. Use getCaseSuccessor instead, since internal SwitchInst organization of operands/successors is hidden and may be changed in any moment. 4. Added resolveSuccessorIndex and resolveCaseIndex. The main purpose of these methods is to see how case successors are really mapped in TerminatorInst. 4.1 "resolveSuccessorIndex" was created if you need to level down from SwitchInst to TerminatorInst. It returns TerminatorInst's successor index for given case successor. 4.2 "resolveCaseIndex" converts low level successors index to case index that curresponds to the given successor. Note: There are also related compatability fix patches for dragonegg, klee, llvm-gcc-4.0, llvm-gcc-4.2, safecode, clang. llvm-svn: 149482
* Revert r149363 which was part a series of commits that were reverted in llvmArgyrios Kyrtzidis2012-02-016-41/+42
| | | | | | | | | | | | | | | | | commit 149470. This fixes test/CodeGen/PR3589-freestanding-libcalls.c. Original log: ConstantArray::get() (for strings) is going away, use ConstantDataArray::getString instead. Many instances of ConstantArray::get() could be moved to use more efficient ConstantDataArray methods that avoid a ton of intermediate Constant*'s for each element (e.g. GetConstantArrayFromStringLiteral). I don't plan on doing this in the short-term though. llvm-svn: 149477
* For pass-by-value record arguments to functions emit a forward declEric Christopher2012-02-012-3/+75
| | | | | | instead of the entire class definition. llvm-svn: 149474
* Support @compatibility_alias at run time (GNUstep Runtime)David Chisnall2012-01-314-2/+63
| | | | | | Patch by Niels Grewe! llvm-svn: 149401
* Don't zero terminate the bitmap twice.Benjamin Kramer2012-01-311-1/+1
| | | | llvm-svn: 149377
* ConstantArray::get() (for strings) is going away, useChris Lattner2012-01-316-42/+41
| | | | | | | | | | | | ConstantDataArray::getString instead. Many instances of ConstantArray::get() could be moved to use more efficient ConstantDataArray methods that avoid a ton of intermediate Constant*'s for each element (e.g. GetConstantArrayFromStringLiteral). I don't plan on doing this in the short-term though. llvm-svn: 149363
* enhance some optimization logic to handle ConstantDataSequentialChris Lattner2012-01-311-9/+26
| | | | | | as well as ConstantArray. llvm-svn: 149347
* test for a v-table dispatch that consumes anFariborz Jahanian2012-01-301-2/+16
| | | | | | | argument. twik to support the test case. // rdar://10444476 llvm-svn: 149298
* 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
OpenPOWER on IntegriCloud