diff options
author | Evan Cheng <evan.cheng@apple.com> | 2007-03-12 23:37:10 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2007-03-12 23:37:10 +0000 |
commit | b7004fd8893e6979038d8b28944eb9334a84a143 (patch) | |
tree | e69bf3e8578eb4e21c071f2fa32c0cf4406eeb93 /llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp | |
parent | 2150b9286fb6ab90bc94f0922235a8aeca462fd3 (diff) | |
download | bcm5719-llvm-b7004fd8893e6979038d8b28944eb9334a84a143.tar.gz bcm5719-llvm-b7004fd8893e6979038d8b28944eb9334a84a143.zip |
More flexible TargetLowering LSR hooks for testing whether an immediate is a legal target address immediate or scale.
llvm-svn: 35076
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp index 39f6fe79a97..faa50295690 100644 --- a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp +++ b/llvm/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 |