X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fmesa%2Fdrivers%2Fdri%2Fi965%2Fintel_asm_annotation.c;h=b01490a1822e341f02d3eae0377b7b452ca47566;hb=ed65e6ef49e17e9cae93a8f98e2968346de2bc6e;hp=fdd605a7db06d3b31da20772375c81db77816ad7;hpb=1469ccb7464836c752fa2664c36d8fae7e80606c;p=mesa.git diff --git a/src/mesa/drivers/dri/i965/intel_asm_annotation.c b/src/mesa/drivers/dri/i965/intel_asm_annotation.c index fdd605a7db0..b01490a1822 100644 --- a/src/mesa/drivers/dri/i965/intel_asm_annotation.c +++ b/src/mesa/drivers/dri/i965/intel_asm_annotation.c @@ -25,11 +25,11 @@ #include "brw_eu.h" #include "intel_debug.h" #include "intel_asm_annotation.h" -#include "glsl/nir/nir.h" +#include "compiler/nir/nir.h" void dump_assembly(void *assembly, int num_annotations, struct annotation *annotation, - const struct brw_device_info *devinfo) + const struct gen_device_info *devinfo) { const char *last_annotation_string = NULL; const void *last_annotation_ir = NULL; @@ -100,7 +100,7 @@ annotation_array_ensure_space(struct annotation_info *annotation) return true; } -void annotate(const struct brw_device_info *devinfo, +void annotate(const struct gen_device_info *devinfo, struct annotation_info *annotation, const struct cfg_t *cfg, struct backend_instruction *inst, unsigned offset) { @@ -121,24 +121,6 @@ void annotate(const struct brw_device_info *devinfo, ann->block_start = cfg->blocks[annotation->cur_block]; } - if (bblock_end(cfg->blocks[annotation->cur_block]) == inst) { - ann->block_end = cfg->blocks[annotation->cur_block]; - annotation->cur_block++; - } - - /* Merge this annotation with the previous if possible. */ - struct annotation *prev = annotation->ann_count > 1 ? - &annotation->ann[annotation->ann_count - 2] : NULL; - if (prev != NULL && - ann->ir == prev->ir && - ann->annotation == prev->annotation && - ann->block_start == NULL && - prev->block_end == NULL) { - if (ann->block_end == NULL) - annotation->ann_count--; - return; - } - /* There is no hardware DO instruction on Gen6+, so since DO always * starts a basic block, we need to set the .block_start of the next * instruction's annotation with a pointer to the bblock started by @@ -150,6 +132,11 @@ void annotate(const struct brw_device_info *devinfo, if (devinfo->gen >= 6 && inst->opcode == BRW_OPCODE_DO) { annotation->ann_count--; } + + if (bblock_end(cfg->blocks[annotation->cur_block]) == inst) { + ann->block_end = cfg->blocks[annotation->cur_block]; + annotation->cur_block++; + } } void