- Jun 21, 2011
-
-
Chad Rosier authored
llvm-svn: 133499
-
- Jun 20, 2011
-
-
Jay Foad authored
Change PHINodes to store simple pointers to their incoming basic blocks, instead of full-blown Uses. Note that this loses an optimization in SplitCriticalEdge(), because we can no longer walk the use list of a BasicBlock to find phi nodes. See the comment I removed starting "However, the foreach loop is slow for blocks with lots of predecessors". Extend replaceAllUsesWith() on a BasicBlock to also update any phi nodes in the block's successors. This mimics what would have happened when PHINodes were proper Users of their incoming blocks. (Note that this only works if OldBB->replaceAllUsesWith(NewBB) is called when OldBB still has a terminator instruction, so it still has some successors.) llvm-svn: 133435
-
- Jun 18, 2011
-
-
Hans Wennborg authored
In cases such as the attached test, where the case value for a switch destination is used in a phi node that follows the destination, it might be better to replace that value with the condition value of the switch, so that more blocks can be folded away with TryToSimplifyUncondBranchFromEmptyBlock because there are less conflicts in the phi node. llvm-svn: 133344
-
- Jun 17, 2011
-
-
Devang Patel authored
llvm-svn: 133298
-
Nick Lewycky authored
llvm-svn: 133251
-
- Jun 15, 2011
-
-
Eli Friedman authored
llvm-svn: 133086
-
Rafael Espindola authored
llvm-svn: 133085
-
Eli Friedman authored
llvm-svn: 133078
-
- Jun 14, 2011
-
-
John McCall authored
line info correctly. llvm-svn: 132961
-
Nick Lewycky authored
llvm-svn: 132954
-
- Jun 13, 2011
-
-
Nick Lewycky authored
intrinsics. In fact, we'll optimize a bitcast to that when possible. Detect it when looking for the lifetime intrinsics. No test case, noticed by inspection. llvm-svn: 132906
-
- Jun 09, 2011
-
-
John McCall authored
pad, separating the exception and selector calls from the new lpad. Teaching it not to do that, or to properly adjust the CFG afterwards, is out of scope because it would require the other edges to the landing pad to be split as well (effectively). Instead, just recover from the most likely cases during inlining. The best long-term solution is to change the exception representation and commit to either requiring or not requiring the more complex edge-splitting logic; this is just a shorter-term hack. llvm-svn: 132799
-
John McCall authored
llvm-svn: 132797
-
- Jun 04, 2011
-
-
Bill Wendling authored
then we don't want to set the destination in the indirect branch to the destination. This is because the indirect branch needs its destinations to have had their block addresses taken. This isn't so of the new critical edge that's split during this process. If it turns out that the destination block has only one predecessor, and that being a BB with an indirect branch, then it won't be marked as 'used' and may be removed. PR10072 llvm-svn: 132638
-
- Jun 01, 2011
-
-
John McCall authored
landing pad, forward llvm.eh.resume calls to it instead of turning them invalidly into invokes. llvm-svn: 132382
-
- May 29, 2011
-
-
John McCall authored
fixes self-host. llvm-svn: 132275
-
- May 28, 2011
-
-
John McCall authored
transformed by the inliner into a branch to the enclosing landing pad (when inlined through an invoke). If not so optimized, it is lowered DWARF EH preparation into a call to _Unwind_Resume (or _Unwind_SjLj_Resume as appropriate). Its chief advantage is that it takes both the exception value and the selector value as arguments, meaning that there is zero effort in recovering these; however, the frontend is required to pass these down, which is not actually particularly difficult. Also document the behavior of landing pads a bit better, and make it clearer that it's okay that personality functions don't always land at landing pads. This is just a fact of life. Don't write optimizations that rely on pushing things over an unwind edge. llvm-svn: 132253
-
- May 27, 2011
-
-
John McCall authored
- the selector for the landing pad must provide all available information about the handlers, filters, and cleanups within that landing pad - calls to _Unwind_Resume must be converted to branches to the enclosing lpad so as to avoid re-entering the unwinder when the lpad claimed it was going to handle the exception in some way This is quite specific to libUnwind-based unwinding. In an effort to not interfere too badly with other unwinders, and with existing hacks in frontends, this only triggers on _Unwind_Resume (not _Unwind_Resume_or_Rethrow) and does nothing with selectors if it cannot find a selector call for either lpad. llvm-svn: 132200
-
Eli Friedman authored
One more debug line number miss in instcombine (although the code in question isn't actually in instcombine). llvm-svn: 132170
-
- May 24, 2011
-
-
Cameron Zwarich authored
llvm-svn: 131956
-
Cameron Zwarich authored
promoting allocas to SSA variables. Fixes <rdar://problem/9479036>. llvm-svn: 131953
-
- May 22, 2011
-
-
Frits van Bommel authored
Add a parameter to ConstantFoldTerminator() that callers can use to ask it to also clean up the condition of any conditional terminator it folds to be unconditional, if that turns the condition into dead code. This just means it calls RecursivelyDeleteTriviallyDeadInstructions() in strategic spots. It defaults to the old behavior. I also changed -simplifycfg, -jump-threading and -codegenprepare to use this to produce slightly better code without any extra cleanup passes (AFAICT this was the only place in -simplifycfg where now-dead conditions of replaced terminators weren't being cleaned up). The only other user of this function is -sccp, but I didn't read that thoroughly enough to figure out whether it might be holding pointers to instructions that could be deleted by this. llvm-svn: 131855
-
Nick Lewycky authored
of the inlinee to the code representing the original function. llvm-svn: 131838
-
- May 19, 2011
-
-
Devang Patel authored
Reapply r131605. This time with a fix, which is to use NoFolder. llvm-svn: 131673
-
Rafael Espindola authored
llvm-svn: 131620
-
Devang Patel authored
llvm-svn: 131609
-
Devang Patel authored
llvm-svn: 131607
-
Devang Patel authored
llvm-svn: 131605
-
Devang Patel authored
llvm-svn: 131598
-
- May 18, 2011
-
-
Devang Patel authored
llvm-svn: 131580
-
Devang Patel authored
llvm-svn: 131571
-
Devang Patel authored
llvm-svn: 131566
-
Devang Patel authored
llvm-svn: 131561
-
Devang Patel authored
llvm-svn: 131552
-
Devang Patel authored
llvm-svn: 131551
-
Devang Patel authored
llvm-svn: 131548
-
Devang Patel authored
llvm-svn: 131545
-
Matt Beaumont-Gay authored
llvm-svn: 131543
-
Devang Patel authored
llvm-svn: 131541
-
Devang Patel authored
llvm-svn: 131508
-