diff options
author | Dan Gohman <gohman@apple.com> | 2010-01-21 02:09:26 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2010-01-21 02:09:26 +0000 |
commit | a10756ee657a4d43a48cca5c166919093930ed6b (patch) | |
tree | 52a9cf0b867521026963ca127f6a46d19f0f8f78 /lib/Target | |
parent | ac8b4bf66b7263018fe6c133604a30780c24982e (diff) | |
download | llvm-a10756ee657a4d43a48cca5c166919093930ed6b.tar.gz llvm-a10756ee657a4d43a48cca5c166919093930ed6b.tar.bz2 llvm-a10756ee657a4d43a48cca5c166919093930ed6b.tar.xz |
Re-implement the main strength-reduction portion of LoopStrengthReduction.
This new version is much more aggressive about doing "full" reduction in
cases where it reduces register pressure, and also more aggressive about
rewriting induction variables to count down (or up) to zero when doing so
reduces register pressure.
It currently uses fairly simplistic algorithms for finding reuse
opportunities, but it introduces a new framework allows it to combine
multiple strategies at once to form hybrid solutions, instead of doing
all full-reduction or all base+index.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94061 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target')
-rw-r--r-- | lib/Target/X86/X86ISelDAGToDAG.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Target/X86/X86ISelDAGToDAG.cpp b/lib/Target/X86/X86ISelDAGToDAG.cpp index 01cad71977..91e04838c9 100644 --- a/lib/Target/X86/X86ISelDAGToDAG.cpp +++ b/lib/Target/X86/X86ISelDAGToDAG.cpp @@ -944,7 +944,7 @@ bool X86DAGToDAGISel::MatchAddressRecursively(SDValue N, X86ISelAddressMode &AM, // Okay, we know that we have a scale by now. However, if the scaled // value is an add of something and a constant, we can fold the // constant into the disp field here. - if (ShVal.getNode()->getOpcode() == ISD::ADD && ShVal.hasOneUse() && + if (ShVal.getNode()->getOpcode() == ISD::ADD && isa<ConstantSDNode>(ShVal.getNode()->getOperand(1))) { AM.IndexReg = ShVal.getNode()->getOperand(0); ConstantSDNode *AddVal = |