[llvm-branch-commits] [llvm] [CodeGen] Enhance createFrom for sub-reg aware cloning (PR #174999)
via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Wed Sep 30 04:52:47 PDT 2026
================
@@ -154,8 +154,11 @@ class LiveRangeEdit : private MachineRegisterInfo::Delegate {
ArrayRef<Register> regs() const { return ArrayRef(NewRegs).slice(FirstNew); }
- /// createFrom - Create a new virtual register based on OldReg.
- Register createFrom(Register OldReg);
+ /// createFrom - Create a new virtual register based on OldReg. If \p RC is
+ /// non-null, constrain the register class of the new vreg. Partial reloads
+ /// of tuple regclasses will feed-in a subregclass derived from the regclass
+ /// of OldReg.
+ Register createFrom(Register OldReg, const TargetRegisterClass *RC = nullptr);
----------------
easyonaadit wrote:
passed in subreg instead of a register class.
https://github.com/llvm/llvm-project/pull/174999
More information about the llvm-branch-commits
mailing list