aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen
AgeCommit message (Collapse)Author
2009-06-03Move code generation of C++ temporaries into a new file.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72792 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-02Add support for __builtin_unwind_init.Eli Friedman
Also, committing an #if 0'ed __builtin_setjmp and __builtin_longjmp implementation I've had sitting in my tree for a while. I haven't enabled it because the LLVM backend support isn't complete yet. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72727 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-02If we recognize alloca, treat it as a builtin. This fixes uses of Eli Friedman
alloca without declaring it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72719 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-01A corner case of objc2 gc's write-barrier generationFariborz Jahanian
for the Next runtime. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72703 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-01PR4289: Make sure "&func" has the right LLVM type when "func" is a Eli Friedman
K&R-style definition. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72690 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-01Fix a thinko.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72679 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-01Check for null correctly for new expressions.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72678 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-31Improve irgen of 'new' further.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72677 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-31...and aggregate POD types.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72676 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-31Support for complex types.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72675 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-31Better support for scalar POD types in 'new' expressions.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72674 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-31Very basic irgen support for new expressions.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72672 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-31Don't try to call getFileCharacteristic if the function declaration has an ↵Anders Carlsson
invalid source location (as is the case for the global allocation functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72671 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-31Add a new function for emitting new functions.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72656 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-31Emit destructors correctly for temporaries.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72655 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-31When possible, don't emit the cleanup block. Instead, just move the ↵Anders Carlsson
instructions to the current block. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72654 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-31Implement VisitCXXExprWithTemporaries for complex expressions.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72653 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-31Call EmitCXXExprWithTemporaries.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72652 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-30Add lvalue irgen support for CXXBindTemporaryExpr.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72649 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-30More temporary support.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72648 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-30Some small fixes for fields of reference type.Eli Friedman
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72636 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-30Remove VarDecl from CXXConstructExpr.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72633 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-29Add code for emitting C++ destructors. Not used yet.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72591 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-29Create a new PrintingPolicy class, which we pass down through the ASTDouglas Gregor
printing logic to help customize the output. For now, we use this rather than a special flag to suppress the "struct" when printing "struct X" and to print the Boolean type as "bool" in C++ but "_Bool" in C. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72590 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-29Re-add a slightly more general version of the check from r72578; it is Eli Friedman
actually necessary in some obscure cases. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72585 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-29Oops, the testcase I was thinking of is supposed to error out. IMike Stump
tried other things that might trip, but they all worked. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72584 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-29Fixup codegen for composition of vla types using a normal array type.Mike Stump
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72578 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-29Fixup the rest of the trivial cases of the codegen of volatile. IfMike Stump
any body can spot codegen bugs with volatile, or knows of any in the bug database, let me know. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72572 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-28PR4281: Fix bogus CodeGen assertion. The issue is that Eli Friedman
getUnqualifiedType() doesn't strip off all qualifiers for non-canonical types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72552 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-28Not setting all the fields is confusing...Mike Stump
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72506 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-27Fix a use-of-undefined, IRgen expects the RValue for "void" to be a scalar ↵Daniel Dunbar
RValue. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72504 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-27No write-barrier for initializations.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72492 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-27Change a confusing variable name.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72491 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-27IRgen support for calls to functions that return references to aggregate ↵Anders Carlsson
exressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72479 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-27Fix up constant expression handling to deal with the address Eli Friedman
of a reference correctly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72463 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-27Add IRGen support for local variables of reference type.Eli Friedman
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72462 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-27Add IRGen support for return statements in functions with reference Eli Friedman
type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72459 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-27Handle operator call expressions where the callee is a member function.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72458 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-27Functions that return references can be rvalues as well.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72457 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-27Add support for emitting calls to functions that return references (as ↵Anders Carlsson
lvalues only for now) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72449 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-27Fix typo. I also fixed the hard to read case differences, so that noMike Stump
one else is tempted to copy the style, incorrectly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72448 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-27Rename an EmitCallExpr function to EmitCall to make it clear that it doesn't ↵Anders Carlsson
emit an expr. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72446 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-26Fixup codegen for volatile structs in the trivial cases (a a=a and a=a=a).Mike Stump
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72439 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-26Use .data() instead of &...[0].Daniel Dunbar
- Just SmallVectors this time. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72432 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-26Esnure that if we have a volatile structure as the destination, thatMike Stump
we actually have a destination. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72429 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-26When trying to pass an argument on the stack, assume LLVM will do the rightDaniel Dunbar
thing for non-aggregate types. - Otherwise we unnecessarily pin values to the stack and currently end up triggering a backend bug in one case. - This loose cooperation with LLVM to implement the ABI is pretty ugly. - <rdar://problem/6918722> [irgen] clang miscompile of many pointer varargs on x86-64 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72419 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-26Handle the edge case of a weak function with incomplete type correctly. Eli Friedman
Found by code inspection; I haven't seen this in real-world code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72408 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-23Propagate volatile for implicit property refernces.Mike Stump
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72353 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-23Propagate volatile around for property references.Mike Stump
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72352 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-23Track volatile aggregate copies better. I'm hoping someone else will decideMike Stump
how to get the backend to know that the operation is volatile. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72348 91177308-0d34-0410-b5e6-96231b3b80d8