diff --git a/src/coreclr/pgosupport.cmake b/src/coreclr/pgosupport.cmake index 3491bac7cf56c..99a7b358188a1 100644 --- a/src/coreclr/pgosupport.cmake +++ b/src/coreclr/pgosupport.cmake @@ -24,9 +24,6 @@ function(add_pgo TargetName) if(UPPERCASE_CMAKE_BUILD_TYPE STREQUAL RELEASE OR UPPERCASE_CMAKE_BUILD_TYPE STREQUAL RELWITHDEBINFO) target_compile_options(${TargetName} PRIVATE -flto -fprofile-instr-generate) set_property(TARGET ${TargetName} APPEND_STRING PROPERTY LINK_FLAGS " -flto -fprofile-instr-generate") - if(NOT LD_LLVM) - set_property(TARGET ${TargetName} APPEND_STRING PROPERTY LINK_FLAGS " -fuse-ld=gold") - endif() endif(UPPERCASE_CMAKE_BUILD_TYPE STREQUAL RELEASE OR UPPERCASE_CMAKE_BUILD_TYPE STREQUAL RELWITHDEBINFO) endif(CLR_CMAKE_HOST_WIN32) elseif(CLR_CMAKE_PGO_OPTIMIZE AND NOT CLR_CMAKE_ENABLE_SANITIZERS) @@ -59,9 +56,6 @@ function(add_pgo TargetName) if(HAVE_LTO) target_compile_options(${TargetName} PRIVATE -flto -fprofile-instr-use=${ProfilePath} -Wno-profile-instr-out-of-date -Wno-profile-instr-unprofiled) set_property(TARGET ${TargetName} APPEND_STRING PROPERTY LINK_FLAGS " -flto -fprofile-instr-use=${ProfilePath}") - if(NOT LD_LLVM) - set_property(TARGET ${TargetName} APPEND_STRING PROPERTY LINK_FLAGS " -fuse-ld=gold") - endif() add_compile_definitions(WITH_NATIVE_PGO) else(HAVE_LTO) message(WARNING "LTO is not supported, skipping profile guided optimizations") diff --git a/src/coreclr/vm/arm64/cgencpu.h b/src/coreclr/vm/arm64/cgencpu.h index 045598ed97187..3ee0387c776a4 100644 --- a/src/coreclr/vm/arm64/cgencpu.h +++ b/src/coreclr/vm/arm64/cgencpu.h @@ -304,7 +304,7 @@ inline TADDR GetMem(PCODE address, SIZE_T size, bool signExtend) } EX_CATCH { - mem = NULL; + mem = 0; _ASSERTE(!"Memory read within jitted Code Failed, this should not happen!!!!"); } EX_END_CATCH(SwallowAllExceptions); diff --git a/src/coreclr/vm/arm64/stubs.cpp b/src/coreclr/vm/arm64/stubs.cpp index ead7a01e975ce..de33ce61be849 100644 --- a/src/coreclr/vm/arm64/stubs.cpp +++ b/src/coreclr/vm/arm64/stubs.cpp @@ -295,7 +295,7 @@ void LazyMachState::unwindLazyState(LazyMachState* baseState, context.X27 = unwoundstate->captureX19_X29[8] = baseState->captureX19_X29[8]; context.X28 = unwoundstate->captureX19_X29[9] = baseState->captureX19_X29[9]; context.Fp = unwoundstate->captureX19_X29[10] = baseState->captureX19_X29[10]; - context.Lr = NULL; // Filled by the unwinder + context.Lr = 0; // Filled by the unwinder context.Sp = baseState->captureSp; context.Pc = baseState->captureIp; @@ -316,7 +316,7 @@ void LazyMachState::unwindLazyState(LazyMachState* baseState, nonVolContextPtrs.X27 = &unwoundstate->captureX19_X29[8]; nonVolContextPtrs.X28 = &unwoundstate->captureX19_X29[9]; nonVolContextPtrs.Fp = &unwoundstate->captureX19_X29[10]; - nonVolContextPtrs.Lr = NULL; // Filled by the unwinder + nonVolContextPtrs.Lr = 0; // Filled by the unwinder #endif // DACCESS_COMPILE @@ -464,7 +464,7 @@ void HelperMethodFrame::UpdateRegDisplay(const PREGDISPLAY pRD, bool updateFloat pRD->pCurrentContext->X27 = (DWORD64)(pUnwoundState->captureX19_X29[8]); pRD->pCurrentContext->X28 = (DWORD64)(pUnwoundState->captureX19_X29[9]); pRD->pCurrentContext->Fp = (DWORD64)(pUnwoundState->captureX19_X29[10]); - pRD->pCurrentContext->Lr = NULL; // Unwind again to get Caller's PC + pRD->pCurrentContext->Lr = 0; // Unwind again to get Caller's PC pRD->pCurrentContextPointers->X19 = &pRD->pCurrentContext->X19; pRD->pCurrentContextPointers->X20 = &pRD->pCurrentContext->X20; @@ -503,7 +503,7 @@ void HelperMethodFrame::UpdateRegDisplay(const PREGDISPLAY pRD, bool updateFloat pRD->pCurrentContext->X27 = (DWORD64)(m_MachState.unwoundX19_X29[8]); pRD->pCurrentContext->X28 = (DWORD64)(m_MachState.unwoundX19_X29[9]); pRD->pCurrentContext->Fp = (DWORD64)(m_MachState.unwoundX19_X29[10]); - pRD->pCurrentContext->Lr = NULL; // Unwind again to get Caller's PC + pRD->pCurrentContext->Lr = 0; // Unwind again to get Caller's PC #else // __APPLE__ pRD->pCurrentContext->X19 = *m_MachState.ptrX19_X29[0]; pRD->pCurrentContext->X20 = *m_MachState.ptrX19_X29[1]; @@ -516,7 +516,7 @@ void HelperMethodFrame::UpdateRegDisplay(const PREGDISPLAY pRD, bool updateFloat pRD->pCurrentContext->X27 = *m_MachState.ptrX19_X29[8]; pRD->pCurrentContext->X28 = *m_MachState.ptrX19_X29[9]; pRD->pCurrentContext->Fp = *m_MachState.ptrX19_X29[10]; - pRD->pCurrentContext->Lr = NULL; // Unwind again to get Caller's PC + pRD->pCurrentContext->Lr = 0; // Unwind again to get Caller's PC #endif // __APPLE__ #if !defined(DACCESS_COMPILE) @@ -531,7 +531,7 @@ void HelperMethodFrame::UpdateRegDisplay(const PREGDISPLAY pRD, bool updateFloat pRD->pCurrentContextPointers->X27 = m_MachState.ptrX19_X29[8]; pRD->pCurrentContextPointers->X28 = m_MachState.ptrX19_X29[9]; pRD->pCurrentContextPointers->Fp = m_MachState.ptrX19_X29[10]; - pRD->pCurrentContextPointers->Lr = NULL; // Unwind again to get Caller's PC + pRD->pCurrentContextPointers->Lr = 0; // Unwind again to get Caller's PC #endif ClearRegDisplayArgumentAndScratchRegisters(pRD);