Dale Johannesen
2008-Oct-27 02:39 UTC
[LLVMdev] Fwd: [llvm-commits] [llvm] r58225 - /llvm/trunk/lib/CodeGen/BranchFolding.cpp
Begin forwarded message:> > Increase default setting of tail-merge-threshold to > 150, based on llvm-test measurements. > > static cl::opt<unsigned> > TailMergeThreshold("tail-merge-threshold", > cl::desc("Max number of predecessors to consider tail > merging"), > - cl::init(100), cl::Hidden); > + cl::init(150), cl::Hidden); > > namespace {(Background: this threshold limits the number of predecessors a block can have when trying to tail merge, for reasons of compile speed.) In case anyone cares what the measurements are: The old threshold, 100, was exceeded in 9 of the llvm tests. With the higher threshold none of these takes more than 1.1 second extra to go through llc, and the pass removes from roughly 300 to 1000 extra instructions (this count includes labels). I was hoping to get rid of this threshold entirely, after rewriting the algorithm a while back, but we aren't there yet. It does seem to be true that higher compile times are associated with removing large numbers of instructions, rather than with simply comparing tails, so I think the rewrite (which addressed a poor algorithm for comparing large numbers of tails) was a success, but there might be something to do down in the machinery that removes instructions. The most extreme time is on 'kc', which takes a 25% hit when the threshold is disabled, but also removes 4200 extra instructions. Might be worth it -O3.
Seemingly Similar Threads
- [LLVMdev] Bug in BranchFolding.cpp:OptimizeBlock
- [LLVMdev] [llvm-commits] [llvm] r162770 - in /llvm/trunk: include/llvm/CodeGen/MachineOperand.h lib/CodeGen/MachineInstr.cpp
- [LLVMdev] [llvm-commits] [llvm] r160791 - in /llvm/trunk: docs/LangRef.html include/llvm/Intrinsics.td lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
- [LLVMdev] [llvm-commits] [llvm] r79731 - /llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
- [LLVMdev] [llvm-commits] [llvm] r104737 - /llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp