Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | teach ipsccp and ipconstprop that a blockaddress doesn't 'take the address' ↵ | Chris Lattner | 2009-11-01 | 2 | -2/+7 |
| | | | | | | | | | of a function in a way that should prevent ip constprop. This allows clang/test/CodeGen/indirect-goto.c to pass with the new indirect goto lowering. llvm-svn: 85709 | ||||
* | change llvm::MergeBlockIntoPredecessor to not merge two blocks BB1->BB2 | Chris Lattner | 2009-11-01 | 1 | -3/+7 |
| | | | | | | | | | when BB2 has its address taken. Since it ends up doing BB2->rauw(BB1), this can cause the address of the entry block to be taken. Since it is generally undesirable to nuke blocks whose address is taken, even when we can, just unconditionally stop this xform. llvm-svn: 85708 | ||||
* | strengthen an assumption: RevectorBlockTo knows that PredBB | Chris Lattner | 2009-11-01 | 1 | -12/+14 |
| | | | | | | | | ended in an uncond branch because the pass requires BreakCriticalEdges. However, BCE doesn't eliminate critical adges from indbrs. llvm-svn: 85707 | ||||
* | if CostMetrics says to never duplicate some code, don't unswitch a loop. | Chris Lattner | 2009-11-01 | 1 | -1/+2 |
| | | | | | | This prevents unswitching from duplicating indbr's. llvm-svn: 85705 | ||||
* | constant fold indirectbr(blockaddress(%bb)) -> br label %bb. | Chris Lattner | 2009-11-01 | 1 | -9/+46 |
| | | | | llvm-svn: 85704 | ||||
* | Revert 85678/85680. The decision is to stay with the current form of | Chris Lattner | 2009-11-01 | 2 | -8/+4 |
| | | | | | | | indirectbr, thus we don't need "blockaddr(@func, null)". Eliminate it for simplicity. llvm-svn: 85699 | ||||
* | Make sure PRE doesn't split crit edges from indirectbr. | Chris Lattner | 2009-10-31 | 1 | -1/+5 |
| | | | | llvm-svn: 85692 | ||||
* | llvm::SplitEdge should refuse to split an edge from an indirectbr. | Chris Lattner | 2009-10-31 | 2 | -1/+4 |
| | | | | | | Fix CodeGenPrepare to not try to split edges from indirectbr. llvm-svn: 85690 | ||||
* | update the comment above llvm::SplitCriticalEdge, and make | Chris Lattner | 2009-10-31 | 1 | -6/+21 |
| | | | | | | it abort on IndirectBrInst as describe in the comment. llvm-svn: 85688 | ||||
* | adjust a couple xforms to work with null bb's in BlockAddress. | Chris Lattner | 2009-10-31 | 2 | -4/+8 |
| | | | | llvm-svn: 85680 | ||||
* | add a comment. | Chris Lattner | 2009-10-31 | 1 | -0/+4 |
| | | | | llvm-svn: 85671 | ||||
* | Revert r85667. LoopUnroll currently can't call utility functions which | Dan Gohman | 2009-10-31 | 2 | -24/+94 |
| | | | | | | | auto-update the DominatorTree because it doesn't keep the DominatorTree current while it works. llvm-svn: 85670 | ||||
* | Remove redundant code. | Dan Gohman | 2009-10-31 | 1 | -3/+0 |
| | | | | llvm-svn: 85668 | ||||
* | Merge the enhancements from LoopUnroll's FoldBlockIntoPredecessor into | Dan Gohman | 2009-10-31 | 2 | -94/+24 |
| | | | | | | | MergeBlockIntoPredecessor. This makes SimplifyCFG slightly more aggressive, and makes it unnecessary for LoopUnroll to have its own copy of this code. llvm-svn: 85667 | ||||
* | Rename forgetLoopBackedgeTakenCount to forgetLoop, because it | Dan Gohman | 2009-10-31 | 3 | -3/+3 |
| | | | | | | clears out more information than just the stored backedge taken count. llvm-svn: 85664 | ||||
* | Replace LoopUnrollPass.cpp's custom code-size estimation code using | Dan Gohman | 2009-10-31 | 1 | -30/+5 |
| | | | | | | the new common CodeMetrics code. llvm-svn: 85663 | ||||
* | Simplify this code. | Dan Gohman | 2009-10-31 | 1 | -2/+2 |
| | | | | llvm-svn: 85662 | ||||
* | Remove an unnecessary #include. | Dan Gohman | 2009-10-31 | 1 | -1/+0 |
| | | | | llvm-svn: 85661 | ||||
* | Update CMakeLists for recent renames. | Dan Gohman | 2009-10-31 | 2 | -2/+2 |
| | | | | llvm-svn: 85660 | ||||
* | Rename UnrollLoop.cpp to LoopUnroll.cpp, and LoopUnroll.cpp to | Dan Gohman | 2009-10-31 | 2 | -0/+0 |
| | | | | | | | LoopUnrollPass.cpp, for consistency with other passes which are similarly split. llvm-svn: 85659 | ||||
* | Remove CodeGenLICM. It's largely obsoleted by MachineLICM's new ability | Dan Gohman | 2009-10-31 | 2 | -113/+0 |
| | | | | | | to unfold loop-invariant loads. llvm-svn: 85657 | ||||
* | Reapply r85634, with the bug fixed. | Dan Gohman | 2009-10-31 | 1 | -15/+17 |
| | | | | llvm-svn: 85655 | ||||
* | Revert 85634. It's breaking consumer-typeset (and others). | Evan Cheng | 2009-10-31 | 1 | -17/+15 |
| | | | | llvm-svn: 85641 | ||||
* | Add a comment about a missed opportunity. | Dan Gohman | 2009-10-30 | 1 | -0/+5 |
| | | | | llvm-svn: 85635 | ||||
* | Optimize around the fact that pred_iterator is slow: instead of sorting | Dan Gohman | 2009-10-30 | 1 | -15/+17 |
| | | | | | | | PHI operands by the predecessor order, sort them by the order used by the first PHI in the block. This is still suffucient to expose duplicates. llvm-svn: 85634 | ||||
* | Teach SimplifyCFG how to eliminate duplicate PHI nodes within a block. | Dan Gohman | 2009-10-30 | 1 | -0/+61 |
| | | | | | | | This reduces codesize on a variety of codes by 1-2% on x86-64. It also helps clean up after SSAUpdater. llvm-svn: 85626 | ||||
* | Sort the incoming values in PHI nodes to match the predecessor order. | Dan Gohman | 2009-10-30 | 1 | -0/+19 |
| | | | | | | | This helps expose duplicate PHIs, which will make it easier for them to be eliminated. llvm-svn: 85623 | ||||
* | Add option to createGVNPass to disable PRE. | Evan Cheng | 2009-10-30 | 1 | -2/+3 |
| | | | | llvm-svn: 85609 | ||||
* | Apply some cleanups. No functionality changes. | Nick Lewycky | 2009-10-29 | 1 | -27/+23 |
| | | | | llvm-svn: 85498 | ||||
* | just for the hell of it, allow globalopt to statically evaluate | Chris Lattner | 2009-10-29 | 1 | -0/+6 |
| | | | | | | static constructors with indirect gotos :) llvm-svn: 85495 | ||||
* | teach various passes about blockaddress. We no longer | Chris Lattner | 2009-10-29 | 3 | -33/+57 |
| | | | | | | crash on any clang tests. llvm-svn: 85465 | ||||
* | teach ValueMapper about BlockAddress', making bugpoint a lot more useful. | Chris Lattner | 2009-10-29 | 1 | -7/+10 |
| | | | | llvm-svn: 85458 | ||||
* | unindent massive blocks, no functionality change. | Chris Lattner | 2009-10-29 | 1 | -69/+75 |
| | | | | llvm-svn: 85457 | ||||
* | Extend getMallocArraySize() to determine the array size if the malloc ↵ | Victor Hernandez | 2009-10-28 | 1 | -11/+9 |
| | | | | | | | | | | | | | | argument is: ArraySize * ElementSize ElementSize * ArraySize ArraySize << log2(ElementSize) ElementSize << log2(ArraySize) Refactor isArrayMallocHelper and delete isSafeToGetMallocArraySize, so that there is only 1 copy of the malloc array determining logic. Update users of getMallocArraySize() to not bother calling isArrayMalloc() as well. llvm-svn: 85421 | ||||
* | llvm.dbg.global_variables do not exist anymore. | Devang Patel | 2009-10-28 | 1 | -9/+0 |
| | | | | llvm-svn: 85402 | ||||
* | No newline at end of file. | Edward O'Callaghan | 2009-10-28 | 1 | -1/+1 |
| | | | | llvm-svn: 85390 | ||||
* | Update CMake file. | Benjamin Kramer | 2009-10-28 | 1 | -0/+1 |
| | | | | llvm-svn: 85389 | ||||
* | Treat lifetime begin/end markers as allocations/frees respectively for the | Owen Anderson | 2009-10-28 | 2 | -0/+41 |
| | | | | | | purposes for GVN/DSE. llvm-svn: 85383 | ||||
* | Add ABCD, a generalized implementation of the Elimination of Array Bounds | Nick Lewycky | 2009-10-28 | 1 | -0/+1108 |
| | | | | | | | | Checks on Demand algorithm which looks at arbitrary branches instead of loop iterations. This is GSoC work by Andre Tavares with only editorial changes applied! llvm-svn: 85382 | ||||
* | Previously, all operands to Constant were themselves constant. | Chris Lattner | 2009-10-28 | 1 | -5/+4 |
| | | | | | | | | | In the new world order, BlockAddress can have a BasicBlock operand. This doesn't permute much, because if you have a ConstantExpr (or anything more specific than Constant) we still know the operand has to be a Constant. llvm-svn: 85375 | ||||
* | Factor out redundancy from clone() implementations. | Devang Patel | 2009-10-27 | 2 | -2/+2 |
| | | | | llvm-svn: 85327 | ||||
* | Rename MallocFreeHelper as MemoryBuiltins | Victor Hernandez | 2009-10-27 | 7 | -7/+7 |
| | | | | llvm-svn: 85286 | ||||
* | Fix a pretty serious misfeature of the inliner: if it inlines a function | Chris Lattner | 2009-10-27 | 1 | -0/+9 |
| | | | | | | | | | | with multiple return values it inserts a PHI to merge them all together. However, if the return values are all the same, it ends up with a pointless PHI and this pointless PHI happens to really block SRoA from happening in at least a silly C++ example written by Doug, but probably others. This fixes rdar://7339069. llvm-svn: 85206 | ||||
* | VS build fix, patch by Marius Wachtler. | Mike Stump | 2009-10-27 | 1 | -0/+1 |
| | | | | llvm-svn: 85197 | ||||
* | Add objectsize intrinsic and hook it up through codegen. Doesn't | Eric Christopher | 2009-10-27 | 1 | -0/+25 |
| | | | | | | do anything than return "I don't know" at the moment. llvm-svn: 85189 | ||||
* | Add braces to avoid ambiguous else. | Dan Gohman | 2009-10-27 | 1 | -1/+2 |
| | | | | llvm-svn: 85185 | ||||
* | Rename MallocHelper as MallocFreeHelper, since it now also identifies calls ↵ | Victor Hernandez | 2009-10-26 | 7 | -7/+7 |
| | | | | | | to free() llvm-svn: 85181 | ||||
* | Add a straight-forward implementation of SCCVN for aggressively eliminating ↵ | Owen Anderson | 2009-10-26 | 1 | -0/+721 |
| | | | | | | scalar redundancies. llvm-svn: 85179 | ||||
* | Remove FreeInst. | Victor Hernandez | 2009-10-26 | 9 | -183/+7 |
| | | | | | | | Remove LowerAllocations pass. Update some more passes to treate free calls just like they were treating FreeInst. llvm-svn: 85176 | ||||
* | Simplify this code. LoopDeletion doesn't need to explicit check that | Dan Gohman | 2009-10-26 | 1 | -24/+2 |
| | | | | | | | the loop exiting block dominates the latch block; if ScalarEvolution can prove that the trip-count is finite, that's sufficient. llvm-svn: 85165 |