Skip to content

Commit

Permalink
Disable hot/cold splitting for Unix NativeAOT (#71168)
Browse files Browse the repository at this point in the history
Because it has yet to be tested, this commit disables
`opts.compProcedureSplitting` if `generateCFIUnwindCodes()` is true.
  • Loading branch information
Aman Khalid authored Jun 23, 2022
1 parent 73e6b3a commit 3205533
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
8 changes: 8 additions & 0 deletions src/coreclr/jit/compiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3199,6 +3199,14 @@ void Compiler::compInitOptions(JitFlags* jitFlags)

opts.compProcedureSplitting = jitFlags->IsSet(JitFlags::JIT_FLAG_PROCSPLIT) || enableFakeSplitting;

#ifdef FEATURE_CFI_SUPPORT
// Hot/cold splitting is not being tested on NativeAOT.
if (generateCFIUnwindCodes())
{
opts.compProcedureSplitting = false;
}
#endif // FEATURE_CFI_SUPPORT

#ifdef TARGET_LOONGARCH64
// Hot/cold splitting is not being tested on LoongArch64.
opts.compProcedureSplitting = false;
Expand Down
7 changes: 0 additions & 7 deletions src/coreclr/jit/unwind.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -268,13 +268,6 @@ void Compiler::unwindEmitFuncCFI(FuncInfoDsc* func, void* pHotCode, void* pColdC
DWORD unwindCodeBytes = 0;
BYTE* pUnwindBlock = nullptr;

#ifdef DEBUG
if (JitConfig.JitFakeProcedureSplitting())
{
pColdCode = nullptr;
}
#endif // DEBUG

if (func->startLoc == nullptr)
{
startOffset = 0;
Expand Down

0 comments on commit 3205533

Please sign in to comment.