[all-commits] [llvm/llvm-project] 6972e3: [gvn] CSE gc.relocates based on meaning, not spell...
Philip Reames via All-commits
all-commits at lists.llvm.org
Tue Mar 16 11:00:29 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 6972e39d47eccc3e5fc3ded4a1e1b78f74d10af6
https://github.com/llvm/llvm-project/commit/6972e39d47eccc3e5fc3ded4a1e1b78f74d10af6
Author: Philip Reames <listmail at philipreames.com>
Date: 2021-03-16 (Tue, 16 Mar 2021)
Changed paths:
M llvm/lib/Transforms/Scalar/EarlyCSE.cpp
M llvm/lib/Transforms/Scalar/GVN.cpp
M llvm/test/Transforms/EarlyCSE/gc_relocate.ll
M llvm/test/Transforms/GVN/gc_relocate.ll
Log Message:
-----------
[gvn] CSE gc.relocates based on meaning, not spelling (try 2)
This was (partially) reverted in cfe8f8e0 because the conversion from readonly to readnone in Intrinsics.td exposed a couple of problems. This change has been reworked to not need that change (via some explicit checks in client code). This is being done to address the original optimization issue and simplify the testing of the readonly changes. I'm working on that piece under 49607.
Original commit message follows:
The last two operands to a gc.relocate represent indices into the associated gc.statepoint's gc bundle list. (Effectively, gc.relocates are projections from the gc.statepoints multiple return values.)
We can use this to recognize when two gc.relocates are equivalent (and can be CSEd), even when the indices are non-equal. This is particular useful when considering a chain of multiple statepoints as it lets us eliminate all duplicate gc.relocates in a single pass.
Differential Revision: https://reviews.llvm.org/D97974
More information about the All-commits
mailing list