[PATCH] D151848: [X86, Peephole] Enable FoldImmediate for X86
Guozhi Wei via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 21 15:31:05 PDT 2023
Carrot added a comment.
In D151848#4600416 <https://reviews.llvm.org/D151848#4600416>, @Carrot wrote:
> In D151848#4597644 <https://reviews.llvm.org/D151848#4597644>, @goldstein.w.n wrote:
>
>> Some codesize/Reg slloc stats from llvm test suite would be useful to have for evaluating the benefit of this patch.
>
> I will collect these stats for spec int 2006.
Here is the related stats for building spec int 2006
Without this patch
1959884 Number of machine instrs printed
124286 Number of instructions rematerialized
96962 Number of instructions re-materialized
82246 Number of instructions deleted by DCE
97965 Number of shrinkToUses called
650467 Number of registers assigned
91796 Number of copies inserted for splitting
22727 Number of interferences evicted
20178 Number of splits finished
9640 Number of folded stack accesses
829 Number of folded loads
316 Number of live ranges fractured by DCE
13285 Number of split global live ranges
227433 Number of identity moves eliminated after rewriting
7536 Number of dead lane conflicts tested
4074 Number of dead lane conflicts resolved
1476 Number of split local live ranges
155548 Number of new live ranges queued
44378 Number of reloads inserted
629 Number of reloads removed
25069 Number of rematerialized defs for spilling
2255 Number of rematerialized defs for splitting
9584 Number of splits that were simple
1156 Number of spilled snippets
16277 Number of spill slots allocated
29934 Number of spilled live ranges
21939 Number of spills inserted
430 Number of spills removed
26830 Number of registers unassigned
612 Number of instruction commuting performed
169128 Number of cross class joins performed
13 Number of copies extended
529170 Number of interval joins performed
20 Number of register classes inflated
35 Number of single use loads folded after DCE
With this patch
45008 Number of move immediate folded
1959709 Number of machine instrs printed
79327 Number of instructions rematerialized
52043 Number of instructions re-materialized
46082 Number of instructions deleted by DCE
53046 Number of shrinkToUses called
650311 Number of registers assigned
91762 Number of copies inserted for splitting
22698 Number of interferences evicted
20167 Number of splits finished
9653 Number of folded stack accesses
829 Number of folded loads
315 Number of live ranges fractured by DCE
13282 Number of split global live ranges
227415 Number of identity moves eliminated after rewriting
7536 Number of dead lane conflicts tested
4074 Number of dead lane conflicts resolved
1466 Number of split local live ranges
155411 Number of new live ranges queued
44319 Number of reloads inserted
697 Number of reloads removed
25035 Number of rematerialized defs for spilling
2249 Number of rematerialized defs for splitting
9572 Number of splits that were simple
1166 Number of spilled snippets
16272 Number of spill slots allocated
29925 Number of spilled live ranges
21900 Number of spills inserted
446 Number of spills removed
26800 Number of registers unassigned
613 Number of instruction commuting performed
169130 Number of cross class joins performed
13 Number of copies extended
529157 Number of interval joins performed
20 Number of register classes inflated
35 Number of single use loads folded after DCE
Conclusion:
1. There was no FoldImmediate occurred without this patch. Now there are 45008 occurrences of FoldImmediate with this patch.
2. There are 175 less instructions generated with this patch.
3. There is significantly less rematerialization occurred, because related immediate are already folded into instructions.
There is no big differences for other stats.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D151848/new/
https://reviews.llvm.org/D151848
More information about the llvm-commits
mailing list