[PATCH] D109858: [GlobalISel][AMDGPU] Add dead code elimination clean up after legalization.
Amara Emerson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 17 17:24:07 PDT 2021
aemerson added a comment.
In D109858#3005799 <https://reviews.llvm.org/D109858#3005799>, @foad wrote:
> What is the compile time impact of this vs D109154 <https://reviews.llvm.org/D109154>? I'm assuming they are both equally effective at cleaning up the dead code.
>
> If we're going to go with this approach, should we clean up legalizeMachineFunction by ripping out all the bottom-up RPO order stuff, and the on-the-fly (presumably expensive) isTriviallyDead calls?
CTMark results for this patch AArch64 using 5 runs:
O0 -g:
Program base full-dce diff
pairlocalalign 1.56 1.57 1.0%
kc 8.70 8.70 0.0%
bullet 14.03 14.02 -0.1%
lencod 3.03 3.02 -0.3%
clamscan 3.81 3.80 -0.3%
consumer-typeset 2.79 2.78 -0.3%
tramp3d-v4 5.71 5.69 -0.3%
SPASS 3.37 3.36 -0.4%
sqlite3 1.08 1.08 -0.4%
7zip-benchmark 18.00 17.91 -0.4%
Geomean difference -0.2%
Os -g:
Program base full-dce diff
bullet 23.96 23.99 0.1%
lencod 10.03 10.04 0.1%
tramp3d-v4 16.85 16.84 -0.0%
7zip-benchmark 30.93 30.90 -0.1%
kc 14.95 14.94 -0.1%
SPASS 11.03 11.01 -0.2%
clamscan 10.71 10.68 -0.2%
pairlocalalign 5.80 5.79 -0.3%
sqlite3 6.75 6.72 -0.4%
consumer-typeset 8.46 8.39 -0.8%
Geomean difference -0.2%
So we actually see a minor improvement by cleaning up. Not sure why that is.
As for D109154 <https://reviews.llvm.org/D109154>:
-O0 -g:
Program base partial-dce diff
sqlite3 1.08 1.09 0.1%
bullet 14.03 14.04 0.1%
kc 8.70 8.68 -0.2%
pairlocalalign 1.56 1.55 -0.2%
7zip-benchmark 18.00 17.95 -0.3%
lencod 3.03 3.02 -0.4%
clamscan 3.81 3.78 -0.6%
SPASS 3.37 3.35 -0.6%
tramp3d-v4 5.71 5.67 -0.7%
consumer-typeset 2.79 2.76 -1.1%
Geomean difference -0.4%
-Os -g:
Program base partial-dce diff
SPASS 11.03 11.03 0.0%
bullet 23.96 23.97 0.0%
sqlite3 6.75 6.75 -0.1%
7zip-benchmark 30.93 30.90 -0.1%
tramp3d-v4 16.85 16.82 -0.1%
consumer-typeset 8.46 8.43 -0.2%
pairlocalalign 5.80 5.79 -0.3%
kc 14.95 14.90 -0.3%
lencod 10.03 9.99 -0.4%
clamscan 10.71 10.66 -0.5%
Geomean difference -0.2%
Same thing for D109154 <https://reviews.llvm.org/D109154>, but a slightly bigger improvement at -O0.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D109858/new/
https://reviews.llvm.org/D109858
More information about the llvm-commits
mailing list