[llvm] r306756 - [ThinkLTO] Invoke build(Thin)?LTOPreLinkDefaultPipeline.
Tim Shen via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 29 16:08:38 PDT 2017
Author: timshen
Date: Thu Jun 29 16:08:38 2017
New Revision: 306756
URL: http://llvm.org/viewvc/llvm-project?rev=306756&view=rev
Log:
[ThinkLTO] Invoke build(Thin)?LTOPreLinkDefaultPipeline.
Previously it doesn't actually invoke the designated new PM builder
functions.
This patch moves NameAnonGlobalPass out from PassBuilder, as Chandler
points out that PassBuilder is used for non-O0 builds, and for
optimizations only.
Differential Revision: https://reviews.llvm.org/D34728
Modified:
llvm/trunk/lib/Passes/PassBuilder.cpp
llvm/trunk/test/Other/new-pm-thinlto-defaults.ll
Modified: llvm/trunk/lib/Passes/PassBuilder.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Passes/PassBuilder.cpp?rev=306756&r1=306755&r2=306756&view=diff
==============================================================================
--- llvm/trunk/lib/Passes/PassBuilder.cpp (original)
+++ llvm/trunk/lib/Passes/PassBuilder.cpp Thu Jun 29 16:08:38 2017
@@ -758,9 +758,6 @@ PassBuilder::buildThinLTOPreLinkDefaultP
// Reduce the size of the IR as much as possible.
MPM.addPass(GlobalOptPass());
- // Rename anon globals to be able to export them in the summary.
- MPM.addPass(NameAnonGlobalPass());
-
return MPM;
}
Modified: llvm/trunk/test/Other/new-pm-thinlto-defaults.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Other/new-pm-thinlto-defaults.ll?rev=306756&r1=306755&r2=306756&view=diff
==============================================================================
--- llvm/trunk/test/Other/new-pm-thinlto-defaults.ll (original)
+++ llvm/trunk/test/Other/new-pm-thinlto-defaults.ll Thu Jun 29 16:08:38 2017
@@ -9,19 +9,19 @@
;
; Prelink pipelines:
; RUN: opt -disable-verify -debug-pass-manager \
-; RUN: -passes='thinlto-pre-link<O1>' -S %s 2>&1 \
+; RUN: -passes='thinlto-pre-link<O1>,name-anon-globals' -S %s 2>&1 \
; RUN: | FileCheck %s --check-prefixes=CHECK-O,CHECK-O1,CHECK-PRELINK-O,CHECK-PRELINK-O1
; RUN: opt -disable-verify -debug-pass-manager \
-; RUN: -passes='thinlto-pre-link<O2>' -S %s 2>&1 \
+; RUN: -passes='thinlto-pre-link<O2>,name-anon-globals' -S %s 2>&1 \
; RUN: | FileCheck %s --check-prefixes=CHECK-O,CHECK-O2,CHECK-PRELINK-O,CHECK-PRELINK-O2
; RUN: opt -disable-verify -debug-pass-manager \
-; RUN: -passes='thinlto-pre-link<O3>' -S %s 2>&1 \
+; RUN: -passes='thinlto-pre-link<O3>,name-anon-globals' -S %s 2>&1 \
; RUN: | FileCheck %s --check-prefixes=CHECK-O,CHECK-O3,CHECK-PRELINK-O,CHECK-PRELINK-O3
; RUN: opt -disable-verify -debug-pass-manager \
-; RUN: -passes='thinlto-pre-link<Os>' -S %s 2>&1 \
+; RUN: -passes='thinlto-pre-link<Os>,name-anon-globals' -S %s 2>&1 \
; RUN: | FileCheck %s --check-prefixes=CHECK-O,CHECK-Os,CHECK-PRELINK-O,CHECK-PRELINK-Os
; RUN: opt -disable-verify -debug-pass-manager \
-; RUN: -passes='thinlto-pre-link<Oz>' -S %s 2>&1 \
+; RUN: -passes='thinlto-pre-link<Oz>,name-anon-globals' -S %s 2>&1 \
; RUN: | FileCheck %s --check-prefixes=CHECK-O,CHECK-Oz,CHECK-PRELINK-O,CHECK-PRELINK-Oz
;
; Postlink pipelines:
@@ -154,7 +154,6 @@
; CHECK-O-NEXT: Finished CGSCC pass manager run.
; CHECK-O-NEXT: Finished llvm::Module pass manager run.
; CHECK-PRELINK-O-NEXT: Running pass: GlobalOptPass
-; CHECK-PRELINK-O-NEXT: Running pass: NameAnonGlobalPass
; CHECK-POSTLINK-O-NEXT: Running pass: PassManager<{{.*}}Module{{.*}}>
; CHECK-POSTLINK-O-NEXT: Starting llvm::Module pass manager run.
; CHECK-POSTLINK-O-NEXT: Running pass: GlobalOptPass
@@ -188,6 +187,7 @@
; CHECK-POSTLINK-O-NEXT: Running pass: ConstantMergePass
; CHECK-POSTLINK-O-NEXT: Finished llvm::Module pass manager run.
; CHECK-O-NEXT: Finished llvm::Module pass manager run.
+; CHECK-PRELINK-O-NEXT: Running pass: NameAnonGlobalPass
; CHECK-O-NEXT: Running pass: PrintModulePass
; Make sure we get the IR back out without changes when we print the module.
More information about the llvm-commits
mailing list