intel/compiler: Move dominance tree data structure into idom_tree object
authorFrancisco Jerez <currojerez@riseup.net>
Fri, 11 Mar 2016 04:49:54 +0000 (20:49 -0800)
committerMatt Turner <mattst88@gmail.com>
Fri, 6 Mar 2020 18:21:05 +0000 (10:21 -0800)
commitc9a608c0907ccdd745c8cb496e982bca68f8e6e4
treec89359c5a5715d2366a63cc8e7831e8bf544be06
parentc2a7eababf568ecd23377408e5f837e3bb2e9943
intel/compiler: Move dominance tree data structure into idom_tree object

It makes sense to keep the result of analysis passes independent from
the IR itself.  Instead of representing the idom tree as a pointer in
each basic block pointing to its immediate dominator, the whole
dominator tree is represented separately from the IR as an array of
pointers inside the idom_tree object.  This has the advantage that
it's no longer possible to use stale dominance results by accident
without having called require() beforehand, which makes sure that the
idom tree is recalculated if necessary.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4012>
src/intel/compiler/brw_cfg.cpp
src/intel/compiler/brw_cfg.h