From ec3d727d83019e752178efc3739f0d52b71de820 Mon Sep 17 00:00:00 2001 From: Sanjoy Das Date: Sun, 26 Jun 2016 04:55:13 +0000 Subject: [RSForGC] Bring meetBDVStateImpl up to code; NFC git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273793 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/Scalar/RewriteStatepointsForGC.cpp | 27 +++++++++++------------ 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp b/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp index c1bf2b734eb..486a042c708 100644 --- a/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp +++ b/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!"); } -- cgit v1.2.3