Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | When generating the call arguments in a thunk to call the thunkee, do | Douglas Gregor | 2010-05-21 | 1 | -3/+9 | |
| | | | | | | | | not make copies non-POD arguments or arguments passed by reference: just copy the pointers directly. This eliminates another source of the dreaded memcpy-of-non-PODs. Fixes PR7188. llvm-svn: 104327 | |||||
* | When creating a this-adjustment thunk where the return value is of C++ | Douglas Gregor | 2010-05-20 | 1 | -2/+9 | |
| | | | | | | | | | class type (that uses a return slot), pass the return slot to the callee directly rather than allocating new storage and trying to copy the object. This appears to have been the cause of the remaining two Boost.Interprocess failures. llvm-svn: 104215 | |||||
* | Rework when and how vtables are emitted, by tracking where vtables are | Douglas Gregor | 2010-05-13 | 1 | -47/+7 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "used" (e.g., we will refer to the vtable in the generated code) and when they are defined (i.e., because we've seen the key function definition). Previously, we were effectively tracking "potential definitions" rather than uses, so we were a bit too eager about emitting vtables for classes without key functions. The new scheme: - For every use of a vtable, Sema calls MarkVTableUsed() to indicate the use. For example, this occurs when calling a virtual member function of the class, defining a constructor of that class type, dynamic_cast'ing from that type to a derived class, casting to/through a virtual base class, etc. - For every definition of a vtable, Sema calls MarkVTableUsed() to indicate the definition. This happens at the end of the translation unit for classes whose key function has been defined (so we can delay computation of the key function; see PR6564), and will also occur with explicit template instantiation definitions. - For every vtable defined/used, we mark all of the virtual member functions of that vtable as defined/used, unless we know that the key function is in another translation unit. This instantiates virtual member functions when needed. - At the end of the translation unit, Sema tells CodeGen (via the ASTConsumer) which vtables must be defined (CodeGen will define them) and which may be used (for which CodeGen will define the vtables lazily). From a language perspective, both the old and the new schemes are permissible: we're allowed to instantiate virtual member functions whenever we want per the standard. However, all other C++ compilers were more lazy than we were, and our eagerness was both a performance issue (we instantiated too much) and a portability problem (we broke Boost test cases, which now pass). Notes: (1) There's a ton of churn in the tests, because the order in which vtables get emitted to IR has changed. I've tried to isolate some of the larger tests from these issues. (2) Some diagnostics related to implicitly-instantiated/implicitly-defined virtual member functions have moved to the point of first use/definition. It's better this way. (3) I could use a review of the places where we MarkVTableUsed, to see if I missed any place where the language effectively requires a vtable. Fixes PR7114 and PR6564. llvm-svn: 103718 | |||||
* | Fix typo in comment; 80 col violation | Douglas Gregor | 2010-05-06 | 1 | -3/+3 | |
| | | | | llvm-svn: 103204 | |||||
* | Pass the globaldecl into GetOrCreateLLVMFunction so that llvm | Chris Lattner | 2010-05-05 | 1 | -1/+1 | |
| | | | | | | | | | function attributes like byval get applied to the function definition. This fixes PR7058 and makes i386 llvm/clang bootstrap pass all the same tests as x86-64 bootstrap for me (the llvmc tests still fail in both). llvm-svn: 103131 | |||||
* | Vtable -> VTable renames across the board. | Anders Carlsson | 2010-04-17 | 1 | -31/+31 | |
| | | | | llvm-svn: 101666 | |||||
* | Fix a bug where we would sometimes incorrectly mark an vtable function as ↵ | Anders Carlsson | 2010-04-17 | 1 | -6/+3 | |
| | | | | | | unused. llvm-svn: 101643 | |||||
* | Fix another bug where we wouldn't generate secondary vtables for ↵ | Anders Carlsson | 2010-04-11 | 1 | -5/+9 | |
| | | | | | | construction vtables in some cases. llvm-svn: 100998 | |||||
* | More renames. | Anders Carlsson | 2010-04-11 | 1 | -46/+46 | |
| | | | | llvm-svn: 100991 | |||||
* | Rename a function parameter. | Anders Carlsson | 2010-04-11 | 1 | -6/+10 | |
| | | | | llvm-svn: 100990 | |||||
* | Fix a bug where we were adding too many vcall offsets in some cases. | Anders Carlsson | 2010-04-11 | 1 | -20/+7 | |
| | | | | llvm-svn: 100985 | |||||
* | Enable an assert and remove a now unnecessary assert. | Anders Carlsson | 2010-04-10 | 1 | -12/+0 | |
| | | | | llvm-svn: 100953 | |||||
* | Fix a bug where we would add the same function twice in a vtable. | Anders Carlsson | 2010-04-10 | 1 | -18/+20 | |
| | | | | llvm-svn: 100949 | |||||
* | Rename VtableComponent and VtableBuilder. | Anders Carlsson | 2010-04-10 | 1 | -90/+90 | |
| | | | | llvm-svn: 100945 | |||||
* | Rename CGVtable files to CGVTables. | Anders Carlsson | 2010-04-08 | 1 | -0/+3185 | |
llvm-svn: 100778 |