diff --git a/llvm/include/llvm/CodeGen/MachineSSAUpdater.h b/llvm/include/llvm/CodeGen/MachineSSAUpdater.h --- a/llvm/include/llvm/CodeGen/MachineSSAUpdater.h +++ b/llvm/include/llvm/CodeGen/MachineSSAUpdater.h @@ -40,9 +40,6 @@ //typedef DenseMap AvailableValsTy; void *AV = nullptr; - /// VR - Current virtual register whose uses are being updated. - Register VR; - /// VRC - Register class of the current virtual register. const TargetRegisterClass *VRC; @@ -65,6 +62,7 @@ /// Initialize - Reset this object to get ready for a new set of SSA /// updates. void Initialize(Register V); + void Initialize(const TargetRegisterClass *RC); /// AddAvailableValue - Indicate that a rewritten value is available at the /// end of the specified block with the specified value. diff --git a/llvm/lib/CodeGen/MachineSSAUpdater.cpp b/llvm/lib/CodeGen/MachineSSAUpdater.cpp --- a/llvm/lib/CodeGen/MachineSSAUpdater.cpp +++ b/llvm/lib/CodeGen/MachineSSAUpdater.cpp @@ -50,15 +50,18 @@ } /// Initialize - Reset this object to get ready for a new set of SSA -/// updates. ProtoValue is the value used to name PHI nodes. -void MachineSSAUpdater::Initialize(Register V) { +/// updates. +void MachineSSAUpdater::Initialize(const TargetRegisterClass *RC) { if (!AV) AV = new AvailableValsTy(); else getAvailableVals(AV).clear(); - VR = V; - VRC = MRI->getRegClass(VR); + VRC = RC; +} + +void MachineSSAUpdater::Initialize(Register V) { + Initialize(MRI->getRegClass(V)); } /// HasValueForBlock - Return true if the MachineSSAUpdater already has a value for