From 3205533cbb03414db5c05e307044606452ac963b Mon Sep 17 00:00:00 2001 From: Aman Khalid Date: Thu, 23 Jun 2022 07:53:57 -0700 Subject: [PATCH] Disable hot/cold splitting for Unix NativeAOT (#71168) Because it has yet to be tested, this commit disables `opts.compProcedureSplitting` if `generateCFIUnwindCodes()` is true. --- src/coreclr/jit/compiler.cpp | 8 ++++++++ src/coreclr/jit/unwind.cpp | 7 ------- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/coreclr/jit/compiler.cpp b/src/coreclr/jit/compiler.cpp index 460412d84597e..da021bd91df80 100644 --- a/src/coreclr/jit/compiler.cpp +++ b/src/coreclr/jit/compiler.cpp @@ -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; diff --git a/src/coreclr/jit/unwind.cpp b/src/coreclr/jit/unwind.cpp index 63c4ed716cf39..bf19631a44d09 100644 --- a/src/coreclr/jit/unwind.cpp +++ b/src/coreclr/jit/unwind.cpp @@ -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;