Hide 'align' instruction behind jmp (#60787)
* Hide align behind a jmp
fix the alignBytesRemoved
Some fixes and working model
Some fixes and redesign
Some more fixes
more fixes
fix
Add the check for fgFirstBB
misc changes
code cleanup + JitHideAlignBehindJmp switch
validatePadding only if align are before the loop IG
More cleanup, remove commented code
jit format
* Fix a problem where curIG==0 and loop might be emitted in curIG, adjust the targetIG to prevIG
Add IGF_REMOVED_ALIGN flag for special scenarios
* Add stress mode to emit int3 for xarch
* Add stress mode to emit bkpt for arm64
* Add a loop align instruction placement phase
* review comments
* Change from unsigned short to unsigned
* review comments around cleanup
* emitForceNewIG
* Remove emitPrevIG
* Revert change to forceNewIG for align instruction
* Use loopAlignCandidates
* Use loopHeadIG reference
* jit format
* Remove unneeded method
* Misc changes
* Review feedback
* Do not include align behind Jmp in PerfScore calculation
* jit format and fix a bug
* fix the loopCandidates == 0 scenario
* Add unmarkLoopAlign(), add check for fgFirstBB
* merge conflict fix
* Add missing }
* Grammar nit
Co-authored-by: Bruce Forstall <brucefo@microsoft.com>
Co-authored-by: Bruce Forstall <brucefo@microsoft.com>
14 files changed: