[PATCH] D97837: [InstCombine] Remove gc.relocate duplicates
Serguei Katkov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 8 21:48:31 PST 2021
skatkov added a comment.
In D97837#2608208 <https://reviews.llvm.org/D97837#2608208>, @reames wrote:
> Posted an enhancement for phi handling in GVN: https://reviews.llvm.org/D98080
>
> I'd be curious to know if that's enough for the original test case.
D97974 <https://reviews.llvm.org/D97974> + D98080 <https://reviews.llvm.org/D98080> does not produce the best result.
It does not remove dup gc.relocate since some point by some reason.
The following pipeline produces the best result:
-passes=rewrite-statepoints-for-gc,gvn,instcombine,gvn,instcombine,gvn,instcombine,gvn,instcombine.
I also checked D98082 <https://reviews.llvm.org/D98082>, nothing changed,
For statepoint with gc.bundle = "gc-live"(i8 addrspace(1)* %base_phi, i8 addrspace(1)* %base_phi, ...) ]
GVN did not combine
%base_phi.relocated = call coldcc i8 addrspace(1)* @llvm.experimental.gc.relocate.p1i8(token %statepoint_token19, i32 0, i32 0), !dbg !91 ; (%base_phi, %base_phi)
%16 = call coldcc i8 addrspace(1)* @llvm.experimental.gc.relocate.p1i8(token %statepoint_token19, i32 1, i32 1), !dbg !91 ; (%base_phi, %base_phi)
I think the solution with EarlyCSE supporting elimination of dup phi nodes seems more interesting...
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D97837/new/
https://reviews.llvm.org/D97837
More information about the llvm-commits
mailing list