Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | Remove the last remnants of the Obj-C EH stack code. | Anders Carlsson | 2009-02-10 | 1 | -1/+1 | |
| | | | | llvm-svn: 64205 | |||||
* | Add DidCallStackSave variable to CodeGenFunction. | Anders Carlsson | 2009-02-09 | 1 | -0/+1 | |
| | | | | llvm-svn: 64156 | |||||
* | Reuse case destinations. | Anders Carlsson | 2009-02-08 | 1 | -8/+27 | |
| | | | | llvm-svn: 64100 | |||||
* | Always check if we can remove branch fixups, even if the cleanup stack is empty. | Anders Carlsson | 2009-02-08 | 1 | -17/+15 | |
| | | | | llvm-svn: 64099 | |||||
* | Misc fixes to the cleanup stack code. | Anders Carlsson | 2009-02-08 | 1 | -1/+10 | |
| | | | | llvm-svn: 64096 | |||||
* | More cleanup stack work, PopCleanupBlock now returns a struct with the ↵ | Anders Carlsson | 2009-02-08 | 1 | -28/+32 | |
| | | | | | | switch block and end block. llvm-svn: 64072 | |||||
* | Split some functions up | Anders Carlsson | 2009-02-08 | 1 | -22/+38 | |
| | | | | llvm-svn: 64069 | |||||
* | CleanupScope needs to push the cleanup block in its destructor | Anders Carlsson | 2009-02-08 | 1 | -5/+1 | |
| | | | | llvm-svn: 64068 | |||||
* | Implement support for branch fixups. | Anders Carlsson | 2009-02-08 | 1 | -1/+71 | |
| | | | | llvm-svn: 64064 | |||||
* | More cleanup stack work. | Anders Carlsson | 2009-02-08 | 1 | -0/+41 | |
| | | | | llvm-svn: 64059 | |||||
* | When emitting blocks, keep track of which cleanup scope they have. Minor ↵ | Anders Carlsson | 2009-02-08 | 1 | -1/+19 | |
| | | | | | | fixes and cleanup. llvm-svn: 64053 | |||||
* | Add support for emitting cleanup blocks. Make EmitCompoundStatement emit ↵ | Anders Carlsson | 2009-02-07 | 1 | -0/+21 | |
| | | | | | | cleanup blocks if necessary llvm-svn: 64051 | |||||
* | Add plumbing for the cleanup stack. | Anders Carlsson | 2009-02-07 | 1 | -0/+9 | |
| | | | | llvm-svn: 64043 | |||||
* | Fixup goto codegen in and around VLAs. | Mike Stump | 2009-02-07 | 1 | -1/+1 | |
| | | | | llvm-svn: 64014 | |||||
* | Follow Eli's advice and store the VLA size with the native size_t type. ↵ | Anders Carlsson | 2009-02-05 | 1 | -5/+6 | |
| | | | | | | Fixes PR3491. llvm-svn: 63879 | |||||
* | Add CodeGenFunction::ConvertTypeForMem forwarding function. | Daniel Dunbar | 2009-02-03 | 1 | -0/+4 | |
| | | | | llvm-svn: 63678 | |||||
* | Thread CGFunctionInfo construction through CodeGenTypes. | Daniel Dunbar | 2009-02-02 | 1 | -1/+1 | |
| | | | | | | - Inefficient & leaks memory currently, will be cleaned up subsequently. llvm-svn: 63567 | |||||
* | More ABI API cleanup. | Daniel Dunbar | 2009-02-02 | 1 | -2/+4 | |
| | | | | | | | - Lift CGFunctionInfo creation above ReturnTypeUsesSret and EmitFunction{Epi,Pro}log. llvm-svn: 63553 | |||||
* | Pull EmitReturnBlock out of FinishFunction and catch unified return | Daniel Dunbar | 2009-01-26 | 1 | -7/+41 | |
| | | | | | | case correctly. llvm-svn: 63068 | |||||
* | Skip emission of final return block if possible (e.g., functions with | Daniel Dunbar | 2009-01-26 | 1 | -3/+7 | |
| | | | | | | a unified return). llvm-svn: 63038 | |||||
* | Slight cleanup, and fix for va_arg on architectures where va_list is a | Eli Friedman | 2009-01-20 | 1 | -0/+7 | |
| | | | | | | struct. llvm-svn: 62585 | |||||
* | Block pointer types are not aggregate types. | Daniel Dunbar | 2009-01-09 | 1 | -1/+4 | |
| | | | | llvm-svn: 61973 | |||||
* | Handle typedefs to VLAs (Emit the size expr when we encounter the typedef | Anders Carlsson | 2008-12-20 | 1 | -15/+15 | |
| | | | | llvm-svn: 61290 | |||||
* | Make sure to generate code for arguments that have a variably modified type. | Anders Carlsson | 2008-12-20 | 1 | -0/+10 | |
| | | | | llvm-svn: 61288 | |||||
* | Change EmitVLASize to take a QualType that must be a variably modified type. | Anders Carlsson | 2008-12-20 | 1 | -21/+32 | |
| | | | | | | | | | | | | Emit the size even if the declared type is a variably modified type. This lets us handle void f(int n) { int (*a)[n]; printf("size: %d\n", sizeof(*a)); } llvm-svn: 61285 | |||||
* | Split up emitting of VLA sizes and getting the size of a VLA. | Anders Carlsson | 2008-12-20 | 1 | -17/+25 | |
| | | | | llvm-svn: 61284 | |||||
* | Add map of VLA types and their sizes | Anders Carlsson | 2008-12-12 | 1 | -0/+27 | |
| | | | | llvm-svn: 60939 | |||||
* | Change more code over to using the new Expr::Evaluate | Anders Carlsson | 2008-12-01 | 1 | -6/+4 | |
| | | | | llvm-svn: 60324 | |||||
* | Rename NamedDecl::getIdentifierName() to ::getNameAsCString() and make it | Chris Lattner | 2008-11-24 | 1 | -1/+2 | |
| | | | | | | | | | assert if the name is not an identifier. Update callers to do the right thing and avoid this method in unsafe cases. This also fixes an objc warning that was missing a space, and migrates a couple more to taking IdentifierInfo and QualTypes instead of std::strings. llvm-svn: 59936 | |||||
* | An expression is not foldable if it can't be fully evaluated. Fixes PR3060 | Anders Carlsson | 2008-11-22 | 1 | -2/+4 | |
| | | | | llvm-svn: 59887 | |||||
* | Introduction the DeclarationName class, as a single, general method of | Douglas Gregor | 2008-11-17 | 1 | -1/+1 | |
| | | | | | | | | representing the names of declarations in the C family of languages. DeclarationName is used in NamedDecl to store the name of the declaration (naturally), and ObjCMethodDecl is now a NamedDecl. llvm-svn: 59441 | |||||
* | rename Expr::tryEvaluate to Expr::Evaluate. | Chris Lattner | 2008-11-16 | 1 | -1/+1 | |
| | | | | llvm-svn: 59426 | |||||
* | Normalize many BasicBlock names. | Daniel Dunbar | 2008-11-13 | 1 | -2/+2 | |
| | | | | | | | | | | - Use dotted notation for blocks related to a particular statement type. - Use .end for landing pads. No functionality change in NDEBUG mode. :) llvm-svn: 59210 | |||||
* | Quick fix for crash in IRgen when we can tryEvaluate a condition to | Daniel Dunbar | 2008-11-12 | 1 | -2/+5 | |
| | | | | | | | | | something that is not an int. - Ignore these cases for now, added FIXME that we should also boolize them. llvm-svn: 59184 | |||||
* | Handle ?: in EmitBranchOnBoolExpr. | Daniel Dunbar | 2008-11-12 | 1 | -0/+17 | |
| | | | | llvm-svn: 59129 | |||||
* | Handle Unary ! in EmitBranchOnBoolExpr, so that we can efficiently | Chris Lattner | 2008-11-12 | 1 | -1/+6 | |
| | | | | | | codegen stuff like "if (!(X && Y))" llvm-svn: 59115 | |||||
* | Move EmitBranchOnBoolExpr and ConstantFoldsToSimpleInteger to | Chris Lattner | 2008-11-12 | 1 | -0/+85 | |
| | | | | | | | | | | CodeGenFunction.cpp. Change VisitConditionalOperator to use constant fold instead of codegen'ing a constant conditional. Change ForStmt to use EmitBranchOnBoolExpr, this shrinks expr.c very slightly to 40239 lines. llvm-svn: 59113 | |||||
* | Rework IRgen invariant w.r.t. current insert point. | Daniel Dunbar | 2008-11-11 | 1 | -8/+0 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - EmitStmt is no longer required to finish with a current insertion point defined (i.e. it does not need to make dummy blocks). Instead, it can clear the insertion point in the builder which indicates that the current insertion point is unreachable. - CodeGenFunction provides HaveInsertPoint and EnsureInsertPoint which respectively test if there is an insert point and ensure an insertion point exists (by making a dummy block). - Clearly mark functions in CodeGenFunction which can be called with no insertion point defined. Currently this is a limited set, and EmitStmt simply EnsureInsertPoint()s before emitting subsequent IR. Remove EmitDummyBlock, which is no longer needed. Clients who haven't already cleared the insertion point (typically via EmitBranch) can do so by hand. Remove isDummyBlock, which has effectively been renamed to HaveInsertPoint. The main thrust of this change is that we no longer have create dummy blocks just to destroy them a short time later in EmitBlock in the common case that there is no unreachable code following something like a goto. Additionally, this means that we are not using the hokey condition in isDummyBlock that a block without a name is a dummy block. Guess how well that works when we never emit block names! llvm-svn: 59089 | |||||
* | Emit debug region end in unified return block. | Daniel Dunbar | 2008-11-11 | 1 | -6/+7 | |
| | | | | llvm-svn: 59081 | |||||
* | short circuit && and || when possible. This substantially reduces | Chris Lattner | 2008-11-11 | 1 | -0/+30 | |
| | | | | | | | | the size of the -O0 output on some cases. For example, on expr.c from 176.gcc, it shrinks the .ll file from 43164 to 42835 lines, and removed references to two external symbols. llvm-svn: 59034 | |||||
* | Remove CodeGenFunction::StartBlock. | Daniel Dunbar | 2008-11-11 | 1 | -10/+0 | |
| | | | | | | - Was confusing and only used in one small part of the code. llvm-svn: 59020 | |||||
* | Centralize basic block creation in CodeGenFunction::createBasicBlock. | Daniel Dunbar | 2008-11-11 | 1 | -5/+5 | |
| | | | | | | - No functionality change. llvm-svn: 59017 | |||||
* | Implement lowering of va_arg in clang directly. (This is 32-bit X86 only for ↵ | Anders Carlsson | 2008-11-04 | 1 | -0/+35 | |
| | | | | | | now). llvm-svn: 58681 | |||||
* | Don't run the verifier as part of IRgen, this is now down (per module) | Daniel Dunbar | 2008-10-28 | 1 | -7/+0 | |
| | | | | | | in the driver (this means we no longer run the verifier per function, however). llvm-svn: 58307 | |||||
* | Debug info bug fix, function start wasn't getting generated correctly | Daniel Dunbar | 2008-10-18 | 1 | -7/+12 | |
| | | | | | | for Obj-C methods. llvm-svn: 57769 | |||||
* | Change CGDebugInfo::setLocation to just ignore invalid locations. This | Daniel Dunbar | 2008-10-17 | 1 | -6/+2 | |
| | | | | | | | | | simplifies clients. Also, add assert that RegionStack is empty when the CGDebugInfo is destroyed. llvm-svn: 57684 | |||||
* | Simplify code to emit the unified return block and move it to the end | Daniel Dunbar | 2008-09-27 | 1 | -12/+4 | |
| | | | | | | of the function. llvm-svn: 56752 | |||||
* | Print current function on verification failures. | Daniel Dunbar | 2008-09-17 | 1 | -1/+4 | |
| | | | | llvm-svn: 56291 | |||||
* | Make sure to store the exception in the catch parameter. | Anders Carlsson | 2008-09-11 | 1 | -0/+5 | |
| | | | | llvm-svn: 56102 | |||||
* | Move ABI specific code for functions / calls to CGCall.cpp: | Daniel Dunbar | 2008-09-09 | 1 | -37/+3 | |
| | | | | | | - Factor out EmitFunction{Pro,Epi}log llvm-svn: 56031 |