Go to the documentation of this file.
17 #ifndef LLVM_LIB_CODEGEN_MIRVREGNAMERUTILS_H
18 #define LLVM_LIB_CODEGEN_MIRVREGNAMERUTILS_H
27 class MachineBasicBlock;
29 class MachineRegisterInfo;
41 NamedVReg(std::string Name =
"") :
Reg(~0U), Name(Name) {}
43 const std::string &
getName()
const {
return Name; }
50 unsigned CurrentBBNumber = 0;
64 std::map<unsigned, unsigned>
65 getVRegRenameMap(
const std::vector<NamedVReg> &VRegs);
68 bool doVRegRenaming(
const std::map<unsigned, unsigned> &
VRegRenameMap);
73 unsigned createVirtualRegister(
unsigned VReg);
76 unsigned createVirtualRegisterWithLowerName(
unsigned VReg,
StringRef Name);
90 CurrentBBNumber = BBNum;
91 return renameInstsInMBB(
MBB);
static StringRef getName(Value *V)
This is an optimization pass for GlobalISel generic memory operations.
MachineRegisterInfo - Keep track of information for virtual and physical registers,...
Reg
All possible values of the reg field in the ModR/M byte.
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...
static unsigned getReg(const MCDisassembler *D, unsigned RC, unsigned RegNo)
std::map< unsigned, unsigned > VRegRenameMap
VRegRenamer(MachineRegisterInfo &MRI)
Representation of each machine instruction.
StringRef - Represent a constant reference to a string, i.e.
unsigned const MachineRegisterInfo * MRI
Wrapper class representing virtual and physical registers.
VRegRenamer - This class is used for renaming vregs in a machine basic block according to semantics o...