summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
diff options
context:
space:
mode:
authorSanjoy Das <sanjoy@playingwithpointers.com>2016-06-26 04:55:13 +0000
committerSanjoy Das <sanjoy@playingwithpointers.com>2016-06-26 04:55:13 +0000
commit6cf88091b31334cf5334fa6badb0dae63a44b3ba (patch)
tree5cc6e0c48c3147807ddeb264b1e5b066e880e875 /llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
parentbd43d0e2d0407bde82fc5526af8d45c86bfcd7f3 (diff)
downloadbcm5719-llvm-6cf88091b31334cf5334fa6badb0dae63a44b3ba.tar.gz
bcm5719-llvm-6cf88091b31334cf5334fa6badb0dae63a44b3ba.zip
[RSForGC] Bring meetBDVStateImpl up to code; NFC
llvm-svn: 273793
Diffstat (limited to 'llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp')
-rw-r--r--llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp27
1 files changed, 13 insertions, 14 deletions
diff --git a/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp b/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
index c1bf2b734eb..486a042c708 100644
--- a/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
+++ b/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
@@ -601,29 +601,28 @@ static raw_ostream &operator<<(raw_ostream &OS, const BDVState &State) {
}
#endif
-static BDVState meetBDVStateImpl(const BDVState &stateA,
- const BDVState &stateB) {
- switch (stateA.getStatus()) {
+static BDVState meetBDVStateImpl(const BDVState &LHS, const BDVState &RHS) {
+ switch (LHS.getStatus()) {
case BDVState::Unknown:
- return stateB;
+ return RHS;
case BDVState::Base:
- assert(stateA.getBase() && "can't be null");
- if (stateB.isUnknown())
- return stateA;
-
- if (stateB.isBase()) {
- if (stateA.getBase() == stateB.getBase()) {
- assert(stateA == stateB && "equality broken!");
- return stateA;
+ assert(LHS.getBase() && "can't be null");
+ if (RHS.isUnknown())
+ return LHS;
+
+ if (RHS.isBase()) {
+ if (LHS.getBase() == RHS.getBase()) {
+ assert(LHS == RHS && "equality broken!");
+ return LHS;
}
return BDVState(BDVState::Conflict);
}
- assert(stateB.isConflict() && "only three states!");
+ assert(RHS.isConflict() && "only three states!");
return BDVState(BDVState::Conflict);
case BDVState::Conflict:
- return stateA;
+ return LHS;
}
llvm_unreachable("only three states!");
}
OpenPOWER on IntegriCloud