intel/fs: Initialize fs_visitor::grf_used on construction.
authorFrancisco Jerez <currojerez@riseup.net>
Sun, 17 Dec 2017 08:21:13 +0000 (00:21 -0800)
committerFrancisco Jerez <currojerez@riseup.net>
Thu, 21 Dec 2017 23:20:17 +0000 (15:20 -0800)
This should shut up some Valgrind errors during pre-regalloc
scheduling.  The errors were harmless since they could only have led
to the estimation of the bank conflict penalty of an instruction
pre-regalloc, which is inaccurate at that point of the program
compilation, but no less accurate than the intended "return 0"
fall-back path.  The scheduling pass is normally re-run after regalloc
with a well-defined grf_used value and accurate bank conflict
information.

Fixes: acf98ff933d "intel/fs: Teach instruction scheduler about GRF bank conflict cycles."
Reported-by: Eero Tamminen <eero.t.tamminen@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/intel/compiler/brw_fs_visitor.cpp

index 481d9c51e7a700c9dce84442d985c29107694115..7a5f6451f2bb4c6706289082de8606a871305d80 100644 (file)
@@ -898,6 +898,7 @@ fs_visitor::init()
 
    this->promoted_constants = 0,
 
+   this->grf_used = 0;
    this->spilled_any_registers = false;
 }