summaryrefslogtreecommitdiff
path: root/include/llvm/Target
diff options
context:
space:
mode:
authorHal Finkel <hfinkel@anl.gov>2013-04-06 19:30:20 +0000
committerHal Finkel <hfinkel@anl.gov>2013-04-06 19:30:20 +0000
commita36119beeceb125fe2097da2729dca886973b108 (patch)
tree373b40f6d20540e54b3dae7e28b4457cb6e329d1 /include/llvm/Target
parent1f25fe50236e5842b19198fbfe8a812be0b40cf5 (diff)
downloadllvm-a36119beeceb125fe2097da2729dca886973b108.tar.gz
llvm-a36119beeceb125fe2097da2729dca886973b108.tar.bz2
llvm-a36119beeceb125fe2097da2729dca886973b108.tar.xz
Add a comment to TargetInstrInfo about FoldImmediate
This comment documents the current behavior of the ARM implementation of this callback, and also the soon-to-be-committed PPC version. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178959 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Target')
-rw-r--r--include/llvm/Target/TargetInstrInfo.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/llvm/Target/TargetInstrInfo.h b/include/llvm/Target/TargetInstrInfo.h
index 0ba75e5d7c..d49ce1ce7f 100644
--- a/include/llvm/Target/TargetInstrInfo.h
+++ b/include/llvm/Target/TargetInstrInfo.h
@@ -774,6 +774,10 @@ public:
/// FoldImmediate - 'Reg' is known to be defined by a move immediate
/// instruction, try to fold the immediate into the use instruction.
+ /// If MRI->hasOneNonDBGUse(Reg) is true, and this function returns true,
+ /// then the caller may assume that DefMI has been erased from its parent
+ /// block. The caller may assume that it will not be erased by this
+ /// function otherwise.
virtual bool FoldImmediate(MachineInstr *UseMI, MachineInstr *DefMI,
unsigned Reg, MachineRegisterInfo *MRI) const {
return false;