17#ifndef LLVM_LIB_CODEGEN_MIRVREGNAMERUTILS_H
18#define LLVM_LIB_CODEGEN_MIRVREGNAMERUTILS_H
42 NamedVReg(std::string Name =
"") :
Reg(~0U), Name(Name) {}
44 const std::string &
getName()
const {
return Name; }
49 const CodeGenOptions &Opts;
52 unsigned CurrentBBNumber = 0;
66 std::map<Register, Register>
67 getVRegRenameMap(
const std::vector<NamedVReg> &VRegs);
70 bool doVRegRenaming(
const std::map<Register, Register> &
VRegRenameMap);
88 : Opts(Opts), MRI(MRI) {}
93 CurrentBBNumber = BBNum;
94 return renameInstsInMBB(
MBB);
std::map< Register, Register > VRegRenameMap
static MCRegister getReg(const MCDisassembler *D, unsigned RC, unsigned RegNo)
static StringRef getName(Value *V)
Representation of each machine instruction.
MachineRegisterInfo - Keep track of information for virtual and physical registers,...
Wrapper class representing virtual and physical registers.
Represent a constant reference to a string, i.e.
VRegRenamer(const CodeGenOptions &Opts, MachineRegisterInfo &MRI)
bool renameVRegs(MachineBasicBlock *MBB, unsigned BBNum)
Same as the above, but sets a BBNum depending on BB traversal that will be used as prefix for the vre...
This is an optimization pass for GlobalISel generic memory operations.