Optimize the iteration over all registers in various places in LSRA #87337
Labels
area-CodeGen-coreclr
CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
Milestone
As a continuation of #83109, I audited the places where we iterate over all the registers in LSRA code base. I would categorize it:
Most of them are in
#ifdef DEBUG
Few are at the beginning of methods like
allocateRegister()
andresolveRegister()
. The one inallocateRegister()
can be done better duringRegisterRecord
initialization perhaps or creating intervals.Then, there are instances where they happen during building interval or allocation.
resetAllRegistersState()
, we reset the assigned interval at block boundaries for minopts.processStartBlockStartLocations()
, we can optimize it to just iterate on liveRegs mask with bitwise iterator instead of for-loop.addRefsForPhysRegMask()
- Used during kill positions, Here too, should be able to use bitwise iterator or bitscanforward technique.The text was updated successfully, but these errors were encountered: