- Dec 16, 2009
-
-
Bill Wendling authored
llvm-svn: 91477
-
Bill Wendling authored
llvm-svn: 91475
-
- Dec 15, 2009
-
-
Bill Wendling authored
$ svn merge -c -91161 https://llvm.org/svn/llvm-project/llvm/trunk --- Reverse-merging r91161 into '.': U lib/CodeGen/BranchFolding.cpp U lib/CodeGen/MachineBasicBlock.cpp $ svn merge -c -91113 https://llvm.org/svn/llvm-project/llvm/trunk --- Reverse-merging r91113 into '.': G lib/CodeGen/MachineBasicBlock.cpp $ svn merge -c -91101 https://llvm.org/svn/llvm-project/llvm/trunk --- Reverse-merging r91101 into '.': U include/llvm/CodeGen/MachineBasicBlock.h G lib/CodeGen/MachineBasicBlock.cpp $ svn merge -c -91092 https://llvm.org/svn/llvm-project/llvm/trunk --- Reverse-merging r91092 into '.': G include/llvm/CodeGen/MachineBasicBlock.h G lib/CodeGen/MachineBasicBlock.cpp llvm-svn: 91376
-
- Dec 11, 2009
-
-
Bill Wendling authored
branches only to a landing pad. Without this check, the compiler would go into an infinite loop because the branch to a landing pad is an "abnormal" edge which wasn't being taken into account. This is the meat of that fix: if (!PrevBB.canFallThrough() && !MBB->BranchesToLandingPad(MBB)) { The other stuff is simplification of the "branches to a landing pad" code. llvm-svn: 91161
-
- Dec 05, 2009
-
-
Dan Gohman authored
MachineBasicBlock::canFallThrough(), which is target-independent and more thorough. llvm-svn: 90634
-
- Dec 03, 2009
-
-
Chris Lattner authored
Patch by Howard Hinnant! llvm-svn: 90365
-
- Nov 26, 2009
-
-
Bob Wilson authored
running tail duplication when doing branch folding for if-conversion, and we also want to be able to run tail duplication earlier to fix some reg alloc problems. Move the CanFallThrough function from BranchFolding to MachineBasicBlock so that it can be shared by TailDuplication. llvm-svn: 89904
-
- Nov 25, 2009
-
-
Bob Wilson authored
Make tail duplication of indirect branches much more aggressive (for targets that indicate that it is profitable), based on further experience with this transformation. I compiled 3 large applications with and without this more aggressive tail duplication and measured minimal changes in code size. ("size" on Darwin seems to round the text size up to the nearest page boundary, so I can only say that any code size increase was less than one 4k page.) Radar 7421267. llvm-svn: 89814
-
- Nov 19, 2009
-
-
Bob Wilson authored
llvm-svn: 89275
-
- Nov 18, 2009
-
-
Bob Wilson authored
the tail of a block may make that block a new candidate for duplication. llvm-svn: 89264
-
Bob Wilson authored
llvm-svn: 89254
-
Bob Wilson authored
llvm-svn: 89225
-
Bob Wilson authored
contents of the block to be duplicated. Use this for ARM Cortex A8/9 to be more aggressive tail duplicating indirect branches, since it makes it much more likely that they will be predicted in the branch target buffer. Testcase coming soon. llvm-svn: 89187
-
- Nov 17, 2009
-
-
Bob Wilson authored
unnecessary. It is broken because the "isIdenticalTo" check should be negated. If that is fixed, this code causes the CodeGen/X86/tail-opts.ll test to fail, in the dont_merge_oddly function. And, I confirmed that the regression is real -- the generated code is worse. As far as I can tell, that tail-opts.ll test is checking for what this code is supposed to handle and we're doing the right thing anyway. llvm-svn: 89121
-
Dan Gohman authored
llvm-svn: 89114
-
Bob Wilson authored
folding optimizations. llvm-svn: 89109
-
Bob Wilson authored
It was too difficult to keep the heuristics for merging and duplication consistent. llvm-svn: 89105
-
- Nov 16, 2009
-
-
Bob Wilson authored
llvm-svn: 88940
-
Bob Wilson authored
llvm-svn: 88932
-
Bob Wilson authored
llvm-svn: 88929
-
Bob Wilson authored
llvm-svn: 88927
-
- Nov 13, 2009
-
-
Dan Gohman authored
code-size win, and not when it's only likely to be code-size neutral, such as when only a single instruction would be eliminated and a new branch would be required. This fixes rdar://7392894. llvm-svn: 88692
-
- Nov 12, 2009
-
-
Dan Gohman authored
llvm-svn: 86928
-
Dan Gohman authored
llvm-svn: 86926
-
Dan Gohman authored
can be made to fall through into the other. llvm-svn: 86909
-
- Nov 11, 2009
-
-
Dan Gohman authored
instead of typedefs for std::pair. This simplifies the type of SameTails, which previously was std::vector<std::pair<std::vector<std::pair<unsigned, MachineBasicBlock *> >::iterator, MachineBasicBlock::iterator> llvm-svn: 86885
-
Dan Gohman authored
llvm-svn: 86875
-
Dan Gohman authored
tail merging support to handle more cases. - Recognize several cases where tail merging is beneficial even when the tail size is smaller than the generic threshold. - Make use of MachineInstrDesc::isBarrier to help detect non-fallthrough blocks. - Check for and avoid disrupting fall-through edges in more cases. llvm-svn: 86871
-
Dan Gohman authored
llvm-svn: 86856
-
Dan Gohman authored
llvm-svn: 86855
-
Dan Gohman authored
the numbers mean. llvm-svn: 86854
-
Dan Gohman authored
llvm-svn: 86853
-
- Nov 10, 2009
-
-
Dan Gohman authored
llvm-svn: 86642
-
Dan Gohman authored
llvm-svn: 86641
-
- Nov 04, 2009
-
-
Bob Wilson authored
an unconditional branch (possibly from tail merging), this code is trying to redirect all of its predecessors to go directly to the branch target, but that isn't feasible for indirect branches. The other predecessors (that don't end with indirect branches) could theoretically still be handled, but that is not easily done right now. The AnalyzeBranch interface doesn't currently let us distinguish jump table branches from indirect branches, and this code is currently handling jump tables. To avoid punting on address-taken blocks, we would have to give up handling jump tables. That seems like a bad tradeoff. llvm-svn: 85975
-
- Oct 30, 2009
-
-
Dan Gohman authored
llvm-svn: 85572
-
- Oct 29, 2009
-
-
Bob Wilson authored
llvm-svn: 85519
-
- Oct 28, 2009
-
-
Bob Wilson authored
common tail, except when the OptimizeForSize function attribute is present. Radar 7338114. llvm-svn: 85441
-
Bob Wilson authored
I'm going to redo this using the OptimizeForSize function attribute. llvm-svn: 85426
-
Bob Wilson authored
use it to control tail merging when there is a tradeoff between performance and code size. When there is only 1 instruction in the common tail, we have been merging. That can be good for code size but is a definite loss for performance. Now we will avoid tail merging in that case when the optimization level is "Aggressive", i.e., "-O3". Radar 7338114. Since the IfConversion pass invokes BranchFolding, it too needs to know the optimization level. Note that I removed the RegisterPass instantiation for IfConversion because it required a default constructor. If someone wants to keep that for some reason, we can add a default constructor with a hard-wired optimization level. llvm-svn: 85346
-