aboutsummaryrefslogtreecommitdiff
path: root/clang/test/CodeGenCXX/vtable-pointer-initialization.cpp
AgeCommit message (Collapse)AuthorFilesLines
2016-12-13CodeGen: Start using inrange annotations on vtable getelementptr.Peter Collingbourne1-4/+4
This annotation allows the optimizer to split vtable groups, as permitted by a change to the Itanium ABI [1] that prevents compilers from adjusting virtual table pointers between virtual tables. [1] https://github.com/MentorEmbedded/cxx-abi/pull/7 Differential Revision: https://reviews.llvm.org/D24431 llvm-svn: 289585
2016-12-13CodeGen: New vtable group representation: struct of vtable arrays.Peter Collingbourne1-4/+4
In a future change, this representation will allow us to use the new inrange annotation on getelementptr to allow the optimizer to split vtable groups. Differential Revision: https://reviews.llvm.org/D22296 llvm-svn: 289584
2016-03-14CodeGen: Use 32-bit gep offsets to address vtable address points.Peter Collingbourne1-4/+4
The relative vtable ABI will use a struct rather than an array as the type of a vtable. LLVM only allows 32-bit integers as struct indices, so we need to use 32-bit integers to get addresses of address points. In order to keep the code simple, we might as well do that unconditionally. It's probably a reasonable implementation limit to support no more than 2 billion virtual functions per class. This change causes quite a bit of churn in the test suite, so I'm making it separately. Differential Revision: http://reviews.llvm.org/D18113 llvm-svn: 263469
2015-03-13Test case updates for explicit type parameter to the gep operatorDavid Blaikie1-4/+4
llvm-svn: 232187
2015-01-22Emit DeferredDeclsToEmit in a DFS order.Rafael Espindola1-6/+6
Currently we emit DeferredDeclsToEmit in reverse order. This patch changes that. The advantages of the change are that * The output order is a bit closer to the source order. The change to test/CodeGenCXX/pod-member-memcpys.cpp is a good example. * If we decide to deffer more, it will not cause as large changes in the estcases as it would without this patch. llvm-svn: 226751
2015-01-21Don't assume variable name.Rafael Espindola1-1/+1
Should fix the test in -Asserts builds. llvm-svn: 226668
2015-01-21Make the test a bit stricter. NFC.Rafael Espindola1-0/+3
llvm-svn: 226666
2014-12-03Cast vtable address points to i32 (...)** to enable more globaloptReid Kleckner1-4/+4
We currently use i32 (...)** as the type of the vptr field in the LLVM struct type. LLVM's GlobalOpt prefers any bitcasts to be on the side of the data being stored rather than on the pointer being stored to. Reviewers: majnemer Differential Revision: http://reviews.llvm.org/D5916 llvm-svn: 223267
2013-08-15CHECK-LABEL-ify some code gen tests to improve diagnostic experience when ↵Stephen Lin1-5/+5
tests fail. llvm-svn: 188447
2011-07-09clang side to match the LLVM IR type system rewrite patch.Chris Lattner1-3/+3
llvm-svn: 134831
2011-01-25Move unnamed_addr after the function arguments on Sabre's request.Rafael Espindola1-5/+5
llvm-svn: 124210
2011-01-11Add unnamed_addr to constructors and destructors.Rafael Espindola1-5/+5
llvm-svn: 123197
2010-04-20Back out r101911 and see if it makes the bots happy.Anders Carlsson1-20/+0
llvm-svn: 101921
2010-04-20Fix a bug which triggered the assertion I added yesterday. Basically, when ↵Anders Carlsson1-0/+20
we initialize the vtable pointer for a virtual base, and there was another path from the most derived class to another base with the same class type, we would use the wrong base. llvm-svn: 101911
2010-03-24More vtable improvements. We now compute and keep track of all vtable ↵Anders Carlsson1-4/+4
related information which avoids computing the same vtable layout over and over. llvm-svn: 99403
2010-03-24More vtable work; preparations for moving over to the new vtable layout code ↵Anders Carlsson1-4/+4
(finally). llvm-svn: 99381
2010-02-23Perform two more constructor/destructor code-size optimizations:John McCall1-4/+7
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
2010-02-19Re-introduce the ctor/dtor alias optimization, this time hidden behind aJohn McCall1-2/+2
command-line option which defaults off. llvm-svn: 96649
2010-02-18Revert the ctor/dtor alias optimization for now; the buildbots can detectJohn McCall1-2/+2
some failure here that I can't. llvm-svn: 96612
2010-02-17Emit complete constructors and destructors as aliases to base constructorsJohn McCall1-2/+2
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
2010-02-07Make sure to set vtable pointers in the destructors as well.Anders Carlsson1-0/+54
llvm-svn: 95525