- Nov 18, 2009
-
-
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
-
- Oct 22, 2009
-
-
Dan Gohman authored
to break up CFG diamonds by banishing one of the blocks to the end of the function, which is bad for code density and branch size. This does pessimize MultiSource/Benchmarks/Ptrdist/yacr2, the benchmark cited as the reason for the change, however I've examined the code and it looks more like a case of gaming a particular branch than of being generally applicable. llvm-svn: 84803
-
- Sep 04, 2009
-
-
Evan Cheng authored
llvm-svn: 80994
-
Evan Cheng authored
llvm-svn: 80971
-
- Aug 22, 2009
-
-
Bill Wendling authored
llvm-svn: 79747
-
- Aug 18, 2009
-
-
Dan Gohman authored
remove RemoveDuplicateSuccessor, as it is no longer necessary, and because it breaks assumptions made in MachineBasicBlock::isOnlyReachableByFallthrough. Convert test/CodeGen/X86/omit-label.ll to FileCheck and add a testcase for PR4732. test/CodeGen/Thumb2/thumb2-ifcvt2.ll sees a diff with this commit due to it being bugpoint-reduced to the point where it doesn't matter what the condition for the branch is. Add some more interesting code to test/CodeGen/X86/2009-08-06-branchfolder-crash.ll, which is the testcase that originally motivated the RemoveDuplicateSuccessor code, to help verify that the original problem isn't being re-broken. llvm-svn: 79338
-
- Aug 07, 2009
-
-
Dale Johannesen authored
preference; no functional change. llvm-svn: 78391
-
Dale Johannesen authored
produced a CFG it wasn't prepared for. llvm-svn: 78351
-
- Jul 14, 2009
-
-
Torok Edwin authored
This adds location info for all llvm_unreachable calls (which is a macro now) in !NDEBUG builds. In NDEBUG builds location info and the message is off (it only prints "UREACHABLE executed"). llvm-svn: 75640
-
- Jul 11, 2009
-
-
Torok Edwin authored
Make llvm_unreachable take an optional string, thus moving the cerr<< out of line. LLVM_UNREACHABLE is now a simple wrapper that makes the message go away for NDEBUG builds. llvm-svn: 75379
-
- May 11, 2009
-
-
Dale Johannesen authored
sucessor info. llvm-svn: 71478
-
- Feb 09, 2009
-
-
Evan Cheng authored
suprise to some callers, e.g. register coalescer. For now, add an parameter that tells AnalyzeBranch whether it's safe to modify the mbb. A better solution is out there, but I don't have time to deal with it right now. llvm-svn: 64124
-
- Jan 28, 2009
-
-
Duncan Sands authored
llvm-svn: 63198
-