projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
06e9733
)
[DivergenceAnalysis] Simplify inRegion test based on whether the RegionLoop pointer...
author
Simon Pilgrim
<llvm-dev@redking.me.uk>
Sat, 8 Jan 2022 14:30:10 +0000
(14:30 +0000)
committer
Simon Pilgrim
<llvm-dev@redking.me.uk>
Sat, 8 Jan 2022 14:30:10 +0000
(14:30 +0000)
More closely matches the documentation
Requested by @nikic
llvm/lib/Analysis/DivergenceAnalysis.cpp
patch
|
blob
|
history
diff --git
a/llvm/lib/Analysis/DivergenceAnalysis.cpp
b/llvm/lib/Analysis/DivergenceAnalysis.cpp
index
3a92819
..
62ac6f6
100644
(file)
--- a/
llvm/lib/Analysis/DivergenceAnalysis.cpp
+++ b/
llvm/lib/Analysis/DivergenceAnalysis.cpp
@@
-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) {