[PATCH] D20888: [LTO] Add --lto-aa-pipeline
Davide Italiano via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 2 16:04:45 PDT 2016
This revision was automatically updated to reflect the committed changes.
Closed by commit rL271605: [LTO] Add --lto-aa-pipeline. (authored by davide).
Changed prior to commit:
http://reviews.llvm.org/D20888?vs=59302&id=59472#toc
Repository:
rL LLVM
http://reviews.llvm.org/D20888
Files:
lld/trunk/ELF/Config.h
lld/trunk/ELF/Driver.cpp
lld/trunk/ELF/LTO.cpp
lld/trunk/ELF/Options.td
lld/trunk/test/ELF/lto/ltopasses-custom.ll
Index: lld/trunk/test/ELF/lto/ltopasses-custom.ll
===================================================================
--- lld/trunk/test/ELF/lto/ltopasses-custom.ll
+++ lld/trunk/test/ELF/lto/ltopasses-custom.ll
@@ -1,6 +1,7 @@
; REQUIRES: x86
; RUN: llvm-as %s -o %t.o
-; RUN: ld.lld -m elf_x86_64 %t.o -o %t.so -save-temps --lto-newpm-passes=ipsccp -shared
+; RUN: ld.lld -m elf_x86_64 %t.o -o %t.so -save-temps --lto-aa-pipeline=basic-aa \
+; RUN: --lto-newpm-passes=ipsccp -shared
; RUN: ld.lld -m elf_x86_64 %t.o -o %t2.so -save-temps --lto-newpm-passes=loweratomic -shared
; RUN: llvm-dis %t.so.lto.opt.bc -o - | FileCheck %s
; RUN: llvm-dis %t2.so.lto.opt.bc -o - | FileCheck %s --check-prefix=ATOMIC
Index: lld/trunk/ELF/LTO.cpp
===================================================================
--- lld/trunk/ELF/LTO.cpp
+++ lld/trunk/ELF/LTO.cpp
@@ -66,6 +66,13 @@
PassBuilder PB(&TM);
AAManager AA;
+
+ // Parse a custom AA pipeline if asked to.
+ if (!PB.parseAAPipeline(AA, Config->LtoAAPipeline)) {
+ error("Unable to parse AA pipeline description: " + Config->LtoAAPipeline);
+ return;
+ }
+
LoopAnalysisManager LAM;
FunctionAnalysisManager FAM;
CGSCCAnalysisManager CGAM;
Index: lld/trunk/ELF/Config.h
===================================================================
--- lld/trunk/ELF/Config.h
+++ lld/trunk/ELF/Config.h
@@ -44,6 +44,7 @@
llvm::StringRef Emulation;
llvm::StringRef Fini;
llvm::StringRef Init;
+ llvm::StringRef LtoAAPipeline;
llvm::StringRef LtoNewPmPasses;
llvm::StringRef OutputFile;
llvm::StringRef SoName;
Index: lld/trunk/ELF/Driver.cpp
===================================================================
--- lld/trunk/ELF/Driver.cpp
+++ lld/trunk/ELF/Driver.cpp
@@ -338,6 +338,7 @@
Config->Entry = getString(Args, OPT_entry);
Config->Fini = getString(Args, OPT_fini, "_fini");
Config->Init = getString(Args, OPT_init, "_init");
+ Config->LtoAAPipeline = getString(Args, OPT_lto_aa_pipeline);
Config->LtoNewPmPasses = getString(Args, OPT_lto_newpm_passes);
Config->OutputFile = getString(Args, OPT_o);
Config->SoName = getString(Args, OPT_soname);
Index: lld/trunk/ELF/Options.td
===================================================================
--- lld/trunk/ELF/Options.td
+++ lld/trunk/ELF/Options.td
@@ -260,6 +260,8 @@
// LTO-related options.
def lto_jobs : Joined<["--"], "lto-jobs=">,
HelpText<"Number of threads to run codegen">;
+def lto_aa_pipeline : Joined<["--"], "lto-aa-pipeline=">,
+ HelpText<"AA pipeline to run during LTO. Used in conjunction with -lto-newpm-passes">;
def lto_newpm_passes : Joined<["--"], "lto-newpm-passes=">,
HelpText<"Passes to run during LTO">;
def disable_verify : Flag<["-"], "disable-verify">;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D20888.59472.patch
Type: text/x-patch
Size: 2760 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160602/abb2275a/attachment.bin>
More information about the llvm-commits
mailing list