summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/Sink.cpp
diff options
context:
space:
mode:
authorAlina Sbirlea <asbirlea@google.com>2017-12-05 20:12:23 +0000
committerAlina Sbirlea <asbirlea@google.com>2017-12-05 20:12:23 +0000
commit63d2250a42b7b1e35e747ab07e181d2d8ec86dbc (patch)
tree345563f84db07f03c3bf6c60b7acfb955089c956 /llvm/lib/Transforms/Scalar/Sink.cpp
parentf6ae323ddf4c193d8a26a490cba3c6608e0dc91b (diff)
downloadbcm5719-llvm-63d2250a42b7b1e35e747ab07e181d2d8ec86dbc.tar.gz
bcm5719-llvm-63d2250a42b7b1e35e747ab07e181d2d8ec86dbc.zip
Modify ModRefInfo values using static inline method abstractions [NFC].
Summary: The aim is to make ModRefInfo checks and changes more intuitive and less error prone using inline methods that abstract the bit operations. Ideally ModRefInfo would become an enum class, but that change will require a wider set of changes into FunctionModRefBehavior. Reviewers: sanjoy, george.burgess.iv, dberlin, hfinkel Subscribers: nlopes, llvm-commits Differential Revision: https://reviews.llvm.org/D40749 llvm-svn: 319821
Diffstat (limited to 'llvm/lib/Transforms/Scalar/Sink.cpp')
-rw-r--r--llvm/lib/Transforms/Scalar/Sink.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Scalar/Sink.cpp b/llvm/lib/Transforms/Scalar/Sink.cpp
index 5210f165b87..cfb8a062299 100644
--- a/llvm/lib/Transforms/Scalar/Sink.cpp
+++ b/llvm/lib/Transforms/Scalar/Sink.cpp
@@ -68,7 +68,7 @@ static bool isSafeToMove(Instruction *Inst, AliasAnalysis &AA,
if (LoadInst *L = dyn_cast<LoadInst>(Inst)) {
MemoryLocation Loc = MemoryLocation::get(L);
for (Instruction *S : Stores)
- if (AA.getModRefInfo(S, Loc) & MRI_Mod)
+ if (isModSet(AA.getModRefInfo(S, Loc)))
return false;
}
@@ -83,7 +83,7 @@ static bool isSafeToMove(Instruction *Inst, AliasAnalysis &AA,
return false;
for (Instruction *S : Stores)
- if (AA.getModRefInfo(S, CS) & MRI_Mod)
+ if (isModSet(AA.getModRefInfo(S, CS)))
return false;
}
OpenPOWER on IntegriCloud