Index: llvm/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp =================================================================== --- llvm/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp +++ llvm/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp @@ -85,6 +85,12 @@ static cl::opt DontAddNoWrapFlags("cvp-dont-add-nowrap-flags", cl::init(false)); +// Allows disabling LVI abandoning for pipeline tests. +static cl::opt NoLVIAbandon( + "no-lvi-abandon", + cl::desc("Do not abandon LVI after CVP"), + cl::init(false), cl::Hidden); + namespace { class CorrelatedValuePropagation : public FunctionPass { @@ -973,11 +979,20 @@ bool Changed = runImpl(F, LVI, DT, getBestSimplifyQuery(AM, F)); - if (!Changed) - return PreservedAnalyses::all(); PreservedAnalyses PA; - PA.preserve(); - PA.preserve(); - PA.preserve(); + if (!Changed) { + PA = PreservedAnalyses::all(); + } else { + PA.preserve(); + PA.preserve(); + PA.preserve(); + } + + // Keeping LVI alive is expensive, both because it uses a lot of memory, and + // because invalidating values in LVI is expensive. While CVP does preserve + // LVI, we know that passes after JumpThreading+CVP will not need the result + // of this analysis, so we forcefully discard it early. + if (!NoLVIAbandon) + PA.abandon(); return PA; } Index: llvm/test/Other/new-pm-defaults.ll =================================================================== --- llvm/test/Other/new-pm-defaults.ll +++ llvm/test/Other/new-pm-defaults.ll @@ -7,81 +7,81 @@ ; Any invalidation that shows up here is a bug, unless we started modifying ; the IR, in which case we need to make it immutable harder. -; RUN: opt -disable-verify -debug-pass-manager \ +; RUN: opt -disable-verify -debug-pass-manager -no-lvi-abandon \ ; RUN: -passes='default' -S %s 2>&1 \ ; RUN: | FileCheck %s --check-prefix=CHECK-O --check-prefix=CHECK-O1 \ ; RUN: --check-prefix=%llvmcheckext -; RUN: opt -disable-verify -debug-pass-manager \ +; RUN: opt -disable-verify -debug-pass-manager -no-lvi-abandon \ ; RUN: -passes='default' -S %s 2>&1 \ ; RUN: | FileCheck %s --check-prefix=CHECK-O --check-prefix=CHECK-O2 \ ; RUN: --check-prefix=CHECK-O23SZ --check-prefix=%llvmcheckext -; RUN: opt -disable-verify -debug-pass-manager \ +; RUN: opt -disable-verify -debug-pass-manager -no-lvi-abandon \ ; RUN: -passes='default' -S %s 2>&1 \ ; RUN: | FileCheck %s --check-prefix=CHECK-O --check-prefix=CHECK-O3 \ ; RUN: --check-prefix=CHECK-O23SZ --check-prefix=%llvmcheckext -; RUN: opt -disable-verify -debug-pass-manager \ +; RUN: opt -disable-verify -debug-pass-manager -no-lvi-abandon \ ; RUN: -passes='default' -S %s 2>&1 \ ; RUN: | FileCheck %s --check-prefix=CHECK-O --check-prefix=CHECK-Os \ ; RUN: --check-prefix=CHECK-O23SZ --check-prefix=%llvmcheckext -; RUN: opt -disable-verify -debug-pass-manager \ +; RUN: opt -disable-verify -debug-pass-manager -no-lvi-abandon \ ; RUN: -passes='default' -S %s 2>&1 \ ; RUN: | FileCheck %s --check-prefix=CHECK-O --check-prefix=CHECK-Oz \ ; RUN: --check-prefix=CHECK-O23SZ --check-prefix=%llvmcheckext -; RUN: opt -disable-verify -debug-pass-manager \ +; RUN: opt -disable-verify -debug-pass-manager -no-lvi-abandon \ ; RUN: -passes='lto-pre-link' -S %s 2>&1 \ ; RUN: | FileCheck %s --check-prefix=CHECK-O --check-prefix=CHECK-O2 \ ; RUN: --check-prefix=CHECK-O23SZ --check-prefix=%llvmcheckext \ ; RUN: --check-prefix=CHECK-O2-LTO -; RUN: opt -disable-verify -debug-pass-manager \ +; RUN: opt -disable-verify -debug-pass-manager -no-lvi-abandon \ ; RUN: -passes-ep-peephole='no-op-function' \ ; RUN: -passes='default' -S %s 2>&1 \ ; RUN: | FileCheck %s --check-prefix=CHECK-O --check-prefix=CHECK-O3 \ ; RUN: --check-prefix=%llvmcheckext \ ; RUN: --check-prefix=CHECK-EP-PEEPHOLE --check-prefix=CHECK-O23SZ -; RUN: opt -disable-verify -debug-pass-manager \ +; RUN: opt -disable-verify -debug-pass-manager -no-lvi-abandon \ ; RUN: -passes-ep-late-loop-optimizations='no-op-loop' \ ; RUN: -passes='default' -S %s 2>&1 \ ; RUN: | FileCheck %s --check-prefix=CHECK-O --check-prefix=CHECK-O3 \ ; RUN: --check-prefix=%llvmcheckext \ ; RUN: --check-prefix=CHECK-EP-LOOP-LATE --check-prefix=CHECK-O23SZ -; RUN: opt -disable-verify -debug-pass-manager \ +; RUN: opt -disable-verify -debug-pass-manager -no-lvi-abandon \ ; RUN: -passes-ep-loop-optimizer-end='no-op-loop' \ ; RUN: -passes='default' -S %s 2>&1 \ ; RUN: | FileCheck %s --check-prefix=CHECK-O --check-prefix=CHECK-O3 \ ; RUN: --check-prefix=%llvmcheckext \ ; RUN: --check-prefix=CHECK-EP-LOOP-END --check-prefix=CHECK-O23SZ -; RUN: opt -disable-verify -debug-pass-manager \ +; RUN: opt -disable-verify -debug-pass-manager -no-lvi-abandon \ ; RUN: -passes-ep-scalar-optimizer-late='no-op-function' \ ; RUN: -passes='default' -S %s 2>&1 \ ; RUN: | FileCheck %s --check-prefix=CHECK-O --check-prefix=CHECK-O3 \ ; RUN: --check-prefix=%llvmcheckext \ ; RUN: --check-prefix=CHECK-EP-SCALAR-LATE --check-prefix=CHECK-O23SZ -; RUN: opt -disable-verify -debug-pass-manager \ +; RUN: opt -disable-verify -debug-pass-manager -no-lvi-abandon \ ; RUN: -passes-ep-cgscc-optimizer-late='no-op-cgscc' \ ; RUN: -passes='default' -S %s 2>&1 \ ; RUN: | FileCheck %s --check-prefix=CHECK-O --check-prefix=CHECK-O3 \ ; RUN: --check-prefix=%llvmcheckext \ ; RUN: --check-prefix=CHECK-EP-CGSCC-LATE --check-prefix=CHECK-O23SZ -; RUN: opt -disable-verify -debug-pass-manager \ +; RUN: opt -disable-verify -debug-pass-manager -no-lvi-abandon \ ; RUN: -passes-ep-vectorizer-start='no-op-function' \ ; RUN: -passes='default' -S %s 2>&1 \ ; RUN: | FileCheck %s --check-prefix=CHECK-O --check-prefix=CHECK-O3 \ ; RUN: --check-prefix=%llvmcheckext \ ; RUN: --check-prefix=CHECK-EP-VECTORIZER-START --check-prefix=CHECK-O23SZ -; RUN: opt -disable-verify -debug-pass-manager \ +; RUN: opt -disable-verify -debug-pass-manager -no-lvi-abandon \ ; RUN: -passes-ep-pipeline-start='no-op-module' \ ; RUN: -passes='default' -S %s 2>&1 \ ; RUN: | FileCheck %s --check-prefix=CHECK-O --check-prefix=CHECK-O3 \ ; RUN: --check-prefix=%llvmcheckext \ ; RUN: --check-prefix=CHECK-EP-PIPELINE-START --check-prefix=CHECK-O23SZ -; RUN: opt -disable-verify -debug-pass-manager \ +; RUN: opt -disable-verify -debug-pass-manager -no-lvi-abandon \ ; RUN: -passes-ep-pipeline-start='no-op-module' \ ; RUN: -passes='lto-pre-link' -S %s 2>&1 \ ; RUN: | FileCheck %s --check-prefix=CHECK-O --check-prefix=CHECK-O3 \ ; RUN: --check-prefix=%llvmcheckext \ ; RUN: --check-prefix=CHECK-EP-PIPELINE-START --check-prefix=CHECK-O23SZ -; RUN: opt -disable-verify -debug-pass-manager \ +; RUN: opt -disable-verify -debug-pass-manager -no-lvi-abandon \ ; RUN: -passes-ep-optimizer-last='no-op-function' \ ; RUN: -passes='default' -S %s 2>&1 \ ; RUN: | FileCheck %s --check-prefix=CHECK-O --check-prefix=CHECK-O3 \ Index: llvm/test/Other/new-pm-thinlto-defaults.ll =================================================================== --- llvm/test/Other/new-pm-thinlto-defaults.ll +++ llvm/test/Other/new-pm-thinlto-defaults.ll @@ -8,42 +8,45 @@ ; the IR, in which case we need to make it immutable harder. ; ; Prelink pipelines: -; RUN: opt -disable-verify -debug-pass-manager \ +; RUN: opt -disable-verify -debug-pass-manager -no-lvi-abandon \ ; RUN: -passes='thinlto-pre-link,name-anon-globals' -S %s 2>&1 \ ; RUN: | FileCheck %s --check-prefixes=CHECK-O,CHECK-O1,CHECK-PRELINK-O,CHECK-PRELINK-O-NODIS,CHECK-PRELINK-O1 -; RUN: opt -disable-verify -debug-pass-manager \ +; RUN: opt -disable-verify -debug-pass-manager -no-lvi-abandon \ ; RUN: -passes='thinlto-pre-link,name-anon-globals' -S %s 2>&1 \ ; RUN: | FileCheck %s --check-prefixes=CHECK-O,CHECK-O2,CHECK-O23SZ,CHECK-PRELINK-O,CHECK-PRELINK-O-NODIS,CHECK-PRELINK-O2 -; RUN: opt -disable-verify -debug-pass-manager \ +; RUN: opt -disable-verify -debug-pass-manager -no-lvi-abandon \ ; RUN: -passes='thinlto-pre-link,name-anon-globals' -S -passes-ep-pipeline-start='no-op-module' %s 2>&1 \ ; RUN: | FileCheck %s --check-prefixes=CHECK-O,CHECK-O3,CHECK-O23SZ,CHECK-PRELINK-O,CHECK-PRELINK-O-NODIS,CHECK-PRELINK-O3,CHECK-EP-PIPELINE-START -; RUN: opt -disable-verify -debug-pass-manager \ +; RUN: opt -disable-verify -debug-pass-manager -no-lvi-abandon \ ; RUN: -passes='thinlto-pre-link,name-anon-globals' -S %s 2>&1 \ ; RUN: | FileCheck %s --check-prefixes=CHECK-O,CHECK-Os,CHECK-O23SZ,CHECK-PRELINK-O,CHECK-PRELINK-O-NODIS,CHECK-PRELINK-Os -; RUN: opt -disable-verify -debug-pass-manager \ +; RUN: opt -disable-verify -debug-pass-manager -no-lvi-abandon \ ; RUN: -passes='thinlto-pre-link,name-anon-globals' -S %s 2>&1 \ ; RUN: | FileCheck %s --check-prefixes=CHECK-O,CHECK-Oz,CHECK-O23SZ,CHECK-PRELINK-O,CHECK-PRELINK-O-NODIS,CHECK-PRELINK-Oz -; RUN: opt -disable-verify -debug-pass-manager -new-pm-debug-info-for-profiling \ +; RUN: opt -disable-verify -debug-pass-manager -no-lvi-abandon \ +; RUN: -new-pm-debug-info-for-profiling \ ; RUN: -passes='thinlto-pre-link,name-anon-globals' -S %s 2>&1 \ ; RUN: | FileCheck %s --check-prefixes=CHECK-DIS,CHECK-O,CHECK-O2,CHECK-O23SZ,CHECK-PRELINK-O,CHECK-PRELINK-O2 ; ; Postlink pipelines: -; RUN: opt -disable-verify -debug-pass-manager \ +; RUN: opt -disable-verify -debug-pass-manager -no-lvi-abandon \ ; RUN: -passes='thinlto' -S %s 2>&1 \ ; RUN: | FileCheck %s --check-prefixes=CHECK-O,CHECK-O1,CHECK-POSTLINK-O,%llvmcheckext,CHECK-POSTLINK-O1 -; RUN: opt -disable-verify -debug-pass-manager \ +; RUN: opt -disable-verify -debug-pass-manager -no-lvi-abandon \ ; RUN: -passes='thinlto' -S %s 2>&1 \ ; RUN: | FileCheck %s --check-prefixes=CHECK-O,CHECK-O2,CHECK-O23SZ,CHECK-POSTLINK-O,%llvmcheckext,CHECK-POSTLINK-O2 -; RUN: opt -disable-verify -debug-pass-manager -passes-ep-pipeline-start='no-op-module' \ +; RUN: opt -disable-verify -debug-pass-manager -no-lvi-abandon \ +; RUN: -passes-ep-pipeline-start='no-op-module' \ ; RUN: -passes='thinlto' -S %s 2>&1 \ ; RUN: | FileCheck %s --check-prefixes=CHECK-O,CHECK-O3,CHECK-O23SZ,CHECK-POSTLINK-O,%llvmcheckext,CHECK-POSTLINK-O3 -; RUN: opt -disable-verify -debug-pass-manager \ +; RUN: opt -disable-verify -debug-pass-manager -no-lvi-abandon \ ; RUN: -passes='thinlto' -S %s 2>&1 \ ; RUN: | FileCheck %s --check-prefixes=CHECK-O,CHECK-Os,CHECK-O23SZ,CHECK-POSTLINK-O,%llvmcheckext,CHECK-POSTLINK-Os -; RUN: opt -disable-verify -debug-pass-manager \ +; RUN: opt -disable-verify -debug-pass-manager -no-lvi-abandon \ ; RUN: -passes='thinlto' -S %s 2>&1 \ ; RUN: | FileCheck %s --check-prefixes=CHECK-O,CHECK-Oz,CHECK-O23SZ,CHECK-POSTLINK-O,%llvmcheckext,CHECK-POSTLINK-Oz -; RUN: opt -disable-verify -debug-pass-manager -new-pm-debug-info-for-profiling \ +; RUN: opt -disable-verify -debug-pass-manager -no-lvi-abandon \ +; RUN: -new-pm-debug-info-for-profiling \ ; RUN: -passes='thinlto' -S %s 2>&1 \ ; RUN: | FileCheck %s --check-prefixes=CHECK-O,CHECK-O2,CHECK-O23SZ,CHECK-POSTLINK-O,%llvmcheckext,CHECK-POSTLINK-O2 ; Index: llvm/test/Other/new-pm-thinlto-postlink-pgo-defaults.ll =================================================================== --- llvm/test/Other/new-pm-thinlto-postlink-pgo-defaults.ll +++ llvm/test/Other/new-pm-thinlto-postlink-pgo-defaults.ll @@ -1,22 +1,24 @@ ; Validate ThinLTO post link pipeline when we have instrumentation PGO ; ; Postlink pipelines: -; RUN: opt -disable-verify -debug-pass-manager \ +; RUN: opt -disable-verify -debug-pass-manager -no-lvi-abandon \ ; RUN: -passes='thinlto' -S %s 2>&1 \ ; RUN: | FileCheck %s --check-prefixes=CHECK-O,CHECK-O1,%llvmcheckext --dump-input=fail -; RUN: opt -disable-verify -debug-pass-manager \ +; RUN: opt -disable-verify -debug-pass-manager -no-lvi-abandon \ ; RUN: -passes='thinlto' -S %s 2>&1 \ ; RUN: | FileCheck %s --check-prefixes=CHECK-O,CHECK-O2,CHECK-O23SZ,%llvmcheckext --dump-input=fail -; RUN: opt -disable-verify -debug-pass-manager -passes-ep-pipeline-start='no-op-module' \ +; RUN: opt -disable-verify -debug-pass-manager -no-lvi-abandon \ +; RUN: -passes-ep-pipeline-start='no-op-module' \ ; RUN: -passes='thinlto' -S %s 2>&1 \ ; RUN: | FileCheck %s --check-prefixes=CHECK-O,CHECK-O3,CHECK-O23SZ,%llvmcheckext --dump-input=fail -; RUN: opt -disable-verify -debug-pass-manager \ +; RUN: opt -disable-verify -debug-pass-manager -no-lvi-abandon \ ; RUN: -passes='thinlto' -S %s 2>&1 \ ; RUN: | FileCheck %s --check-prefixes=CHECK-O,CHECK-Os,CHECK-O23SZ,%llvmcheckext --dump-input=fail -; RUN: opt -disable-verify -debug-pass-manager \ +; RUN: opt -disable-verify -debug-pass-manager -no-lvi-abandon \ ; RUN: -passes='thinlto' -S %s 2>&1 \ ; RUN: | FileCheck %s --check-prefixes=CHECK-O,CHECK-Oz,CHECK-O23SZ,%llvmcheckext --dump-input=fail -; RUN: opt -disable-verify -debug-pass-manager -new-pm-debug-info-for-profiling \ +; RUN: opt -disable-verify -debug-pass-manager -no-lvi-abandon \ +; RUN: -new-pm-debug-info-for-profiling \ ; RUN: -passes='thinlto' -S %s 2>&1 \ ; RUN: | FileCheck %s --check-prefixes=CHECK-O,CHECK-O2,CHECK-O23SZ,%llvmcheckext --dump-input=fail ; Index: llvm/test/Other/new-pm-thinlto-postlink-samplepgo-defaults.ll =================================================================== --- llvm/test/Other/new-pm-thinlto-postlink-samplepgo-defaults.ll +++ llvm/test/Other/new-pm-thinlto-postlink-samplepgo-defaults.ll @@ -1,26 +1,28 @@ ; Validate ThinLTO postlink pipeline when we have Sample PGO ; -; RUN: opt -disable-verify -debug-pass-manager \ +; RUN: opt -disable-verify -debug-pass-manager -no-lvi-abandon \ ; RUN: -pgo-kind=pgo-sample-use-pipeline -profile-file='%S/Inputs/new-pm-thinlto-samplepgo-defaults.prof' \ ; RUN: -passes='thinlto' -S %s 2>&1 \ ; RUN: | FileCheck %s --check-prefixes=CHECK-O,CHECK-O1,%llvmcheckext --dump-input=fail -; RUN: opt -disable-verify -debug-pass-manager \ +; RUN: opt -disable-verify -debug-pass-manager -no-lvi-abandon \ ; RUN: -pgo-kind=pgo-sample-use-pipeline -profile-file='%S/Inputs/new-pm-thinlto-samplepgo-defaults.prof' \ ; RUN: -passes='thinlto' -S %s 2>&1 \ ; RUN: | FileCheck %s --check-prefixes=CHECK-O,CHECK-O2,CHECK-O23SZ,%llvmcheckext --dump-input=fail -; RUN: opt -disable-verify -debug-pass-manager -passes-ep-pipeline-start='no-op-module' \ +; RUN: opt -disable-verify -debug-pass-manager -no-lvi-abandon \ +; RUN: -passes-ep-pipeline-start='no-op-module' \ ; RUN: -pgo-kind=pgo-sample-use-pipeline -profile-file='%S/Inputs/new-pm-thinlto-samplepgo-defaults.prof' \ ; RUN: -passes='thinlto' -S %s 2>&1 \ ; RUN: | FileCheck %s --check-prefixes=CHECK-O,CHECK-O3,CHECK-O23SZ,%llvmcheckext --dump-input=fail -; RUN: opt -disable-verify -debug-pass-manager \ +; RUN: opt -disable-verify -debug-pass-manager -no-lvi-abandon \ ; RUN: -pgo-kind=pgo-sample-use-pipeline -profile-file='%S/Inputs/new-pm-thinlto-samplepgo-defaults.prof' \ ; RUN: -passes='thinlto' -S %s 2>&1 \ ; RUN: | FileCheck %s --check-prefixes=CHECK-O,CHECK-Os,CHECK-O23SZ,%llvmcheckext --dump-input=fail -; RUN: opt -disable-verify -debug-pass-manager \ +; RUN: opt -disable-verify -debug-pass-manager -no-lvi-abandon \ ; RUN: -pgo-kind=pgo-sample-use-pipeline -profile-file='%S/Inputs/new-pm-thinlto-samplepgo-defaults.prof' \ ; RUN: -passes='thinlto' -S %s 2>&1 \ ; RUN: | FileCheck %s --check-prefixes=CHECK-O,CHECK-Oz,CHECK-O23SZ,%llvmcheckext --dump-input=fail -; RUN: opt -disable-verify -debug-pass-manager -new-pm-debug-info-for-profiling \ +; RUN: opt -disable-verify -debug-pass-manager -no-lvi-abandon \ +; RUN: -new-pm-debug-info-for-profiling \ ; RUN: -pgo-kind=pgo-sample-use-pipeline -profile-file='%S/Inputs/new-pm-thinlto-samplepgo-defaults.prof' \ ; RUN: -passes='thinlto' -S %s 2>&1 \ ; RUN: | FileCheck %s --check-prefixes=CHECK-O,CHECK-O2,CHECK-O23SZ,%llvmcheckext --dump-input=fail Index: llvm/test/Other/new-pm-thinlto-prelink-pgo-defaults.ll =================================================================== --- llvm/test/Other/new-pm-thinlto-prelink-pgo-defaults.ll +++ llvm/test/Other/new-pm-thinlto-prelink-pgo-defaults.ll @@ -2,27 +2,28 @@ ; ; RUN: llvm-profdata merge %S/Inputs/new-pm-thinlto-prelink-pgo-defaults.proftext -o %t.profdata ; -; RUN: opt -disable-verify -debug-pass-manager \ +; RUN: opt -disable-verify -debug-pass-manager -no-lvi-abandon \ ; RUN: -pgo-kind=pgo-instr-use-pipeline -profile-file='%t.profdata' \ ; RUN: -passes='thinlto-pre-link,name-anon-globals' -S %s 2>&1 \ ; RUN: | FileCheck %s --check-prefixes=CHECK-O,CHECK-O1,CHECK-O-NODIS,CHECK-O123 --dump-input=fail -; RUN: opt -disable-verify -debug-pass-manager \ +; RUN: opt -disable-verify -debug-pass-manager -no-lvi-abandon \ ; RUN: -pgo-kind=pgo-instr-use-pipeline -profile-file='%t.profdata' \ ; RUN: -passes='thinlto-pre-link,name-anon-globals' -S %s 2>&1 \ ; RUN: | FileCheck %s --check-prefixes=CHECK-O,CHECK-O2,CHECK-O23SZ,CHECK-O-NODIS,CHECK-O123 --dump-input=fail -; RUN: opt -disable-verify -debug-pass-manager \ +; RUN: opt -disable-verify -debug-pass-manager -no-lvi-abandon \ ; RUN: -pgo-kind=pgo-instr-use-pipeline -profile-file='%t.profdata' \ ; RUN: -passes='thinlto-pre-link,name-anon-globals' -S -passes-ep-pipeline-start='no-op-module' %s 2>&1 \ ; RUN: | FileCheck %s --check-prefixes=CHECK-O,CHECK-O3,CHECK-O23SZ,CHECK-O-NODIS,CHECK-O123,CHECK-EP-PIPELINE-START --dump-input=fail -; RUN: opt -disable-verify -debug-pass-manager \ +; RUN: opt -disable-verify -debug-pass-manager -no-lvi-abandon \ ; RUN: -pgo-kind=pgo-instr-use-pipeline -profile-file='%t.profdata' \ ; RUN: -passes='thinlto-pre-link,name-anon-globals' -S %s 2>&1 \ ; RUN: | FileCheck %s --check-prefixes=CHECK-O,CHECK-Os,CHECK-O23SZ,CHECK-O-NODIS --dump-input=fail -; RUN: opt -disable-verify -debug-pass-manager \ +; RUN: opt -disable-verify -debug-pass-manager -no-lvi-abandon \ ; RUN: -pgo-kind=pgo-instr-use-pipeline -profile-file='%t.profdata' \ ; RUN: -passes='thinlto-pre-link,name-anon-globals' -S %s 2>&1 \ ; RUN: | FileCheck %s --check-prefixes=CHECK-O,CHECK-Oz,CHECK-O23SZ,CHECK-O-NODIS --dump-input=fail -; RUN: opt -disable-verify -debug-pass-manager -new-pm-debug-info-for-profiling \ +; RUN: opt -disable-verify -debug-pass-manager -no-lvi-abandon \ +; RUN: -new-pm-debug-info-for-profiling \ ; RUN: -pgo-kind=pgo-instr-use-pipeline -profile-file='%t.profdata' \ ; RUN: -passes='thinlto-pre-link,name-anon-globals' -S %s 2>&1 \ ; RUN: | FileCheck %s --check-prefixes=CHECK-DIS,CHECK-O,CHECK-O2,CHECK-O23SZ,CHECK-O123 --dump-input=fail Index: llvm/test/Other/new-pm-thinlto-prelink-samplepgo-defaults.ll =================================================================== --- llvm/test/Other/new-pm-thinlto-prelink-samplepgo-defaults.ll +++ llvm/test/Other/new-pm-thinlto-prelink-samplepgo-defaults.ll @@ -1,26 +1,27 @@ ; Validate ThinLTO prelink pipeline when we have Sample PGO ; -; RUN: opt -disable-verify -debug-pass-manager \ +; RUN: opt -disable-verify -debug-pass-manager -no-lvi-abandon \ ; RUN: -pgo-kind=pgo-sample-use-pipeline -profile-file='%S/Inputs/new-pm-thinlto-samplepgo-defaults.prof' \ ; RUN: -passes='thinlto-pre-link,name-anon-globals' -S %s 2>&1 \ ; RUN: | FileCheck %s --check-prefixes=CHECK-O,CHECK-O1,CHECK-O-NODIS,CHECK-O123 --dump-input=fail -; RUN: opt -disable-verify -debug-pass-manager \ +; RUN: opt -disable-verify -debug-pass-manager -no-lvi-abandon \ ; RUN: -pgo-kind=pgo-sample-use-pipeline -profile-file='%S/Inputs/new-pm-thinlto-samplepgo-defaults.prof' \ ; RUN: -passes='thinlto-pre-link,name-anon-globals' -S %s 2>&1 \ ; RUN: | FileCheck %s --check-prefixes=CHECK-O,CHECK-O2,CHECK-O23SZ,CHECK-O-NODIS,CHECK-O123 --dump-input=fail -; RUN: opt -disable-verify -debug-pass-manager \ +; RUN: opt -disable-verify -debug-pass-manager -no-lvi-abandon \ ; RUN: -pgo-kind=pgo-sample-use-pipeline -profile-file='%S/Inputs/new-pm-thinlto-samplepgo-defaults.prof' \ ; RUN: -passes='thinlto-pre-link,name-anon-globals' -S -passes-ep-pipeline-start='no-op-module' %s 2>&1 \ ; RUN: | FileCheck %s --check-prefixes=CHECK-O,CHECK-O3,CHECK-O23SZ,CHECK-O-NODIS,CHECK-O123,CHECK-EP-PIPELINE-START --dump-input=fail -; RUN: opt -disable-verify -debug-pass-manager \ +; RUN: opt -disable-verify -debug-pass-manager -no-lvi-abandon \ ; RUN: -pgo-kind=pgo-sample-use-pipeline -profile-file='%S/Inputs/new-pm-thinlto-samplepgo-defaults.prof' \ ; RUN: -passes='thinlto-pre-link,name-anon-globals' -S %s 2>&1 \ ; RUN: | FileCheck %s --check-prefixes=CHECK-O,CHECK-Os,CHECK-O23SZ,CHECK-O-NODIS --dump-input=fail -; RUN: opt -disable-verify -debug-pass-manager \ +; RUN: opt -disable-verify -debug-pass-manager -no-lvi-abandon \ ; RUN: -pgo-kind=pgo-sample-use-pipeline -profile-file='%S/Inputs/new-pm-thinlto-samplepgo-defaults.prof' \ ; RUN: -passes='thinlto-pre-link,name-anon-globals' -S %s 2>&1 \ ; RUN: | FileCheck %s --check-prefixes=CHECK-O,CHECK-Oz,CHECK-O23SZ,CHECK-O-NODIS --dump-input=fail -; RUN: opt -disable-verify -debug-pass-manager -new-pm-debug-info-for-profiling \ +; RUN: opt -disable-verify -debug-pass-manager -no-lvi-abandon \ +; RUN: -new-pm-debug-info-for-profiling \ ; RUN: -pgo-kind=pgo-sample-use-pipeline -profile-file='%S/Inputs/new-pm-thinlto-samplepgo-defaults.prof' \ ; RUN: -passes='thinlto-pre-link,name-anon-globals' -S %s 2>&1 \ ; RUN: | FileCheck %s --check-prefixes=CHECK-DIS,CHECK-O,CHECK-O2,CHECK-O23SZ,CHECK-O123 --dump-input=fail