Red Knight
Red Knight

Reputation: 289

How to disable the CoreCLR Tiered Compilation?

Tiered compilation can mess up the assembler output when doing optimization work. Is there any way to disable it to get the high-quality output assembler without the need to pre-heat the method?

Upvotes: 2

Views: 751

Answers (2)

Red Knight
Red Knight

Reputation: 289

To disable the tiered compilation for the CoreCLR for all projects set the relevant environment variable:

set COMPlus_TieredCompilation=0

You can set it up for the machine to disable it altogether or set it immediately before you call your executable to have it disabled temporarily.

Upvotes: 1

Tornhoof
Tornhoof

Reputation: 248

Adding this to your project should work too.

<Project Sdk="Microsoft.NET.Sdk">
    <PropertyGroup>          
      <TieredCompilation>false</TieredCompilation>
    </PropertyGroup>
</Project>

Upvotes: 3

Related Questions