On Tue, Jun 9, 2015 at 5:23 PM, Kenneth Graunke <kenn...@whitecape.org> wrote:
> Connor and I have both hit bugs where code (such as dump_instructions())
> attempts to use live intervals or VGRF information, and wasted a bunch
> of time trying to debug that.
>
> By freeing the arrays and zeroing the counts, we make any array access
> out of bounds, which results in an obvious problem that's easy to
> uncover with Valgrind, rather than subtle bugs.

That seems fine... but the first two statements in
fs_visitor::calculate_register_pressure() are

   invalidate_live_intervals();
   calculate_live_intervals();

I don't think calculate_live_intervals() will go anything good if
we've already allocated registers, so what is the goal? To simply make
recognizing the explosion caused by calling dump_instructions() after
RA easier?

If we don't have a flag signifying that we've already colored
registers, maybe we should add one and use it to avoid the
live_intervals stuff in dump_instructions(), and maybe assert that
it's false in calculate_live_intervals() as well?
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to