[K/N] Fix tests failing because of phase renaming
This commit is contained in:
committed by
Space Team
parent
f3fd4b3e01
commit
c400a75407
+9
-9
@@ -62,18 +62,17 @@ internal val RewriteExternalCallsCheckerGlobals = createSimpleNamedCompilerPhase
|
||||
|
||||
internal class OptimizationState(
|
||||
konanConfig: KonanConfig,
|
||||
val module: LLVMModuleRef,
|
||||
val llvmConfig: LlvmPipelineConfig
|
||||
) : BasicPhaseContext(konanConfig)
|
||||
|
||||
internal fun optimizationPipelinePass(name: String, description: String, pipeline: (LlvmPipelineConfig, LoggingContext) -> LlvmOptimizationPipeline) =
|
||||
createSimpleNamedCompilerPhase<OptimizationState, Unit>(
|
||||
createSimpleNamedCompilerPhase<OptimizationState, LLVMModuleRef>(
|
||||
name = name,
|
||||
description = description,
|
||||
postactions = getDefaultLlvmModuleActions(),
|
||||
) { context, _ ->
|
||||
) { context, module ->
|
||||
pipeline(context.llvmConfig, context).use {
|
||||
it.execute(context.module)
|
||||
it.execute(module)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -165,12 +164,13 @@ internal fun PhaseEngine<NativeGenerationState>.runBitcodePostProcessing() {
|
||||
closedWorld = context.llvmModuleSpecification.isFinal,
|
||||
timePasses = context.config.flexiblePhaseConfig.needProfiling,
|
||||
)
|
||||
useContext(OptimizationState(context.config, context.llvmModule, optimizationConfig)) {
|
||||
it.runPhase(MandatoryBitcodeLLVMPostprocessingPhase)
|
||||
it.runPhase(ModuleBitcodeOptimizationPhase)
|
||||
it.runPhase(LTOBitcodeOptimizationPhase)
|
||||
useContext(OptimizationState(context.config, optimizationConfig)) {
|
||||
val module = this@runBitcodePostProcessing.context.llvmModule
|
||||
it.runPhase(MandatoryBitcodeLLVMPostprocessingPhase, module)
|
||||
it.runPhase(ModuleBitcodeOptimizationPhase, module)
|
||||
it.runPhase(LTOBitcodeOptimizationPhase, module)
|
||||
when (context.config.sanitizer) {
|
||||
SanitizerKind.THREAD -> it.runPhase(ThreadSanitizerPhase)
|
||||
SanitizerKind.THREAD -> it.runPhase(ThreadSanitizerPhase, module)
|
||||
SanitizerKind.ADDRESS -> context.reportCompilationError("Address sanitizer is not supported yet")
|
||||
null -> {}
|
||||
}
|
||||
|
||||
@@ -6248,7 +6248,7 @@ tasks.register("override_konan_properties0", KonanDriverTest) {
|
||||
: '-Xoverride-konan-properties=llvmInlineThreshold=76'
|
||||
flags = [
|
||||
"-opt",
|
||||
"-Xverbose-phases=BitcodeOptimization",
|
||||
"-Xverbose-phases=MandatoryBitcodeLLVMPostprocessingPhase",
|
||||
overrides
|
||||
]
|
||||
compilerMessages = true
|
||||
@@ -6454,7 +6454,7 @@ if (HostManager.@Companion.hostIsMac) {
|
||||
targetName = "watchos_arm32"
|
||||
// Perform check after optimization pipeline because
|
||||
// LLVM might infer attributes.
|
||||
phaseToCheck = "BitcodeOptimization"
|
||||
phaseToCheck = "LTOBitcodeOptimization"
|
||||
}
|
||||
|
||||
fileCheckTest("filecheck_redundant_safepoints_removal_smallbinary") {
|
||||
|
||||
Reference in New Issue
Block a user