Skip to content

Commit

Permalink
Do not devirtualize if optimizations disabled
Browse files Browse the repository at this point in the history
We started doing devir in unoptimized builds. I assume that was an unintended consequence of dotnet#61453.
  • Loading branch information
MichalStrehovsky committed Nov 20, 2021
1 parent 7099f4b commit a63856b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/coreclr/jit/importer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21325,6 +21325,12 @@ void Compiler::impDevirtualizeCall(GenTreeCall* call,
return;
}

// Bail if optimizations are disabled.
if (opts.OptimizationDisabled())
{
return;
}

#if defined(DEBUG)
// Bail if devirt is disabled.
if (JitConfig.JitEnableDevirtualization() == 0)
Expand Down

0 comments on commit a63856b

Please sign in to comment.