Rune - re-enable bypass optimizations
authorMatthew Dillon <dillon@backplane.com>
Mon, 11 Jun 2018 02:45:15 +0000 (19:45 -0700)
committerMatthew Dillon <dillon@backplane.com>
Mon, 11 Jun 2018 04:11:49 +0000 (21:11 -0700)
commit237b63851ebb2f6683bcfd55af93c623b0173020
tree398cc3f4c56f06c5d36aafe61e16ae87d71fa0eb
parent49cc3f7296cf6fd4f74b4d51b506fb28e46bd028
Rune - re-enable bypass optimizations

* Re-enable the BYPASS_SKIP optimization and refine the algorithm.
  Previously this bypass optimization could cause one-time-use temporary
  registers to be reserved indefinitely for code inside a conditional
  block, causing RAS to run out of registers.  The refinement should
  fix that problem.

  The refinement involves converting WRITEs to READ|WRITE (read-modify-
  write) in a bypass situation as before, but ONLY if the variable
  does not represent RAF_LIFE_BEG, plus a previous match is present
  (which tends to go hand-in-hand).  Meaning that variables whos
  life-time begins with the WRITE can remain WRITE and not be
  converted to READ|WRITE despite the bypass.

* The same bug also affected BYPASS_ALL and should also now be fixed
  (and even give us not-so-terrible register optimizations).

* Now that this implemented, RAS generates significantly better
  registerization, and the complexity of the brute-force algorithm
  is significantly reduced.

* WARNING!  This is a dangerous change, so if assembly output
  starts to break register use it might be due to this commit.
ras/block.c