[3/4] i965: Don't set alloc.count = grf_used.

Submitted by Kenneth Graunke on Feb. 23, 2018, 8:36 a.m.


Message ID 20180223083615.3748-3-kenneth@whitecape.org
State New
Headers show
Series "Series without cover letter" ( rev: 2 1 ) in Mesa

Not browsing as part of any series.

Commit Message

Kenneth Graunke Feb. 23, 2018, 8:36 a.m.
alloc is about virtual registers, and grf_used is the number of actual
hardware registers used.  alloc's information is not terribly useful
after register allocation, but there's no real use in conflating them.

I plan to generate two CFGs from a single fs_visitor invocation, each
representing a different dispatch mode for basically the same shader.
This involves running register allocation twice, which means we can't
destroy the virtual register information.  (It's fine if we generate
extra VGRFs during RA due to spilling - the extra copy of the CFG
simply won't refer to them, so they'll be discarded in the 2nd RA.)
 src/intel/compiler/brw_fs_reg_allocate.cpp | 4 ----
 1 file changed, 4 deletions(-)

Patch hide | download patch | download mbox

diff --git a/src/intel/compiler/brw_fs_reg_allocate.cpp b/src/intel/compiler/brw_fs_reg_allocate.cpp
index ec8e116cb38..7c5ff2ed59c 100644
--- a/src/intel/compiler/brw_fs_reg_allocate.cpp
+++ b/src/intel/compiler/brw_fs_reg_allocate.cpp
@@ -66,8 +66,6 @@  fs_visitor::assign_regs_trivial()
    if (this->grf_used >= max_grf) {
       fail("Ran out of regs on trivial allocator (%d/%d)\n",
 	   this->grf_used, max_grf);
-   } else {
-      this->alloc.count = this->grf_used;
@@ -702,8 +700,6 @@  fs_visitor::assign_regs(bool allow_spilling, bool spill_all)
-   this->alloc.count = this->grf_used;
    return true;