aboutsummaryrefslogtreecommitdiff
path: root/include/llvm
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm')
-rw-r--r--include/llvm/CodeGen/LiveIntervalAnalysis.h3
-rw-r--r--include/llvm/Target/MRegisterInfo.h16
2 files changed, 18 insertions, 1 deletions
diff --git a/include/llvm/CodeGen/LiveIntervalAnalysis.h b/include/llvm/CodeGen/LiveIntervalAnalysis.h
index 725beb708c..5ada1ad149 100644
--- a/include/llvm/CodeGen/LiveIntervalAnalysis.h
+++ b/include/llvm/CodeGen/LiveIntervalAnalysis.h
@@ -275,7 +275,8 @@ namespace llvm {
/// returns true.
bool tryFoldMemoryOperand(MachineInstr* &MI, VirtRegMap &vrm,
MachineInstr *DefMI, unsigned InstrIdx,
- unsigned OpIdx, unsigned NumUses,
+ unsigned OpIdx,
+ SmallVector<unsigned, 2> &UseOps,
bool isSS, int Slot, unsigned Reg);
/// anyKillInMBBAfterIdx - Returns true if there is a kill of the specified
diff --git a/include/llvm/Target/MRegisterInfo.h b/include/llvm/Target/MRegisterInfo.h
index bff74de882..ecbee642f4 100644
--- a/include/llvm/Target/MRegisterInfo.h
+++ b/include/llvm/Target/MRegisterInfo.h
@@ -543,6 +543,14 @@ public:
return 0;
}
+ /// foldMemoryOperand - Same as previous except it tries to fold instruction
+ /// with multiple uses of the same register.
+ virtual MachineInstr* foldMemoryOperand(MachineInstr* MI,
+ SmallVectorImpl<unsigned> &UseOps,
+ int FrameIndex) const {
+ return 0;
+ }
+
/// foldMemoryOperand - Same as the previous version except it allows folding
/// of any load and store from / to any address, not just from a specific
/// stack slot.
@@ -552,6 +560,14 @@ public:
return 0;
}
+ /// foldMemoryOperand - Same as previous except it tries to fold instruction
+ /// with multiple uses of the same register.
+ virtual MachineInstr* foldMemoryOperand(MachineInstr* MI,
+ SmallVectorImpl<unsigned> &UseOps,
+ MachineInstr* LoadMI) const {
+ return 0;
+ }
+
/// getOpcodeAfterMemoryFold - Returns the opcode of the would be new
/// instruction after load / store is folded into an instruction of the
/// specified opcode. It returns zero if the specified unfolding is not