intel/compiler: Move idom tree calculation and related logic into analysis object

This only does half of the work.  The actual representation of the
idom tree is left untouched, but the computation algorithm is moved
into a separate analysis result class wrapped in a BRW_ANALYSIS
object, along with the intersect() and dump_domtree() auxiliary
functions in order to keep things tidy.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4012>
This commit is contained in:
Francisco Jerez
2016-03-09 23:31:05 -08:00
committed by Matt Turner
parent 2878817197
commit c2a7eababf
5 changed files with 59 additions and 32 deletions

View File

@@ -703,7 +703,7 @@ backend_shader::backend_shader(const struct brw_compiler *compiler,
nir(shader),
stage_prog_data(stage_prog_data),
mem_ctx(mem_ctx),
cfg(NULL),
cfg(NULL), idom_analysis(this),
stage(shader->info.stage)
{
debug_enabled = INTEL_DEBUG & intel_debug_flag_for_shader_stage(stage);
@@ -1248,6 +1248,7 @@ backend_shader::calculate_cfg()
void
backend_shader::invalidate_analysis(brw::analysis_dependency_class c)
{
idom_analysis.invalidate(c);
}
extern "C" const unsigned *