[PATCH] D22772: GVN-hoist: limit hoisting depth (PR28670)

Sebastian Pop via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 25 15:10:18 PDT 2016


sebpop added a comment.

Data from compiling the test-suite for x86_64-linux with -mllvm -stats and varying the flag:
from the RegAlloc metrics we see that the minimum number of spills occurs for 100 and starts increasing back at 125.

-gvn-hoist-max-depth=0:
Number of rematerialized defs for spilling: 18286
Number of rematerialized defs for splitting: 5727
Number of spill slots allocated: 44014
Number of spilled live ranges: 62657
Number of spills inserted: 51753
gvn-hoist.*: 0

-gvn-hoist-max-depth=50:
Number of rematerialized defs for spilling: 18213
Number of rematerialized defs for splitting: 5827
Number of spill slots allocated: 43956
Number of spilled live ranges: 62539
Number of spills inserted: 51643
gvn-hoist.*Number of instructions hoisted: 21564
gvn-hoist.*Number of instructions removed: 30019
gvn-hoist.*Number of loads hoisted: 14697
gvn-hoist.*Number of loads removed: 20247
gvn-hoist.*Number of stores hoisted: 15
gvn-hoist.*Number of stores removed: 15
gvn-hoist.*Number of calls hoisted: 8
gvn-hoist.*Number of calls removed: 8

-gvn-hoist-max-depth=100:
Number of rematerialized defs for spilling: 18223
Number of rematerialized defs for splitting: 5817
Number of spill slots allocated: 43961
Number of spilled live ranges: 62521
Number of spills inserted: 51623
gvn-hoist.*Number of instructions hoisted: 21941
gvn-hoist.*Number of instructions removed: 31106
gvn-hoist.*Number of loads hoisted: 14951
gvn-hoist.*Number of loads removed: 21063
gvn-hoist.*Number of stores hoisted: 15
gvn-hoist.*Number of stores removed: 15
gvn-hoist.*Number of calls hoisted: 8
gvn-hoist.*Number of calls removed: 8

-gvn-hoist-max-depth=125:
Number of rematerialized defs for spilling: 18223
Number of rematerialized defs for splitting: 5817
Number of spill slots allocated: 43969
Number of spilled live ranges: 62520
Number of spills inserted: 51632
gvn-hoist.*Number of instructions hoisted: 22044
gvn-hoist.*Number of instructions removed: 31308
gvn-hoist.*Number of loads hoisted: 15034
gvn-hoist.*Number of loads removed: 21221
gvn-hoist.*Number of stores hoisted: 15
gvn-hoist.*Number of stores removed: 15
gvn-hoist.*Number of calls hoisted: 8
gvn-hoist.*Number of calls removed: 8

-gvn-hoist-max-depth=150:
Number of rematerialized defs for spilling: 18223
Number of rematerialized defs for splitting: 5817
Number of spill slots allocated: 43970
Number of spilled live ranges: 62516
Number of spills inserted: 51627
gvn-hoist.*Number of instructions hoisted: 22128
gvn-hoist.*Number of instructions removed: 31467
gvn-hoist.*Number of loads hoisted: 15086
gvn-hoist.*Number of loads removed: 21322
gvn-hoist.*Number of stores hoisted: 15
gvn-hoist.*Number of stores removed: 15
gvn-hoist.*Number of calls hoisted: 8
gvn-hoist.*Number of calls removed: 8

-gvn-hoist-max-depth=200:
Number of rematerialized defs for spilling: 18223
Number of rematerialized defs for splitting: 5817
Number of spill slots allocated: 43993
Number of spilled live ranges: 62552
Number of spills inserted: 51661
gvn-hoist.*Number of instructions hoisted: 22348
gvn-hoist.*Number of instructions removed: 31864
gvn-hoist.*Number of loads hoisted: 15200
gvn-hoist.*Number of loads removed: 21542
gvn-hoist.*Number of stores hoisted: 15
gvn-hoist.*Number of stores removed: 15
gvn-hoist.*Number of calls hoisted: 8
gvn-hoist.*Number of calls removed: 8

-gvn-hoist-max-depth=-1: (i.e., no bounds)
Number of rematerialized defs for spilling: 18244
Number of rematerialized defs for splitting: 5817
Number of spill slots allocated: 44070
Number of spilled live ranges: 62619
Number of spills inserted: 51740
gvn-hoist.*Number of instructions hoisted: 22508
gvn-hoist.*Number of instructions removed: 32925
gvn-hoist.*Number of loads hoisted: 15239
gvn-hoist.*Number of loads removed: 22004
gvn-hoist.*Number of stores hoisted: 15
gvn-hoist.*Number of stores removed: 15
gvn-hoist.*Number of calls hoisted: 8
gvn-hoist.*Number of calls removed: 8


https://reviews.llvm.org/D22772





More information about the llvm-commits mailing list