[llvm-branch-commits] [CodeGen] Add target hook shouldReMaterializeTrivialRegDef (PR #148429)
Tomer Shafir via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Sun Jul 13 06:27:00 PDT 2025
https://github.com/tomershafir created https://github.com/llvm/llvm-project/pull/148429
Adds a target hook `shouldReMaterializeTrivialRegDef` that enables target to specify wether rematerialization of the copy is beneficial. This patch also provide an implementation for AArch64 based on the new subtarget hooks `canLowerToZeroCycleReg[Move|Zeroing]`.
It prepares for a register coalescer optimization to prevent rematerialization of moves where the target supports ZCM.
More information about the llvm-branch-commits
mailing list