summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
* Perform two more constructor/destructor code-size optimizations:John McCall2010-02-237-47/+250
| | | | | | | | | | | | | | | | 1) emit base destructors as aliases to their unique base class destructors under some careful conditions. This is enabled for the same targets that can support complete-to-base aliases, i.e. not darwin. 2) Emit non-variadic complete constructors for classes with no virtual bases as calls to the base constructor. This is enabled on all targets and in theory can trigger in situations that the alias optimization can't (mostly involving virtual bases, mostly not yet supported). These are bundled together because I didn't think it worthwhile to split them, not because they really need to be. llvm-svn: 96842
* Change the name of the vtable-debugging environment variable toDouglas Gregor2010-02-221-1/+1
| | | | | | CLANG_VTABLE_DEBUG. llvm-svn: 96785
* Don't use NamedDecl::getNameAsCString() when dealing with C++ methods,Douglas Gregor2010-02-221-13/+13
| | | | | | since they may not have normal identifiers for names. Fixes PR6369. llvm-svn: 96784
* Eliminate the default arguments to ASTContext::getFunctionType(),Douglas Gregor2010-02-211-1/+4
| | | | | | | | fixing up a few callers that thought they were propagating NoReturn information but were in fact saying something about exception specifications. llvm-svn: 96766
* Add the CK_UnusedFunctionPointer component kind for unused function pointers.Anders Carlsson2010-02-191-3/+34
| | | | llvm-svn: 96695
* More refactoring around constructor/destructor code generation.John McCall2010-02-194-182/+178
| | | | | | | | | | | | Fix some bugs with function-try-blocks and simplify normal try-block code generation. This implementation excludes a deleting destructor's call to operator delete() from the function-try-block, which I believe is correct but which I can't find straightforward support for at a moment's glance. llvm-svn: 96670
* Dump this-adjustments for destructors as well.Anders Carlsson2010-02-191-10/+27
| | | | llvm-svn: 96660
* Re-introduce the ctor/dtor alias optimization, this time hidden behind aJohn McCall2010-02-193-23/+143
| | | | | | command-line option which defaults off. llvm-svn: 96649
* Patch removes IVars list from ObjCInterfaceDecl andFariborz Jahanian2010-02-191-1/+1
| | | | | | instead relies on their DeclContext for iteration, etc. llvm-svn: 96638
* remove unused function & enumerationsBlaine Garst2010-02-192-39/+2
| | | | llvm-svn: 96635
* Revert the ctor/dtor alias optimization for now; the buildbots can detectJohn McCall2010-02-183-142/+26
| | | | | | some failure here that I can't. llvm-svn: 96612
* Make deleting and complete dtor variants defer to other dtor variants byJohn McCall2010-02-182-48/+93
| | | | | | | | calling them as subroutines. This triggers whenever the alias optimization doesn't, i.e. when the dtor has linkonce linkage or there are virtual bases or it's the deleting dtor. llvm-svn: 96605
* Attempt to fix the 32-bit test failures.Anders Carlsson2010-02-181-1/+1
| | | | llvm-svn: 96595
* Fix another bug and add another class.Anders Carlsson2010-02-181-2/+10
| | | | llvm-svn: 96590
* More work on vcall offsets.Anders Carlsson2010-02-181-4/+61
| | | | llvm-svn: 96587
* Start stubbing out vcall offset handling.Anders Carlsson2010-02-181-10/+60
| | | | llvm-svn: 96585
* Store the base offset of the final overrider in the OverriderInfo struct, to ↵Anders Carlsson2010-02-181-1/+6
| | | | | | be used for vcall offsets. llvm-svn: 96582
* Remove some dead code.Anders Carlsson2010-02-181-13/+0
| | | | llvm-svn: 96581
* Extract out function-body code generation into its own method. No functionalityJohn McCall2010-02-183-111/+98
| | | | | | change. llvm-svn: 96564
* silence warning in a cleaner wayChris Lattner2010-02-171-2/+1
| | | | llvm-svn: 96520
* Patch to remove arbitrary imporation of 'self' intoFariborz Jahanian2010-02-171-13/+0
| | | | | | | | a block without it being used. This causes over release of objects in certain runtime-senitive apps. (fixes radar 7581175). llvm-svn: 96501
* Did not intend to check this in.Fariborz Jahanian2010-02-171-2/+0
| | | | llvm-svn: 96486
* Use proper lexcial context for newly added ivars.Fariborz Jahanian2010-02-171-0/+2
| | | | llvm-svn: 96484
* Make FinalOverriders handle virtual bases correctly. Unfortunately this ↵Anders Carlsson2010-02-171-3/+33
| | | | | | can't be tested just yet. llvm-svn: 96481
* Handle primary bases in AddVCallOffsets.Anders Carlsson2010-02-171-2/+9
| | | | llvm-svn: 96461
* Silence GCC warning by marking an assert-only variable as unused.Chandler Carruth2010-02-171-1/+1
| | | | llvm-svn: 96459
* First cut at emitting vcall offsets.Anders Carlsson2010-02-171-3/+77
| | | | llvm-svn: 96455
* Emit complete constructors and destructors as aliases to base constructorsJohn McCall2010-02-173-26/+142
| | | | | | | | and destructors when the two entities are semantically identical, i.e. when the class has no virtual base classes. We only do this for linkage types for which aliases are supported, i.e. internal and external, i.e. not linkonce. llvm-svn: 96451
* Pass through whether a base is virtual or not.Anders Carlsson2010-02-171-17/+26
| | | | llvm-svn: 96449
* implement EmitVAArg. pretty much the same way other targets do.Sanjiv Gupta2010-02-171-1/+21
| | | | llvm-svn: 96446
* Correctly calculate base offsets for 'this' pointer adjustments involving ↵Anders Carlsson2010-02-171-3/+40
| | | | | | virtual bases. This can't be tested yet due to lack of vcall offsets :) llvm-svn: 96441
* IRgen optimization: cache the value of 'this' and 'vtt' instead ofJohn McCall2010-02-164-25/+19
| | | | | | | | repeatedly reloading from an alloca. We still need to create the alloca for debug info purposes (although we currently create it in all cases because of some abstraction boundaries that're hard to break down). llvm-svn: 96403
* Distinguish two lexical blocks at the same level.Devang Patel2010-02-161-1/+4
| | | | llvm-svn: 96397
* IRgen: Switch 'retval' to use CreateIRTemp.Daniel Dunbar2010-02-161-2/+2
| | | | llvm-svn: 96376
* IRgen: Add CreateIRTemp, which creates a temporary alloca but with type ↵Daniel Dunbar2010-02-162-1/+18
| | | | | | converted "not-for-memory". Dunno a better name. llvm-svn: 96374
* IRgen: Switch EmitCompoundLiteralLValue to use CreateMemTemp.Daniel Dunbar2010-02-161-3/+1
| | | | llvm-svn: 96373
* Handle layout of vtables for virtual bases.Anders Carlsson2010-02-161-1/+41
| | | | llvm-svn: 96355
* Move some code around in preparation for virtual base vtables.Anders Carlsson2010-02-161-9/+18
| | | | llvm-svn: 96354
* Fix a bug where we would not emit secondary vtables for bases of a primary base.Anders Carlsson2010-02-161-12/+29
| | | | llvm-svn: 96351
* Emit vbase offsets.Anders Carlsson2010-02-161-4/+38
| | | | llvm-svn: 96329
* More work on the new layout code.Anders Carlsson2010-02-161-11/+66
| | | | llvm-svn: 96328
* When emitting complete destructors for classes with virtual bases, computeJohn McCall2010-02-162-36/+64
| | | | | | | | | | | | the offset to the virtual bases statically inside of relying on the virtual base offsets in the object's vtable(s). This is both more efficient and sound against the destructor's manipulation of the vtables. Also extract a few helper routines. Oh and we seem to pass all tests with an optimized clang now. llvm-svn: 96327
* Use getLocStart(), instead of getLocEnd(), to record starting location of ↵Devang Patel2010-02-151-1/+1
| | | | | | objc method. :) llvm-svn: 96245
* Uniformize the names of type predicates: rather than having isFloatTy andDuncan Sands2010-02-154-19/+19
| | | | | | isInteger, we now have isFloatTy and isIntegerTy. Requested by Chris! llvm-svn: 96224
* When emitting an aggregate into a temporary, make sure we set the alignmentJohn McCall2010-02-151-1/+1
| | | | | | | | | on the alloca. The fact that codegen makes this class of bug so wonderfully easy to make is embarrassing. llvm-svn: 96204
* Don't compute final overriders or build vtables for bases that don't need a ↵Anders Carlsson2010-02-141-3/+17
| | | | | | vtable. llvm-svn: 96171
* Build fix.Anders Carlsson2010-02-141-1/+1
| | | | llvm-svn: 96140
* Baby steps towards teaching FinalOverriders about virtual bases.Anders Carlsson2010-02-141-14/+31
| | | | llvm-svn: 96139
* Don't try to layout construction vtables for now.Anders Carlsson2010-02-141-1/+2
| | | | llvm-svn: 96138
* Improve support for non-virtual 'this' pointer adjustments. With this, it ↵Anders Carlsson2010-02-141-27/+41
| | | | | | should be possible to use the new vtable layout code for all class hierarchies that do not involve virtual bases. llvm-svn: 96137
OpenPOWER on IntegriCloud