aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen
AgeCommit message (Collapse)Author
2010-02-17Handle primary bases in AddVCallOffsets.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96461 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-17Silence GCC warning by marking an assert-only variable as unused.Chandler Carruth
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96459 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-17First cut at emitting vcall offsets.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96455 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-17Emit complete constructors and destructors as aliases to base constructorsJohn McCall
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96451 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-17Pass through whether a base is virtual or not.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96449 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-17implement EmitVAArg. pretty much the same way other targets do.Sanjiv Gupta
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96446 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-17Correctly calculate base offsets for 'this' pointer adjustments involving ↵Anders Carlsson
virtual bases. This can't be tested yet due to lack of vcall offsets :) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96441 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-16IRgen optimization: cache the value of 'this' and 'vtt' instead ofJohn McCall
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). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96403 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-16Distinguish two lexical blocks at the same level.Devang Patel
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96397 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-16IRgen: Switch 'retval' to use CreateIRTemp.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96376 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-16IRgen: Add CreateIRTemp, which creates a temporary alloca but with type ↵Daniel Dunbar
converted "not-for-memory". Dunno a better name. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96374 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-16IRgen: Switch EmitCompoundLiteralLValue to use CreateMemTemp.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96373 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-16Handle layout of vtables for virtual bases.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96355 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-16Move some code around in preparation for virtual base vtables.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96354 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-16Fix a bug where we would not emit secondary vtables for bases of a primary base.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96351 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-16Emit vbase offsets.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96329 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-16More work on the new layout code.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96328 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-16When emitting complete destructors for classes with virtual bases, computeJohn McCall
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96327 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-15Use getLocStart(), instead of getLocEnd(), to record starting location of ↵Devang Patel
objc method. :) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96245 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-15Uniformize the names of type predicates: rather than having isFloatTy andDuncan Sands
isInteger, we now have isFloatTy and isIntegerTy. Requested by Chris! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96224 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-15When emitting an aggregate into a temporary, make sure we set the alignmentJohn McCall
on the alloca. The fact that codegen makes this class of bug so wonderfully easy to make is embarrassing. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96204 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-14Don't compute final overriders or build vtables for bases that don't need a ↵Anders Carlsson
vtable. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96171 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-14Build fix.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96140 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-14Baby steps towards teaching FinalOverriders about virtual bases.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96139 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-14Don't try to layout construction vtables for now.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96138 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-14Improve support for non-virtual 'this' pointer adjustments. With this, it ↵Anders Carlsson
should be possible to use the new vtable layout code for all class hierarchies that do not involve virtual bases. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96137 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-13Add basic support for simple non-virtual 'this' pointer adjustments.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96136 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-13Add support for very simple non-virtual this adjustments in the ↵Anders Carlsson
FinalOverriders class. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96133 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-13Cleanup; remove some duplicated code.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96131 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-13Assert if we encounter this adjustments.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96125 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-13Start laying out secondary vtables.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96123 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-13Merge base offsets and dump them.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96121 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-13Don't make return adjustments for pure virtual member functions.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96120 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-13Handle virtual bases in return adjustment types.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96119 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-13Handle virtual bases in ComputeBaseOffset.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96117 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-13More work on covariant return types. We now handle non-virtual adjustments fine.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96114 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-13Emit the 'alignstack' LLVM function attribute when we encounter a functionCharles Davis
marked 'force_align_arg_pointer'. Almost there; now all I need to do is finish up the backend. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96100 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-13Fix think-o, attributes can't come *within* the type of the variable.Chandler Carruth
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96099 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-13Silence unused variable warning in a build without assertions.Chandler Carruth
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96098 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-13Remove dead {include, semicolon, variable}.Benjamin Kramer
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96087 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-13Use a different name for this iterator. MSVC and clang++ didn't like "I" in ↵Benjamin Kramer
the same scope twice. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96086 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-13More work on return type adjustments in the new vtable builder.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96070 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-13Switch the standard DeclarationName comparator to be a tri-valued comparator.John McCall
Use that while fixing a nasty misuse of qsort in vtable codegen which, somehow, has not actually caused a crash. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96062 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-13if-0 out printf.Eli Friedman
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96052 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-12Fix a refacto that broke the clang-on-clang build.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95994 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-12Start stubbing out more of the covariant thunk support.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95990 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-12Keep track of whether a final overrider needs a return type adjustment.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95985 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-12Move overrider out into a separate struct.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95984 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-12Keep track of the address points for all primary bases, and add the ability ↵Anders Carlsson
to dump multiple address points for a single offset. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95970 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-12Fix a bug causing an assertion when a covariant return type differed fromJohn McCall
an overriden type only by reduced qualification. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95968 91177308-0d34-0410-b5e6-96231b3b80d8