aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Target/TargetFrameLowering.h
diff options
context:
space:
mode:
authorEli Bendersky <eliben@google.com>2013-02-21 20:05:00 +0000
committerEli Bendersky <eliben@google.com>2013-02-21 20:05:00 +0000
commit700ed80d3da5e98e05ceb90e9bfb66058581a6db (patch)
tree9e56e69a7368d120c5de167f978f3b37cc310815 /include/llvm/Target/TargetFrameLowering.h
parentfece442c697eb29f14b4718bdafa3a97d545b476 (diff)
downloadexternal_llvm-700ed80d3da5e98e05ceb90e9bfb66058581a6db.tar.gz
external_llvm-700ed80d3da5e98e05ceb90e9bfb66058581a6db.tar.bz2
external_llvm-700ed80d3da5e98e05ceb90e9bfb66058581a6db.zip
Move the eliminateCallFramePseudoInstr method from TargetRegisterInfo
to TargetFrameLowering, where it belongs. Incidentally, this allows us to delete some duplicated (and slightly different!) code in TRI. There are potentially other layering problems that can be cleaned up as a result, or in a similar manner. The refactoring was OK'd by Anton Korobeynikov on llvmdev. Note: this touches the target interfaces, so out-of-tree targets may be affected. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175788 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Target/TargetFrameLowering.h')
-rw-r--r--include/llvm/Target/TargetFrameLowering.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/llvm/Target/TargetFrameLowering.h b/include/llvm/Target/TargetFrameLowering.h
index ea279168f7..58bfcec07a 100644
--- a/include/llvm/Target/TargetFrameLowering.h
+++ b/include/llvm/Target/TargetFrameLowering.h
@@ -196,6 +196,21 @@ public:
///
virtual void processFunctionBeforeFrameFinalized(MachineFunction &MF) const {
}
+
+ /// eliminateCallFramePseudoInstr - This method is called during prolog/epilog
+ /// code insertion to eliminate call frame setup and destroy pseudo
+ /// instructions (but only if the Target is using them). It is responsible
+ /// for eliminating these instructions, replacing them with concrete
+ /// instructions. This method need only be implemented if using call frame
+ /// setup/destroy pseudo instructions.
+ ///
+ virtual void
+ eliminateCallFramePseudoInstr(MachineFunction &MF,
+ MachineBasicBlock &MBB,
+ MachineBasicBlock::iterator MI) const {
+ llvm_unreachable("Call Frame Pseudo Instructions do not exist on this "
+ "target!");
+ }
};
} // End llvm namespace