forked from OSchip/llvm-project
[RSForGC] Bring meetBDVStateImpl up to code; NFC
llvm-svn: 273793
This commit is contained in:
parent
bd43d0e2d0
commit
6cf88091b3
|
@ -601,29 +601,28 @@ static raw_ostream &operator<<(raw_ostream &OS, const BDVState &State) {
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static BDVState meetBDVStateImpl(const BDVState &stateA,
|
static BDVState meetBDVStateImpl(const BDVState &LHS, const BDVState &RHS) {
|
||||||
const BDVState &stateB) {
|
switch (LHS.getStatus()) {
|
||||||
switch (stateA.getStatus()) {
|
|
||||||
case BDVState::Unknown:
|
case BDVState::Unknown:
|
||||||
return stateB;
|
return RHS;
|
||||||
|
|
||||||
case BDVState::Base:
|
case BDVState::Base:
|
||||||
assert(stateA.getBase() && "can't be null");
|
assert(LHS.getBase() && "can't be null");
|
||||||
if (stateB.isUnknown())
|
if (RHS.isUnknown())
|
||||||
return stateA;
|
return LHS;
|
||||||
|
|
||||||
if (stateB.isBase()) {
|
if (RHS.isBase()) {
|
||||||
if (stateA.getBase() == stateB.getBase()) {
|
if (LHS.getBase() == RHS.getBase()) {
|
||||||
assert(stateA == stateB && "equality broken!");
|
assert(LHS == RHS && "equality broken!");
|
||||||
return stateA;
|
return LHS;
|
||||||
}
|
}
|
||||||
return BDVState(BDVState::Conflict);
|
return BDVState(BDVState::Conflict);
|
||||||
}
|
}
|
||||||
assert(stateB.isConflict() && "only three states!");
|
assert(RHS.isConflict() && "only three states!");
|
||||||
return BDVState(BDVState::Conflict);
|
return BDVState(BDVState::Conflict);
|
||||||
|
|
||||||
case BDVState::Conflict:
|
case BDVState::Conflict:
|
||||||
return stateA;
|
return LHS;
|
||||||
}
|
}
|
||||||
llvm_unreachable("only three states!");
|
llvm_unreachable("only three states!");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue