i965: Replace fs_reg(fs_visitor, type) with fs_visitor::vgrf(type).
authorKenneth Graunke <kenneth@whitecape.org>
Fri, 16 May 2014 09:21:51 +0000 (02:21 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Mon, 19 Jan 2015 21:13:34 +0000 (13:13 -0800)
commitd1533d87cc7e2c39e7ce9dc838b45a2c39c96e33
tree881f381238c2eddd15bf9327ed193e514cb19be7
parent5b01512df3328711968dea7240ae817721c79774
i965: Replace fs_reg(fs_visitor, type) with fs_visitor::vgrf(type).

I dislike how fs_reg has a constructor that knows about fs_visitor.
Apart from that, it stands alone, with no need to interact with the
rest of the compiler.  Which is sensible - a class that represents
a register should do just that.  Allocating virtual register numbers
should be left up to the compiler (fs_visitor).

This patch replaces the constructor with a new fs_visitor::vgrf method,
eliminating fs_reg's dependency on fs_visitor.  It ends up being no
more code.

v2: Rebase from May 2014 -> January 2015.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/mesa/drivers/dri/i965/brw_fs.cpp
src/mesa/drivers/dri/i965/brw_fs.h
src/mesa/drivers/dri/i965/brw_fs_fp.cpp
src/mesa/drivers/dri/i965/brw_fs_nir.cpp
src/mesa/drivers/dri/i965/brw_fs_sel_peephole.cpp
src/mesa/drivers/dri/i965/brw_fs_visitor.cpp