aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/SelectionDAG/TargetLowering.cpp
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2007-03-12 23:37:10 +0000
committerEvan Cheng <evan.cheng@apple.com>2007-03-12 23:37:10 +0000
commitc289faf01559584be1ead2574631d54940a4dd4f (patch)
tree1b59aeac77e2b0475dba0bd5acf4c076c0d9ccc3 /lib/CodeGen/SelectionDAG/TargetLowering.cpp
parentb01fad6d19ac83f9c97eee16af438507383f36d8 (diff)
More flexible TargetLowering LSR hooks for testing whether an immediate is a legal target address immediate or scale.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35076 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/TargetLowering.cpp')
-rw-r--r--lib/CodeGen/SelectionDAG/TargetLowering.cpp16
1 files changed, 13 insertions, 3 deletions
diff --git a/lib/CodeGen/SelectionDAG/TargetLowering.cpp b/lib/CodeGen/SelectionDAG/TargetLowering.cpp
index 39f6fe79a9..faa5029569 100644
--- a/lib/CodeGen/SelectionDAG/TargetLowering.cpp
+++ b/lib/CodeGen/SelectionDAG/TargetLowering.cpp
@@ -1931,15 +1931,25 @@ getRegForInlineAsmConstraint(const std::string &Constraint,
// Loop Strength Reduction hooks
//===----------------------------------------------------------------------===//
-/// isLegalAddressImmediate - Return true if the integer value or
-/// GlobalValue can be used as the offset of the target addressing mode.
-bool TargetLowering::isLegalAddressImmediate(int64_t V) const {
+/// isLegalAddressImmediate - Return true if the integer value can be used as
+/// the offset of the target addressing mode for load / store of the given
+/// type.
+bool TargetLowering::isLegalAddressImmediate(int64_t V, const Type *Ty) const {
return false;
}
+
+/// isLegalAddressImmediate - Return true if the GlobalValue can be used as
+/// the offset of the target addressing mode.
bool TargetLowering::isLegalAddressImmediate(GlobalValue *GV) const {
return false;
}
+/// isLegalAddressScale - Return true if the integer value can be used as the
+/// scale of the target addressing mode for load / store of the given type.
+bool TargetLowering::isLegalAddressScale(int64_t S, const Type *Ty) const {
+ return false;
+}
+
// Magic for divide replacement