|
26 | 26 | #include "llvm/CodeGen/MachineOperand.h" |
27 | 27 | #include "llvm/CodeGen/MachineOutliner.h" |
28 | 28 | #include "llvm/CodeGen/PseudoSourceValue.h" |
| 29 | +#include "llvm/CodeGen/VirtRegMap.h" |
29 | 30 | #include "llvm/MC/MCInstrInfo.h" |
30 | 31 | #include "llvm/Support/BranchProbability.h" |
31 | 32 | #include "llvm/Support/ErrorHandling.h" |
@@ -932,9 +933,12 @@ class TargetInstrInfo : public MCInstrInfo { |
932 | 933 | /// operand folded, otherwise NULL is returned. |
933 | 934 | /// The new instruction is inserted before MI, and the client is responsible |
934 | 935 | /// for removing the old instruction. |
| 936 | + /// If VRM is passed, the assigned physregs can be inspected by target to |
| 937 | + /// decide on using an opcode (note that those assignments can still change). |
935 | 938 | MachineInstr *foldMemoryOperand(MachineInstr &MI, ArrayRef<unsigned> Ops, |
936 | 939 | int FI, |
937 | | - LiveIntervals *LIS = nullptr) const; |
| 940 | + LiveIntervals *LIS = nullptr, |
| 941 | + VirtRegMap *VRM = nullptr) const; |
938 | 942 |
|
939 | 943 | /// Same as the previous version except it allows folding of any load and |
940 | 944 | /// store from / to any address, not just from a specific stack slot. |
@@ -1024,7 +1028,8 @@ class TargetInstrInfo : public MCInstrInfo { |
1024 | 1028 | foldMemoryOperandImpl(MachineFunction &MF, MachineInstr &MI, |
1025 | 1029 | ArrayRef<unsigned> Ops, |
1026 | 1030 | MachineBasicBlock::iterator InsertPt, int FrameIndex, |
1027 | | - LiveIntervals *LIS = nullptr) const { |
| 1031 | + LiveIntervals *LIS = nullptr, |
| 1032 | + VirtRegMap *VRM = nullptr) const { |
1028 | 1033 | return nullptr; |
1029 | 1034 | } |
1030 | 1035 |
|
|
0 commit comments