forked from OSchip/llvm-project
189900eb14
This stops reporting CostPerUse 1 for `R8`-`R15` and `XMM8`-`XMM31`. This was previously done because instruction encoding require a REX prefix when using them resulting in longer instruction encodings. I found that this regresses the quality of the register allocation as the costs impose an ordering on eviction candidates. I also feel that there is a bit of an impedance mismatch as the actual costs occure when encoding instructions using those registers, but the order of VReg assignments is not primarily ordered by number of Defs+Uses. I did extensive measurements with the llvm-test-suite wiht SPEC2006 + SPEC2017 included, internal services showed similar patterns. Generally there are a log of improvements but also a lot of regression. But on average the allocation quality seems to improve at a small code size regression. Results for measuring static and dynamic instruction counts: Dynamic Counts (scaled by execution frequency) / Optimization Remarks: Spills+FoldedSpills -5.6% Reloads+FoldedReloads -4.2% Copies -0.1% Static / LLVM Statistics: regalloc.NumSpills mean -1.6%, geomean -2.8% regalloc.NumReloads mean -1.7%, geomean -3.1% size..text mean +0.4%, geomean +0.4% Static / LLVM Statistics: mean -2.2%, geomean -3.1%) regalloc.NumSpills mean -2.6%, geomean -3.9%) regalloc.NumReloads mean +0.6%, geomean +0.6%) size..text Static / LLVM Statistics: regalloc.NumSpills mean -3.0% regalloc.NumReloads mean -3.3% size..text mean +0.3%, geomean +0.3% Differential Revision: https://reviews.llvm.org/D133902 |
||
---|---|---|
.. | ||
AArch64 | ||
AMDGPU | ||
ARM | ||
NVPTX | ||
Power | ||
RISCV | ||
X86 | ||
2005-08-15-AddRecIV.ll | ||
2005-08-17-OutOfLoopVariant.ll | ||
2005-09-12-UsesOutOutsideOfLoop.ll | ||
2007-04-23-UseIterator.ll | ||
2008-08-13-CmpStride.ll | ||
2008-09-09-Overflow.ll | ||
2009-01-13-nonconstant-stride-outside-loop.ll | ||
2009-04-28-no-reduce-mul.ll | ||
2011-07-19-CritEdgeBreakCrash.ll | ||
2011-10-03-CritEdgeMerge.ll | ||
2011-10-06-ReusePhi.ll | ||
2011-10-13-SCEVChain.ll | ||
2011-10-14-IntPtr.ll | ||
2011-12-19-PostincQuadratic.ll | ||
2012-01-02-nopreheader.ll | ||
2012-01-16-nopreheader.ll | ||
2012-03-15-nopreheader.ll | ||
2012-03-26-constexpr.ll | ||
2012-07-13-ExpandUDiv.ll | ||
2012-07-18-LimitReassociate.ll | ||
2013-01-05-IndBr.ll | ||
2013-01-14-ReuseCast.ll | ||
addrec-gep-address-space.ll | ||
addrec-gep.ll | ||
callbr-critical-edge-splitting.ll | ||
callbr-critical-edge-splitting2.ll | ||
canonical-form.ll | ||
count-to-zero.ll | ||
dbg-preserve-0.ll | ||
dbg-preserve-1.ll | ||
dbg-preserve-2.ll | ||
dead-phi.ll | ||
debuginfo-scev-salvage-0.ll | ||
debuginfo-scev-salvage-1.ll | ||
debuginfo-scev-salvage-2.ll | ||
debuginfo-scev-salvage-3.ll | ||
debuginfo-scev-salvage-4.ll | ||
debuginfo-scev-salvage-5.ll | ||
depth-limit-overrun.ll | ||
different-type-ivs.ll | ||
dominate-assert.ll | ||
dont-hoist-simple-loop-constants.ll | ||
dont_insert_redundant_ops.ll | ||
dont_reduce_bytes.ll | ||
dont_reverse.ll | ||
ephemeral.ll | ||
exit_compare_live_range.ll | ||
funclet.ll | ||
gnarly-setupcost.ll | ||
hoist-parent-preheader.ll | ||
illegal-addr-modes.ll | ||
invariant_value_first.ll | ||
invariant_value_first_arg.ll | ||
ivchain.ll | ||
lsr-comp-time.ll | ||
lsr-overflow.ll | ||
lsr-term-fold-negative-testcase.ll | ||
lsr-term-fold.ll | ||
missing-phi-operand-update.ll | ||
multi-edge-latch.ll | ||
negative-scale.ll | ||
nested-reduce.ll | ||
nonintegral.ll | ||
nonlinear-postinc.ll | ||
opaque-ptr.ll | ||
ops_after_indvar.ll | ||
optimizemax_debugloc.ll | ||
phi_ehpad_ignore_sameval.ll | ||
phi_node_update_multiple_preds.ll | ||
post-inc-icmpzero.ll | ||
post-inc-optsize.ll | ||
post-increment-insertion.ll | ||
pr2537.ll | ||
pr2570.ll | ||
pr3086.ll | ||
pr3399.ll | ||
pr3571.ll | ||
pr12018.ll | ||
pr12048.ll | ||
pr12691.ll | ||
pr18165.ll | ||
pr25541.ll | ||
pr27056.ll | ||
pr31627.ll | ||
pr48725.ll | ||
pr50765.ll | ||
pr50918.ll | ||
pr51329.ll | ||
pr51656.ll | ||
pr52161.ll | ||
pr56160.ll | ||
preserve-gep-loop-variant.ll | ||
related_indvars.ll | ||
remove_indvar.ll | ||
remove_scev_indvars.ll | ||
scaling-factor-incompat-type.ll | ||
scaling_factor_cost_crash.ll | ||
scev-after-loopinstsimplify.ll | ||
scev-expander-lcssa.ll | ||
scev-insertpt-bug.ll | ||
sext-ind-var.ll | ||
share_code_in_preheader.ll | ||
share_ivs.ll | ||
shl.ll | ||
two-combinations-bug.ll | ||
uglygep-address-space.ll | ||
uglygep.ll | ||
use_postinc_value_outside_loop.ll | ||
var_stride_used_by_compare.ll | ||
variable_stride.ll | ||
wrong-hoisting-iv.ll |