summaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGVtable.cpp
Commit message (Collapse)AuthorAge
* Rename CGVtable files to CGVTables.Anders Carlsson2010-04-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100778 91177308-0d34-0410-b5e6-96231b3b80d8
* Clarify an assert.Anders Carlsson2010-04-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100776 91177308-0d34-0410-b5e6-96231b3b80d8
* Eliminate excessive PCH deserialization caused by the search forDouglas Gregor2010-04-08
| | | | | | | | | | | | | | | | | | | | | | | | __cxxabiv1::__fundamental_type_info in every translation unit. Previously, we would perform name lookup for __cxxabiv1::__fundamental_type_info at the end of IRGen for a each translation unit, to determine whether it was present. If so, we we produce type information for all of the fundamental types. However, this name lookup causes PCH deserialization of a significant part of the translation unit, which has a woeful impact on performance. With this change, we now look at each record type after we've generated its vtable to see if it is __cxxabiv1::__fundamental_type_info. If so, we generate type info for all of the fundamental types. This works because __cxxabiv1::__fundamental_type_info should always have a key function (typically the virtual destructor), that will be defined once in the support library. The fundamental type information will end up there. Fixes <rdar://problem/7840011>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100772 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't produce a vtable for a class if we have an explicit template ↵Rafael Espindola2010-04-03
| | | | | | | | | | instantiation declaration and no key function. We will produce the vtable at the explicit template instantiation. Fixes PR6748 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100266 91177308-0d34-0410-b5e6-96231b3b80d8
* the big refactoring bits of PR3782.Rafael Espindola2010-03-30
| | | | | | | | | | This introduces FunctionType::ExtInfo to hold the calling convention and the noreturn attribute. The next patch will extend it to include the regparm attribute and fix the bug. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99920 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't produce a vtable if we are just instantiating a method and theRafael Espindola2010-03-30
| | | | | | | | | class has no key function. Fix PR6738. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99900 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the old vtable layout code.Anders Carlsson2010-03-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99869 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove UseNewVTableCode checks.Anders Carlsson2010-03-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99868 91177308-0d34-0410-b5e6-96231b3b80d8
* Flip the switch and use the new vtable layout code for everything. I've ↵Anders Carlsson2010-03-30
| | | | | | verified that this passes a self-host but I'll let the bots self host as well before removing the now dead code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99861 91177308-0d34-0410-b5e6-96231b3b80d8
* Another vtable layout fix, making us match gcc better.Anders Carlsson2010-03-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99812 91177308-0d34-0410-b5e6-96231b3b80d8
* Handle pure virtual member functions.Anders Carlsson2010-03-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99807 91177308-0d34-0410-b5e6-96231b3b80d8
* More vtable work - it's not possible to use the new vtable code for ↵Anders Carlsson2010-03-29
| | | | | | everything by setting a flag inside CGVtable.cpp. My plan is to run some tests and bootstrap and once that's done flip the bit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99804 91177308-0d34-0410-b5e6-96231b3b80d8
* Only add thunks for the most derived class. This fixes some link errors I ↵Anders Carlsson2010-03-29
| | | | | | was seeing in files generated by the vtable tester utility. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99801 91177308-0d34-0410-b5e6-96231b3b80d8
* Cleanup, no functionality change.Anders Carlsson2010-03-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99798 91177308-0d34-0410-b5e6-96231b3b80d8
* Add the thunks needed by this vtable.Anders Carlsson2010-03-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99793 91177308-0d34-0410-b5e6-96231b3b80d8
* Make sure to sort the vtable thunks by their vtable index :) With this we ↵Anders Carlsson2010-03-29
| | | | | | now pass the test from http://www.codesourcery.com/public/cxx-abi/abi-examples.html#vtable-ctor successfully. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99792 91177308-0d34-0410-b5e6-96231b3b80d8
* Two bug fixes, we weren't updating the thunk index when creating the vtable ↵Anders Carlsson2010-03-29
| | | | | | initializer and we weren't storing the secondary virtual pointer indices. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99786 91177308-0d34-0410-b5e6-96231b3b80d8
* Give thunks the same linkage as their original methods.Anders Carlsson2010-03-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99729 91177308-0d34-0410-b5e6-96231b3b80d8
* Use the new vtable layout code for construction vtables.Anders Carlsson2010-03-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99606 91177308-0d34-0410-b5e6-96231b3b80d8
* Way more VTT builder cleanup.Anders Carlsson2010-03-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99604 91177308-0d34-0410-b5e6-96231b3b80d8
* Start cleaning up the VTT builder to make it work more like the VTable builder.Anders Carlsson2010-03-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99581 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't add address points for virtual primary bases that aren't primary bases ↵Anders Carlsson2010-03-25
| | | | | | in the complete class. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99555 91177308-0d34-0410-b5e6-96231b3b80d8
* Use the new vtable layout code for construction vtables.Anders Carlsson2010-03-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99516 91177308-0d34-0410-b5e6-96231b3b80d8
* When -fdump-vtable-layouts is specified, construction vtable initializers ↵Anders Carlsson2010-03-25
| | | | | | will be generated using the new vtable layout code. (The code is still not completely in place but this is a huge step forward). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99508 91177308-0d34-0410-b5e6-96231b3b80d8
* More address point map shuffling.Anders Carlsson2010-03-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99462 91177308-0d34-0410-b5e6-96231b3b80d8
* Shuffle some code around; this will make it easier to use the new layout ↵Anders Carlsson2010-03-25
| | | | | | code for address points. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99461 91177308-0d34-0410-b5e6-96231b3b80d8
* More vtable improvements. We now compute and keep track of all vtable ↵Anders Carlsson2010-03-24
| | | | | | related information which avoids computing the same vtable layout over and over. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99403 91177308-0d34-0410-b5e6-96231b3b80d8
* Use getNamedGlobal instead of getGlobalVariable. (Fixes self-host).Anders Carlsson2010-03-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99385 91177308-0d34-0410-b5e6-96231b3b80d8
* More vtable work; preparations for moving over to the new vtable layout code ↵Anders Carlsson2010-03-24
| | | | | | (finally). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99381 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove old thunks code.Anders Carlsson2010-03-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99374 91177308-0d34-0410-b5e6-96231b3b80d8
* Flip the switch and use the new vtable layout code for thunks by default. ↵Anders Carlsson2010-03-24
| | | | | | Add a thunks.cpp test. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99367 91177308-0d34-0410-b5e6-96231b3b80d8
* Add CodeGenFunction::GenerateThunk and implement it.Anders Carlsson2010-03-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99365 91177308-0d34-0410-b5e6-96231b3b80d8
* Minor cleanup.Anders Carlsson2010-03-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99364 91177308-0d34-0410-b5e6-96231b3b80d8
* revert 99311. Looks like it broke darwin bootstrap.Rafael Espindola2010-03-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99317 91177308-0d34-0410-b5e6-96231b3b80d8
* Avoid producing implicit methods when we have a explicit template instantiationRafael Espindola2010-03-23
| | | | | | | | declaration. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99311 91177308-0d34-0410-b5e6-96231b3b80d8
* More work on thunks - don't assert if there's a variable with the same name ↵Anders Carlsson2010-03-23
| | | | | | as the thunk already. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99303 91177308-0d34-0410-b5e6-96231b3b80d8
* More thunks scaffolding.Anders Carlsson2010-03-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99294 91177308-0d34-0410-b5e6-96231b3b80d8
* More work on thunks.Anders Carlsson2010-03-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99287 91177308-0d34-0410-b5e6-96231b3b80d8
* Move ThunkInfo as well.Anders Carlsson2010-03-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99280 91177308-0d34-0410-b5e6-96231b3b80d8
* Move ReturnAdjustment and ThisAdjustment out into CGVtable.hAnders Carlsson2010-03-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99279 91177308-0d34-0410-b5e6-96231b3b80d8
* Baby steps towards making thunks be emitted from the new vtable layout code.Anders Carlsson2010-03-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99254 91177308-0d34-0410-b5e6-96231b3b80d8
* Some renames.Anders Carlsson2010-03-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99253 91177308-0d34-0410-b5e6-96231b3b80d8
* Always emit associated thunks when emitting the function itself. Remove ↵Anders Carlsson2010-03-23
| | | | | | getVtableAddressPoint, it's not used. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99252 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename MaybeEmitVtable to EmitVTableRelatedData in preparation for making it ↵Anders Carlsson2010-03-23
| | | | | | emit thunks as well. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99251 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename CGVtableInfo to CodeGenVTables in preparation of adding another ↵Anders Carlsson2010-03-23
| | | | | | VTableInfo class. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99250 91177308-0d34-0410-b5e6-96231b3b80d8
* More work on thunks; almost there now.Anders Carlsson2010-03-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99199 91177308-0d34-0410-b5e6-96231b3b80d8
* Add less than operators to ThisAdjustment, ReturnAdjustment and ThunkInfo. ↵Anders Carlsson2010-03-22
| | | | | | Sort the thunks before dumping them. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99184 91177308-0d34-0410-b5e6-96231b3b80d8
* Improve dumping of thunks.Anders Carlsson2010-03-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99181 91177308-0d34-0410-b5e6-96231b3b80d8
* We want to add all thunks, not just 'this' adjustment thunks.Anders Carlsson2010-03-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99177 91177308-0d34-0410-b5e6-96231b3b80d8
* AddThunk should take a const reference.Anders Carlsson2010-03-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99140 91177308-0d34-0410-b5e6-96231b3b80d8