diff --git a/llvm/include/llvm/CodeGen/RDFRegisters.h b/llvm/include/llvm/CodeGen/RDFRegisters.h index 4afaf80e46595d..e8ba0103777ab6 100644 --- a/llvm/include/llvm/CodeGen/RDFRegisters.h +++ b/llvm/include/llvm/CodeGen/RDFRegisters.h @@ -110,7 +110,11 @@ namespace rdf { return RegMasks.get(Register::stackSlot2Index(R)); } - RegisterRef normalize(RegisterRef RR) const; + LLVM_ATTRIBUTE_DEPRECATED(RegisterRef normalize(RegisterRef RR), + "This function is now an identity function"); + RegisterRef normalize(RegisterRef RR) const { + return RR; + } bool alias(RegisterRef RA, RegisterRef RB) const { if (!isRegMaskId(RA.Reg)) diff --git a/llvm/lib/CodeGen/RDFRegisters.cpp b/llvm/lib/CodeGen/RDFRegisters.cpp index bd8661816e7180..9f8d6b9f61ce2d 100644 --- a/llvm/lib/CodeGen/RDFRegisters.cpp +++ b/llvm/lib/CodeGen/RDFRegisters.cpp @@ -94,10 +94,6 @@ PhysicalRegisterInfo::PhysicalRegisterInfo(const TargetRegisterInfo &tri, } } -RegisterRef PhysicalRegisterInfo::normalize(RegisterRef RR) const { - return RR; -} - std::set PhysicalRegisterInfo::getAliasSet(RegisterId Reg) const { // Do not include RR in the alias set. std::set AS; diff --git a/llvm/lib/Target/Hexagon/HexagonOptAddrMode.cpp b/llvm/lib/Target/Hexagon/HexagonOptAddrMode.cpp index c718e5f2d9fbe2..2cdfbe7845b632 100644 --- a/llvm/lib/Target/Hexagon/HexagonOptAddrMode.cpp +++ b/llvm/lib/Target/Hexagon/HexagonOptAddrMode.cpp @@ -246,7 +246,7 @@ void HexagonOptAddrMode::getAllRealUses(NodeAddr SA, for (NodeAddr DA : SA.Addr->members_if(DFG->IsDef, *DFG)) { LLVM_DEBUG(dbgs() << "\t\t[DefNode]: " << Print>(DA, *DFG) << "\n"); - RegisterRef DR = DFG->getPRI().normalize(DA.Addr->getRegRef(*DFG)); + RegisterRef DR = DA.Addr->getRegRef(*DFG); auto UseSet = LV->getAllReachedUses(DR, DA); diff --git a/llvm/lib/Target/X86/X86LoadValueInjectionLoadHardening.cpp b/llvm/lib/Target/X86/X86LoadValueInjectionLoadHardening.cpp index 18fcc48bc9cdd2..12aaabcc79645f 100644 --- a/llvm/lib/Target/X86/X86LoadValueInjectionLoadHardening.cpp +++ b/llvm/lib/Target/X86/X86LoadValueInjectionLoadHardening.cpp @@ -369,7 +369,7 @@ X86LoadValueInjectionLoadHardeningPass::getGadgetGraph( // Use RDF to find all the uses of `Def` rdf::NodeSet Uses; - RegisterRef DefReg = DFG.getPRI().normalize(Def.Addr->getRegRef(DFG)); + RegisterRef DefReg = Def.Addr->getRegRef(DFG); for (auto UseID : L.getAllReachedUses(DefReg, Def)) { auto Use = DFG.addr(UseID); if (Use.Addr->getFlags() & NodeAttrs::PhiRef) { // phi node