diff options
author | Evan Cheng <evan.cheng@apple.com> | 2011-02-02 01:06:55 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2011-02-02 01:06:55 +0000 |
commit | 31959b19a72608051888160514977875a8027dfc (patch) | |
tree | 503b054cb3f31e6aa56154606611c06c12fd0d66 /include | |
parent | 63f8659d6936077c5e8e34eecb55ff1de0db5686 (diff) | |
download | llvm-31959b19a72608051888160514977875a8027dfc.tar.gz llvm-31959b19a72608051888160514977875a8027dfc.tar.bz2 llvm-31959b19a72608051888160514977875a8027dfc.tar.xz |
Given a pair of floating point load and store, if there are no other uses of
the load, then it may be legal to transform the load and store to integer
load and store of the same width.
This is done if the target specified the transformation as profitable. e.g.
On arm, this can transform:
vldr.32 s0, []
vstr.32 s0, []
to
ldr r12, []
str r12, []
rdar://8944252
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124708 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/Target/TargetLowering.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/llvm/Target/TargetLowering.h b/include/llvm/Target/TargetLowering.h index c81d1f76d0..5141b7b562 100644 --- a/include/llvm/Target/TargetLowering.h +++ b/include/llvm/Target/TargetLowering.h @@ -963,6 +963,13 @@ public: return isTypeLegal(VT); } + /// isDesirableToPromoteOp - Return true if it is profitable for dag combiner + /// to transform a floating point op of specified opcode to a equivalent op of + /// an integer type. e.g. f32 load -> i32 load can be profitable on ARM. + virtual bool isDesirableToTransformToIntegerOp(unsigned Opc, EVT VT) const { + return false; + } + /// IsDesirableToPromoteOp - This method query the target whether it is /// beneficial for dag combiner to promote the specified node. If true, it /// should return the desired promotion type by reference. |