Skip to content

Commit

Permalink
[RDF] Remove uses of RDFRegisters::normalize (deprecate)
Browse files Browse the repository at this point in the history
This function has been reduced to an identity function for some time.
  • Loading branch information
Krzysztof Parzyszek committed Aug 4, 2020
1 parent e8b7eda commit 09897b1
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
6 changes: 5 additions & 1 deletion llvm/include/llvm/CodeGen/RDFRegisters.h
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
4 changes: 0 additions & 4 deletions llvm/lib/CodeGen/RDFRegisters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,6 @@ PhysicalRegisterInfo::PhysicalRegisterInfo(const TargetRegisterInfo &tri,
}
}

RegisterRef PhysicalRegisterInfo::normalize(RegisterRef RR) const {
return RR;
}

std::set<RegisterId> PhysicalRegisterInfo::getAliasSet(RegisterId Reg) const {
// Do not include RR in the alias set.
std::set<RegisterId> AS;
Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/Target/Hexagon/HexagonOptAddrMode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ void HexagonOptAddrMode::getAllRealUses(NodeAddr<StmtNode *> SA,
for (NodeAddr<DefNode *> DA : SA.Addr->members_if(DFG->IsDef, *DFG)) {
LLVM_DEBUG(dbgs() << "\t\t[DefNode]: "
<< Print<NodeAddr<DefNode *>>(DA, *DFG) << "\n");
RegisterRef DR = DFG->getPRI().normalize(DA.Addr->getRegRef(*DFG));
RegisterRef DR = DA.Addr->getRegRef(*DFG);

auto UseSet = LV->getAllReachedUses(DR, DA);

Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/Target/X86/X86LoadValueInjectionLoadHardening.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<UseNode *>(UseID);
if (Use.Addr->getFlags() & NodeAttrs::PhiRef) { // phi node
Expand Down

0 comments on commit 09897b1

Please sign in to comment.