diff options
author | Artur Pilipenko <apilipenko@azulsystems.com> | 2016-01-15 15:27:46 +0000 |
---|---|---|
committer | Artur Pilipenko <apilipenko@azulsystems.com> | 2016-01-15 15:27:46 +0000 |
commit | 6dd6969cee28a71ce6dad138a73ff703c5d43d55 (patch) | |
tree | 58e4e542c72f99e80c923f79adb28c784f3e5aba /llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp | |
parent | 895242f9fbb050d896064ab9eb330e8535e2f96f (diff) | |
download | bcm5719-llvm-6dd6969cee28a71ce6dad138a73ff703c5d43d55.tar.gz bcm5719-llvm-6dd6969cee28a71ce6dad138a73ff703c5d43d55.zip |
Change isSafeToLoadUnconditionally arguments order. Separated from http://reviews.llvm.org/D10920.
llvm-svn: 257894
Diffstat (limited to 'llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp')
-rw-r--r-- | llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp b/llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp index 114d22ddf2e..0fc6953350b 100644 --- a/llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp +++ b/llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp @@ -1151,12 +1151,12 @@ static bool isSafeSelectToSpeculate(SelectInst *SI) { // Both operands to the select need to be dereferencable, either absolutely // (e.g. allocas) or at this point because we can see other accesses to it. if (!TDerefable && - !isSafeToLoadUnconditionally(SI->getTrueValue(), LI, - LI->getAlignment())) + !isSafeToLoadUnconditionally(SI->getTrueValue(), LI->getAlignment(), + LI)) return false; if (!FDerefable && - !isSafeToLoadUnconditionally(SI->getFalseValue(), LI, - LI->getAlignment())) + !isSafeToLoadUnconditionally(SI->getFalseValue(), LI->getAlignment(), + LI)) return false; } @@ -1230,7 +1230,7 @@ static bool isSafePHIToSpeculate(PHINode *PN) { // If this pointer is always safe to load, or if we can prove that there is // already a load in the block, then we can move the load to the pred block. if (isDereferenceablePointer(InVal, DL) || - isSafeToLoadUnconditionally(InVal, Pred->getTerminator(), MaxAlign)) + isSafeToLoadUnconditionally(InVal, MaxAlign, Pred->getTerminator())) continue; return false; |