[PATCH] D105742: [AMDGPU] Make V_CVT_I32_F64/V_CVT_F64_I32 rematerializable.
Stanislav Mekhanoshin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 9 15:34:41 PDT 2021
rampitec added a comment.
RA has `VirtRegAuxInfo::weightCalcHelper()` function which halves a weight of a LI if it is rematerializable, which in turn leads to different RA decisions. We will generally have a lot of small codegen changes, not just rematerialization instead of spilling:
// If all of the definitions of the interval are re-materializable,
// it is a preferred candidate for spilling.
// FIXME: this gets much more complicated once we support non-trivial
// re-materialization.
if (isRematerializable(LI, LIS, VRM, *MF.getSubtarget().getInstrInfo()))
TotalWeight *= 0.5F;
It may be beneficial to only do it if we have `isAsCheapAsAMove` or at least use a different weight multiplier. This is however a different and much more intrusive change.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D105742/new/
https://reviews.llvm.org/D105742
More information about the llvm-commits
mailing list