aboutsummaryrefslogtreecommitdiffstats
path: root/src/intel/compiler
diff options
context:
space:
mode:
authorFrancisco Jerez <[email protected]>2016-03-10 20:56:47 -0800
committerMatt Turner <[email protected]>2020-03-06 10:21:07 -0800
commitf6cdf66cd6e2515471c7944f67ddb87881c2366e (patch)
treea78fd2c4d43fc22fb7c99e0bd5d5fd43e01102be /src/intel/compiler
parentc9a608c0907ccdd745c8cb496e982bca68f8e6e4 (diff)
entel/compiler: Simplify new_idom reduction in dominance tree calculation
Trivial, just use a few less tokens to do the same thing. Reviewed-by: Matt Turner <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4012>
Diffstat (limited to 'src/intel/compiler')
-rw-r--r--src/intel/compiler/brw_cfg.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/intel/compiler/brw_cfg.cpp b/src/intel/compiler/brw_cfg.cpp
index b681e098ab6..e476ea36217 100644
--- a/src/intel/compiler/brw_cfg.cpp
+++ b/src/intel/compiler/brw_cfg.cpp
@@ -554,11 +554,8 @@ idom_tree::idom_tree(const backend_shader *s) :
bblock_t *new_idom = NULL;
foreach_list_typed(bblock_link, parent_link, link, &block->parents) {
if (parent(parent_link->block)) {
- if (new_idom == NULL) {
- new_idom = parent_link->block;
- } else if (parent(parent_link->block) != NULL) {
- new_idom = intersect(parent_link->block, new_idom);
- }
+ new_idom = (new_idom ? intersect(new_idom, parent_link->block) :
+ parent_link->block);
}
}