aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Target/TargetInstrInfo.h
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2007-06-14 20:50:44 +0000
committerDan Gohman <gohman@apple.com>2007-06-14 20:50:44 +0000
commitc101e95cb6aae1fd6a0727ba4b518a7894ae3089 (patch)
tree31516302b800a8107db6735791587a0cdb6ed26b /include/llvm/Target/TargetInstrInfo.h
parent86ff296e63cd9d4c28a7b73d3d6ec05e4011a0e5 (diff)
downloadexternal_llvm-c101e95cb6aae1fd6a0727ba4b518a7894ae3089.zip
external_llvm-c101e95cb6aae1fd6a0727ba4b518a7894ae3089.tar.gz
external_llvm-c101e95cb6aae1fd6a0727ba4b518a7894ae3089.tar.bz2
Add a target hook to allow loads from constant pools to be rematerialized, and an
implementation for x86. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37576 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Target/TargetInstrInfo.h')
-rw-r--r--include/llvm/Target/TargetInstrInfo.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/llvm/Target/TargetInstrInfo.h b/include/llvm/Target/TargetInstrInfo.h
index 2571db4..e221466 100644
--- a/include/llvm/Target/TargetInstrInfo.h
+++ b/include/llvm/Target/TargetInstrInfo.h
@@ -298,6 +298,16 @@ public:
return 0;
}
+ /// isOtherReMaterializableLoad - If the specified machine instruction is a
+ /// direct load that is trivially rematerializable, not counting loads from
+ /// stack slots, return true. If not, return false. This predicate must
+ /// return false if the instruction has any side effects other than
+ /// producing the value from the load, or if it requres any address
+ /// registers that are not always available.
+ virtual bool isOtherReMaterializableLoad(MachineInstr *MI) const {
+ return false;
+ }
+
/// convertToThreeAddress - This method must be implemented by targets that
/// set the M_CONVERTIBLE_TO_3_ADDR flag. When this flag is set, the target
/// may be able to convert a two-address instruction into one or moretrue