[Mesa-dev] [PATCH 28/30] i965/ir: Simplify new_idom reduction in dominance tree calculation.
Francisco Jerez
currojerez at riseup.net
Mon Mar 14 03:47:32 UTC 2016
Trivial, just use a few less tokens to do the same thing.
---
src/mesa/drivers/dri/i965/brw_cfg.cpp | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/brw_cfg.cpp b/src/mesa/drivers/dri/i965/brw_cfg.cpp
index f951f44..8701d16 100644
--- a/src/mesa/drivers/dri/i965/brw_cfg.cpp
+++ b/src/mesa/drivers/dri/i965/brw_cfg.cpp
@@ -474,11 +474,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);
}
}
--
2.7.0
More information about the mesa-dev
mailing list