Created attachment 397768 [details] [diff] [review] patch This patch adds some helpful comments, and make some tweaks: - Avoids passing an argument to findVictim() that it can access instead via an object field. - Documents findRegFor(), evictIfActive(), evict(). - Makes the comment about dead code elimination more concise, and adds some details about register allocation. - Makes evictRegs() more concise.
Created attachment 397769 [details] [diff] [review] revised patch
Comment on attachment 397769 [details] [diff] [review] revised patch +1 on the comment wording. fwiw, i think of the current RegAlloc and AR state as a contract that we must meet to satisfy code we have already emitted. in findVictim, it might help a tiny bit for _allocator to be in a local variable instead of accessing [this.]_allocator inside the loop. (C++ compiler might not eliminate the load). or, maybe it won't matter at all.