Skip to content

Commit 5092ce8

Browse files
authored
JIT: enable cross-block local assertion prop (#94689)
Enable cross-block assertion prop by default. Disable via ``` DOTNET_JitEnableCrossBlockLocalAssertionProp=0 ``` or selectively enable via ``` DOTNET_JitEnableCrossBlockLocalAssertionPropRange=<hash ranges> ```
1 parent e07f80a commit 5092ce8

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

src/coreclr/jit/fgopt.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2881,6 +2881,13 @@ bool Compiler::fgOptimizeEmptyBlock(BasicBlock* block)
28812881
break;
28822882
}
28832883

2884+
// Don't remove the fgEntryBB
2885+
//
2886+
if (opts.IsOSR() && (block == fgEntryBB))
2887+
{
2888+
break;
2889+
}
2890+
28842891
#if defined(FEATURE_EH_FUNCLETS)
28852892
/* Don't remove an empty block that is in a different EH region
28862893
* from its successor block, if the block is the target of a

src/coreclr/jit/jitconfigvalues.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -656,7 +656,7 @@ CONFIG_INTEGER(JitEnableHeadTailMerge, W("JitEnableHeadTailMerge"), 1)
656656
CONFIG_INTEGER(JitEnablePhysicalPromotion, W("JitEnablePhysicalPromotion"), 1)
657657

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

661661
#if defined(DEBUG)
662662
// JitFunctionFile: Name of a file that contains a list of functions. If the currently compiled function is in the

src/tests/JIT/Directed/debugging/debuginfo/tester.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
<!-- These expectedly interfere with debug info -->
1414
<CLRTestEnvironmentVariable Include="DOTNET_JitNoForwardSub" Value="1" />
1515
<CLRTestEnvironmentVariable Include="DOTNET_JitEnableHeadTailMerge" Value="0" />
16+
<CLRTestEnvironmentVariable Include="DOTNET_JitEnableCrossBlockLocalAssertionProp" Value="0" />
1617

1718
<ProjectReference Include="tests_d.ilproj" Aliases="tests_d" />
1819
<ProjectReference Include="tests_r.ilproj" Aliases="tests_r" />

0 commit comments

Comments
 (0)