Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[RyuJIT] Unroll single-iteration loops#43947

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
sandreenko merged 6 commits intodotnet:masterfromEgorBo:unroll-empty-loops
Nov 12, 2020
Merged
Changes from1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
PrevPrevious commit
NextNext commit
Unroll single-iteration loops
  • Loading branch information
@EgorBo
EgorBo committedOct 28, 2020
commitaa6dbde0eb878bd41086d05d862e8f787680ab5c
31 changes: 19 additions & 12 deletionssrc/coreclr/src/jit/optimizer.cpp
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -3548,16 +3548,6 @@ void Compiler::optUnrollLoops()
// LPFLG_CONST - required because this transform only handles full unrolls
requiredFlags = LPFLG_DO_WHILE | LPFLG_CONST;

#ifdef DEBUG
if (compStressCompile(STRESS_UNROLL_LOOPS, 50))
{
// In stress mode, quadruple the size limit, and drop
// the restriction that loop limit must be vector element count.

unrollLimitSz *= 4;
}
#endif

/* Ignore the loop if we don't have a do-while
that has a constant number of iterations */

Expand DownExpand Up@@ -3645,10 +3635,27 @@ void Compiler::optUnrollLoops()
continue;
}

#ifdef DEBUG
if (compStressCompile(STRESS_UNROLL_LOOPS, 50))
{
// In stress mode, quadruple the size limit, and drop
// the restriction that loop limit must be vector element count.

unrollLimitSz *= 4;
}
else
#endif
// Unroll only if limit is 0, 1, or Vector_.Length (as a heuristic, not for correctness/structural reasons)
if ((totalIter > 1) &&!(loopFlags & LPFLG_SIMD_LIMIT) && !compStressCompile(STRESS_UNROLL_LOOPS, 50))
if (!(loopFlags & LPFLG_SIMD_LIMIT))
{
continue;
if (totalIter <= 1)
{
unrollLimitSz *= 4;
}
else
{
continue;
}
}

GenTree* incr = incrStmt->GetRootNode();
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp