Skip to content

Commit

Permalink
JIT: enable cross-block local assertion prop (#94689)
Browse files Browse the repository at this point in the history
Enable cross-block assertion prop by default.

Disable via
```
DOTNET_JitEnableCrossBlockLocalAssertionProp=0 
```
or selectively enable via
```
DOTNET_JitEnableCrossBlockLocalAssertionPropRange=<hash ranges>
```
  • Loading branch information
AndyAyersMS authored Nov 28, 2023
1 parent e07f80a commit 5092ce8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
7 changes: 7 additions & 0 deletions src/coreclr/jit/fgopt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2881,6 +2881,13 @@ bool Compiler::fgOptimizeEmptyBlock(BasicBlock* block)
break;
}

// Don't remove the fgEntryBB
//
if (opts.IsOSR() && (block == fgEntryBB))
{
break;
}

#if defined(FEATURE_EH_FUNCLETS)
/* Don't remove an empty block that is in a different EH region
* from its successor block, if the block is the target of a
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/jit/jitconfigvalues.h
Original file line number Diff line number Diff line change
Expand Up @@ -656,7 +656,7 @@ CONFIG_INTEGER(JitEnableHeadTailMerge, W("JitEnableHeadTailMerge"), 1)
CONFIG_INTEGER(JitEnablePhysicalPromotion, W("JitEnablePhysicalPromotion"), 1)

// Enable cross-block local assertion prop
CONFIG_INTEGER(JitEnableCrossBlockLocalAssertionProp, W("JitEnableCrossBlockLocalAssertionProp"), 0)
CONFIG_INTEGER(JitEnableCrossBlockLocalAssertionProp, W("JitEnableCrossBlockLocalAssertionProp"), 1)

#if defined(DEBUG)
// JitFunctionFile: Name of a file that contains a list of functions. If the currently compiled function is in the
Expand Down
1 change: 1 addition & 0 deletions src/tests/JIT/Directed/debugging/debuginfo/tester.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<!-- These expectedly interfere with debug info -->
<CLRTestEnvironmentVariable Include="DOTNET_JitNoForwardSub" Value="1" />
<CLRTestEnvironmentVariable Include="DOTNET_JitEnableHeadTailMerge" Value="0" />
<CLRTestEnvironmentVariable Include="DOTNET_JitEnableCrossBlockLocalAssertionProp" Value="0" />

<ProjectReference Include="tests_d.ilproj" Aliases="tests_d" />
<ProjectReference Include="tests_r.ilproj" Aliases="tests_r" />
Expand Down

0 comments on commit 5092ce8

Please sign in to comment.