aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Target/TargetLowering.h
diff options
context:
space:
mode:
authorPete Cooper <peter_cooper@apple.com>2012-03-13 20:59:56 +0000
committerPete Cooper <peter_cooper@apple.com>2012-03-13 20:59:56 +0000
commitf210b68b41704cb602feffa4ebb334220abda407 (patch)
treec8f6f273b6f602a81820b739450ce487954a6595 /include/llvm/Target/TargetLowering.h
parentb9153bacd05f4e31f8d841a54ee035abea5b3f41 (diff)
downloadexternal_llvm-f210b68b41704cb602feffa4ebb334220abda407.zip
external_llvm-f210b68b41704cb602feffa4ebb334220abda407.tar.gz
external_llvm-f210b68b41704cb602feffa4ebb334220abda407.tar.bz2
Target override to allow CodeGenPrepare to sink address operands to intrinsics in the same way it current does for loads and stores
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152666 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Target/TargetLowering.h')
-rw-r--r--include/llvm/Target/TargetLowering.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/llvm/Target/TargetLowering.h b/include/llvm/Target/TargetLowering.h
index 4f3e432..793b080 100644
--- a/include/llvm/Target/TargetLowering.h
+++ b/include/llvm/Target/TargetLowering.h
@@ -41,6 +41,7 @@ namespace llvm {
class FastISel;
class FunctionLoweringInfo;
class ImmutableCallSite;
+ class IntrinsicInst;
class MachineBasicBlock;
class MachineFunction;
class MachineInstr;
@@ -1539,6 +1540,17 @@ public:
AddrMode() : BaseGV(0), BaseOffs(0), HasBaseReg(false), Scale(0) {}
};
+ /// GetAddrModeArguments - CodeGenPrepare sinks address calculations into the
+ /// same BB as Load/Store instructions reading the address. This allows as
+ /// much computation as possible to be done in the address mode for that
+ /// operand. This hook lets targets also pass back when this should be done
+ /// on intrinsics which load/store.
+ virtual bool GetAddrModeArguments(IntrinsicInst *I,
+ SmallVectorImpl<Value*> &Ops,
+ Type *&AccessTy) const {
+ return false;
+ }
+
/// isLegalAddressingMode - Return true if the addressing mode represented by
/// AM is legal for this target, for a load/store of the specified type.
/// The type may be VoidTy, in which case only return true if the addressing