forked from OSchip/llvm-project
[DivergenceAnalysis] Simplify inRegion test based on whether the RegionLoop pointer is null or not
More closely matches the documentation Requested by @nikic
This commit is contained in:
parent
06e9733fec
commit
be7dbd674c
|
@ -130,8 +130,7 @@ bool DivergenceAnalysisImpl::inRegion(const Instruction &I) const {
|
|||
}
|
||||
|
||||
bool DivergenceAnalysisImpl::inRegion(const BasicBlock &BB) const {
|
||||
return (!RegionLoop && BB.getParent() == &F) ||
|
||||
(RegionLoop && RegionLoop->contains(&BB));
|
||||
return RegionLoop ? RegionLoop->contains(&BB) : (BB.getParent() == &F);
|
||||
}
|
||||
|
||||
void DivergenceAnalysisImpl::pushUsers(const Value &V) {
|
||||
|
|
Loading…
Reference in New Issue