-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Detect inner loop and add 10 bytes of padding at the beginning * generate nop in previous blocks * TODO: figure out if anything needs to be done in optCanonicalizeLoop * Add COMPlus_JitAlignLoopMinBlockWeight and COMPlus_JitAlignLoopMaxCodeSize - Add 2 variables to control which loops get aligned - Moved padding after the conditional/unconditional jump of previous block * Reuse AlignLoops flag for dynamic loop alignment * Detect back edge and count no. of instructions before doing loop alignment * fix bugs * propagate the basic block flag * Switch from instrCount to codeSize * JitAlignLoopWith32BPadding * Add emitLoopAlign32Bytes() * wip * Add logic to avoid emitting nop if not needed * fix a condition * Several things: - Replaced JitAlignLoopWith32BPadding with JitAlignLoopBoundary - Added JitAlignLoopForJcc - Added logging of boundary and point where instruction splitting happpens - Add logic to take into consideration JCC. * Added JitAlignLoopAdaptive algorithm * wip * revert emitarm64.cpp changes * fix errors during merge * fix build errors * refactoring and cleanup * refactoring and build errors fix * jit format * one more build error * Add emitLoopAlignAdjustments() * Update emitLoopAlignAdjustments to just include loopSize calc * Remove #ifdef ADAPTIVE_LOOP_ALIGNMENT * Code cleanup * minor fixes * Fix issues: - Make sure all `align` instructions for non-adaptive fall under same IG - Convert some variables to `unsigned short` - Fixed the maxPadding amount for adaptive alignment calculation * Other fixes * Remove align_loops flag from coreclr * Review feedback - Do not align loop if it has call - Created `emitSetLoopBackEdge()` to isolate `emitCurIG` inside emitter class - Created `emitOutputAlign()` to move the align instruction output logic - Renamed emitVariableeLoopAlign() to emitLongLoopAlign() - Created `optIdentifyLoopsForAlignment()` to identify loops that need alignment - Added comments at various places * jit format * Add FEATURE_LOOP_ALIGN * remove special case for align * Do not propagate BBF_LOOP_ALIGN in certain cases * Introduce instrDescAlign and emitLastAlignedIgNum * Several changes: - Perform accurate padding size before outputting align instruction - During outputting, just double check if the padding needed matches to what was calculated. - If at any time, instruction sizes are over-estimated before the last align instruction, then compensate them by adding NOP. - As part of above step, do not perform encoding "VEX prefix shortening" if there is align instruction in future. - Fix edge cases where because of loop cloning or resolution phase of register allocator, the loops are marked such that they cover the loops that are already mark for alignment. Fix by resetting their IGF_LOOP_ALIGN flag. - During loop size calculation, if the last IG also has `align` flag, then do not take into account the align instruction's size because they are reserved for the next loop. * jit format * fix issue related to needLabel * align memory correctly in superpmi * Few more fixes: - emitOffsAdj takes into account for any mis-prediction of jump. If we compensate that mis-prediction, that off that adjustment. - Record the lastAlignIG only for valid non-zero align instructions * minor JITDUMP messages * Review comments * missing check * Mark the last align IG the one that has non-zero padding * More review comments * Propagate BBF_LOOP_ALIGN for compacting blocks * Handle ALIGN_LOOP flag for loops that are unrolled * jit format * Loop size upto last back-edge instead of first back-edge * Take loop weight in consideration * remove align flag if loop is no longer valid * Adjust loop block weight to 4 instead of 8 * missing space after rebase * fix the enum values after rebase * review feedback * Add missing #ifdef DEBUG
- Loading branch information
1 parent
f9cf601
commit 16c48d6
Showing
24 changed files
with
1,157 additions
and
135 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.