LLVM: lib/CodeGen/MIRVRegNamerUtils.h Source File (original) (raw)
Go to the documentation of this file.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17#ifndef LLVM_LIB_CODEGEN_MIRVREGNAMERUTILS_H
18#define LLVM_LIB_CODEGEN_MIRVREGNAMERUTILS_H
19
21#include
22#include
23#include
24
25namespace llvm {
26
31
32
33
35 class NamedVReg {
37 std::string Name;
38
39 public:
40 NamedVReg(Register Reg, std::string Name = "") : Reg(Reg), Name(Name) {}
41 NamedVReg(std::string Name = "") : Reg(~0U), Name(Name) {}
42
43 const std::string &getName() const { return Name; }
44
46 };
47
49
50 unsigned CurrentBBNumber = 0;
51
52
53
54
55
56
57
58
59
60 std::string getInstructionOpcodeHash(MachineInstr &MI);
61
62
63
64 std::map<Register, Register>
65 getVRegRenameMap(const std::vector &VRegs);
66
67
68 bool doVRegRenaming(const std::map<Register, Register> &VRegRenameMap);
69
70
71
72
74
75
77
78
79
80
82
83public:
86
87
88
90 CurrentBBNumber = BBNum;
91 return renameInstsInMBB(MBB);
92 }
93};
94
95}
96
97#endif
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.
StringRef - Represent a constant reference to a string, i.e.
VRegRenamer(MachineRegisterInfo &MRI)
Definition MIRVRegNamerUtils.h:85
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...
Definition MIRVRegNamerUtils.h:89
This is an optimization pass for GlobalISel generic memory operations.