1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 12:41:49 +01:00

Revert "[LTO] Add option enable NewPM with LTOCodeGenerator."

This reverts commit 7a6a2cc81aaf064e6f5bc9a9a16973f552d2bdc2 because
it is causing failures on green dragon.
This commit is contained in:
Florian Hahn 2021-02-03 22:45:42 +00:00
parent b7fb55584a
commit 66a5e06679
6 changed files with 12 additions and 35 deletions

View File

@ -186,8 +186,6 @@ struct LTOCodeGenerator {
void setDisableVerify(bool Value) { DisableVerify = Value; }
void setUseNewPM(bool Value) { UseNewPM = Value; }
void setDiagnosticHandler(lto_diagnostic_handler_t, void *);
LLVMContext &getContext() { return Context; }
@ -248,7 +246,6 @@ private:
bool Freestanding = false;
std::unique_ptr<ToolOutputFile> StatsFile = nullptr;
bool DisableVerify = false;
bool UseNewPM = LLVM_ENABLE_NEW_PASS_MANAGER;
};
}
#endif

View File

@ -145,7 +145,6 @@ lto::Config LTOCodeGenerator::toConfig() const {
Conf.PreCodeGenPassesHook = [](legacy::PassManager &PM) {
PM.add(createObjCARCContractPass());
};
Conf.UseNewPM = UseNewPM;
return Conf;
}

View File

@ -1,41 +1,35 @@
; RUN: llvm-as < %s >%t.bc
; PR21108: Diagnostic handlers get pass remarks, even if they're not enabled.
; FIXME: Update checks for new pass manager.
; Confirm that there are -pass-remarks.
; RUN: llvm-lto -use-new-pm=false \
; RUN: -pass-remarks=inline \
; RUN: llvm-lto -pass-remarks=inline \
; RUN: -exported-symbol _func2 -pass-remarks-analysis=loop-vectorize \
; RUN: -exported-symbol _main -o %t.o %t.bc 2>&1 | \
; RUN: FileCheck %s -allow-empty -check-prefix=REMARKS
; RUN: llvm-nm %t.o | FileCheck %s -check-prefix NM
; RUN: llvm-lto -use-new-pm=false \
; RUN: -pass-remarks=inline -use-diagnostic-handler \
; RUN: llvm-lto -pass-remarks=inline -use-diagnostic-handler \
; RUN: -exported-symbol _func2 -pass-remarks-analysis=loop-vectorize \
; RUN: -exported-symbol _main -o %t.o %t.bc 2>&1 | \
; RUN: -exported-symbol _main -o %t.o %t.bc 2>&1 | \
; RUN: FileCheck %s -allow-empty -check-prefix=REMARKS_DH
; RUN: llvm-nm %t.o | FileCheck %s -check-prefix NM
; Confirm that -pass-remarks are not printed by default.
; RUN: llvm-lto -use-new-pm=false \
; RUN: llvm-lto \
; RUN: -exported-symbol _func2 \
; RUN: -exported-symbol _main -o %t.o %t.bc 2>&1 | \
; RUN: FileCheck %s -allow-empty
; RUN: llvm-nm %t.o | FileCheck %s -check-prefix NM
; RUN: llvm-lto -use-new-pm=false \
; RUN: -use-diagnostic-handler \
; RUN: -exported-symbol _func2 \
; RUN: -exported-symbol _main -o %t.o %t.bc 2>&1 | \
; RUN: llvm-lto -use-diagnostic-handler \
; RUN: -exported-symbol _func2 \
; RUN: -exported-symbol _main -o %t.o %t.bc 2>&1 | \
; RUN: FileCheck %s -allow-empty
; RUN: llvm-nm %t.o | FileCheck %s -check-prefix NM
; Optimization records are collected regardless of the diagnostic handler
; RUN: rm -f %t.yaml
; RUN: llvm-lto -use-new-pm=false \
; RUN: -lto-pass-remarks-output=%t.yaml \
; RUN: llvm-lto -lto-pass-remarks-output=%t.yaml \
; RUN: -exported-symbol _func2 \
; RUN: -exported-symbol _main -o %t.o %t.bc 2>&1 | \
; RUN: FileCheck %s -allow-empty

View File

@ -1,8 +1,6 @@
; RUN: llvm-as < %s >%t.bc
; RUN: llvm-lto -use-new-pm=false -debug-pass=Arguments -exported-symbol=_f -o /dev/null %t.bc 2>&1 -disable-verify | FileCheck %s
; RUN: llvm-lto -use-new-pm=false -debug-pass=Arguments -exported-symbol=_f -o /dev/null %t.bc 2>&1 | FileCheck %s -check-prefix=VERIFY
; FIXME: Update checks for new pass manager.
; RUN: llvm-lto -debug-pass=Arguments -exported-symbol=_f -o /dev/null %t.bc 2>&1 -disable-verify | FileCheck %s
; RUN: llvm-lto -debug-pass=Arguments -exported-symbol=_f -o /dev/null %t.bc 2>&1 | FileCheck %s -check-prefix=VERIFY
target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-apple-macosx10.10.0"

View File

@ -1,10 +1,6 @@
; RUN: opt -module-summary %s -o %t.bc
; RUN: llvm-lto -use-new-pm=false -hot-cold-split=true \
; RUN: -thinlto-action=run %t.bc -debug-pass=Structure 2>&1 | FileCheck %s -check-prefix=OLDPM-ANYLTO-POSTLINK-Os
; RUN: llvm-lto -use-new-pm=false -hot-cold-split=true \
; RUN: %t.bc -debug-pass=Structure 2>&1 | FileCheck %s -check-prefix=OLDPM-ANYLTO-POSTLINK-Os
; FIXME: Update checks for new pass manager.
; RUN: llvm-lto -hot-cold-split=true -thinlto-action=run %t.bc -debug-pass=Structure 2>&1 | FileCheck %s -check-prefix=OLDPM-ANYLTO-POSTLINK-Os
; RUN: llvm-lto -hot-cold-split=true %t.bc -debug-pass=Structure 2>&1 | FileCheck %s -check-prefix=OLDPM-ANYLTO-POSTLINK-Os
; REQUIRES: asserts

View File

@ -222,11 +222,6 @@ static cl::opt<bool> PrintMachOCPUOnly(
"print-macho-cpu-only", cl::init(false),
cl::desc("Instead of running LTO, print the mach-o cpu in each IR file"));
static cl::opt<bool>
UseNewPM("use-new-pm",
cl::desc("Run LTO passes using the new pass manager"),
cl::init(LLVM_ENABLE_NEW_PASS_MANAGER), cl::Hidden);
namespace {
struct ModuleInfo {
@ -1019,8 +1014,6 @@ int main(int argc, char **argv) {
CodeGen.setOptLevel(OptLevel - '0');
CodeGen.setAttrs(codegen::getMAttrs());
CodeGen.setUseNewPM(UseNewPM);
if (auto FT = codegen::getExplicitFileType())
CodeGen.setFileType(FT.getValue());