summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/IPO
diff options
context:
space:
mode:
authorElena Demikhovsky <elena.demikhovsky@intel.com>2014-12-15 14:09:53 +0000
committerElena Demikhovsky <elena.demikhovsky@intel.com>2014-12-15 14:09:53 +0000
commita5599bfd7215e6ded1aad312c192f906d473877a (patch)
treeff7eac6e428e359c4e7a971f2da48cc76e42cbc7 /llvm/lib/Transforms/IPO
parent47c97157ef2df454eef13c70a7e1f89a7f3e7f06 (diff)
downloadbcm5719-llvm-a5599bfd7215e6ded1aad312c192f906d473877a.tar.gz
bcm5719-llvm-a5599bfd7215e6ded1aad312c192f906d473877a.zip
Sink store based on alias analysis
- by Ella Bolshinsky The alias analysis is used define whether the given instruction is a barrier for store sinking. For 2 identical stores, following instructions are checked in the both basic blocks, to determine whether they are sinking barriers. http://reviews.llvm.org/D6420 llvm-svn: 224247
Diffstat (limited to 'llvm/lib/Transforms/IPO')
-rw-r--r--llvm/lib/Transforms/IPO/ArgumentPromotion.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/IPO/ArgumentPromotion.cpp b/llvm/lib/Transforms/IPO/ArgumentPromotion.cpp
index c4706e89fab..32820229386 100644
--- a/llvm/lib/Transforms/IPO/ArgumentPromotion.cpp
+++ b/llvm/lib/Transforms/IPO/ArgumentPromotion.cpp
@@ -554,7 +554,8 @@ bool ArgPromotion::isSafeToPromoteArgument(Argument *Arg,
BasicBlock *BB = Load->getParent();
AliasAnalysis::Location Loc = AA.getLocation(Load);
- if (AA.canInstructionRangeModify(BB->front(), *Load, Loc))
+ if (AA.canInstructionRangeModRef(BB->front(), *Load, Loc,
+ AliasAnalysis::Mod))
return false; // Pointer is invalidated!
// Now check every path from the entry block to the load for transparency.
OpenPOWER on IntegriCloud