summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
* CodeGen: Move EHPersonality from CGException.h into the cpp file, it has no ↵Benjamin Kramer2012-02-083-80/+43
| | | | | | | | other users. While at it make it value-initializable to get rid of static ctors. llvm-svn: 150070
* A little bit of lambda IRGen.Eli Friedman2012-02-082-0/+12
| | | | llvm-svn: 150058
* Constify the getClassName routine and variables that come out of it,Eric Christopher2012-02-082-5/+8
| | | | | | | | and then use it for forward decl names. Part of rdar://10209967 and rdar://10400981 llvm-svn: 150040
* Do not return records with non trivial destructors or copy constructors inAkira Hatanaka2012-02-081-1/+1
| | | | | | registers. llvm-svn: 150035
* Use the new forward declaration scheme for records. Also add moreEric Christopher2012-02-081-18/+22
| | | | | | | | caching of results after we create them. Fixes rdar://10809898 llvm-svn: 150025
* Remove tabs.Devang Patel2012-02-081-18/+18
| | | | llvm-svn: 150021
* Revert my patches which removed Diagnostic.h includes by moving some ↵Benjamin Kramer2012-02-073-4/+1
| | | | | | | | | | | | | | | | | | operator overloads out of line. This seems to negatively affect compile time onsome ObjC tests (which use a lot of partial diagnostics I assume). I have to come up with a way to keep them inline without including Diagnostic.h everywhere. Now adding a new diagnostic requires a full rebuild of e.g. the static analyzer which doesn't even use those diagnostics. This reverts commit 6496bd10dc3a6d5e3266348f08b6e35f8184bc99. This reverts commit 7af19b817ba964ac560b50c1ed6183235f699789. This reverts commit fdd15602a42bbe26185978ef1e17019f6d969aa7. This reverts commit 00bd44d5677783527d7517c1ffe45e4d75a0f56f. This reverts commit ef9b60ffed980864a8db26ad30344be429e58ff5. llvm-svn: 150006
* Make use of const-correct ParseCommandLineOptionsDavid Blaikie2012-02-071-3/+2
| | | | llvm-svn: 150000
* Remove tabs.Devang Patel2012-02-071-5/+5
| | | | llvm-svn: 149996
* Emit debug info for properites that are not backed by an ivar.Devang Patel2012-02-071-19/+21
| | | | llvm-svn: 149995
* Switch the ObjC*Decl raw_stream overloads to take a reference, for ↵Benjamin Kramer2012-02-071-1/+1
| | | | | | consistency with NamedDecls. llvm-svn: 149981
* Use SmallVector instead of std::vector.Bill Wendling2012-02-071-4/+4
| | | | llvm-svn: 149976
* Use 'ArrayRef<>' instead of 'std::vector<>&' for passed-in arguments.Bill Wendling2012-02-071-39/+38
| | | | llvm-svn: 149975
* Calculate the .size() of the vector once.Bill Wendling2012-02-071-5/+5
| | | | llvm-svn: 149974
* Reserve a moderate amount of space for the back-end arguments.Bill Wendling2012-02-071-0/+1
| | | | llvm-svn: 149973
* Bump up the initial vector size to avoid having to grow the vector more often.Bill Wendling2012-02-071-1/+1
| | | | llvm-svn: 149945
* simplify a bunch of code to use the well-known LLVM IR types computed by ↵Chris Lattner2012-02-0723-217/+133
| | | | | | CodeGenModule. llvm-svn: 149943
* Use a more efficient container for these values. Also reserve space when using aBill Wendling2012-02-071-3/+6
| | | | | | std::vector. llvm-svn: 149936
* Use a SmallVector instead of std::vector. This improves compilation time inBill Wendling2012-02-071-5/+5
| | | | | | 445.gobmk by ~1.7%. llvm-svn: 149935
* Don't recalculate the size of the array each time through the for-loop.Bill Wendling2012-02-061-2/+2
| | | | llvm-svn: 149933
* Relax valid location check. This fixes a clang crash while emitting debug ↵Devang Patel2012-02-061-2/+4
| | | | | | info for properties that are synthesized by the compiler by default. llvm-svn: 149929
* build wide strings with ConstantDataArray, just because we can.Chris Lattner2012-02-061-12/+18
| | | | llvm-svn: 149928
* improve the code that handles IR generation of byte-sized string literals to ↵Chris Lattner2012-02-061-35/+19
| | | | | | | | avoid allocating an std::string. llvm-svn: 149924
* use cheaper llvm APIs for various bits of IR generation.Chris Lattner2012-02-063-39/+23
| | | | llvm-svn: 149916
* simplify code and smallvectorize.Chris Lattner2012-02-061-6/+7
| | | | llvm-svn: 149915
* 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
OpenPOWER on IntegriCloud