Skip to content

Don’t pretend optinfo^.index can be aword(−1).

dfasetnotequal.patch

I tried to redo the unapplied part of !141 (closed), and while I didn’t get anything interesting, I also noticed that:

  1. No one ever sets toptinfo.index to aword(-1), the comment and the check are misleading. (And I think doing it has no obvious benefits over continuing not to do it?)

  2. Early exit in optdfa.TDFABuilder.CreateLifeInfo.CreateInfo.updatelifeinfo saves some dynamic array assignments. For example, when compiling the x86-64 compiler itself, it saves 270,000 assignments, speeding up on my computer CreateLifeInfo by 1% (2~3 ms out of 230) or the entire compilation by 2~3 ms out of 11,000, which is consistent with the microbenchmark result that dynarr := dynarr alone takes 8 ns (× 270,000 = 2 ms).

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information