Move summary creation out of llvm-as into opt
Summary:
Let keep llvm-as "dumb": it converts textual IR to bitcode. This
commit removes the dependency from llvm-as to libLLVMAnalysis.
We'll add back summary in llvm-as if we get to a textual
representation for it at some point. In the meantime, opt seems
like a better place for that.
Reviewers: tejohnson
Subscribers: joker.eph, llvm-commits
Differential Revision: http://reviews.llvm.org/D19032
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 266131
diff --git a/llvm/test/Bitcode/module_hash.ll b/llvm/test/Bitcode/module_hash.ll
index fda6030..56f3fdc 100644
--- a/llvm/test/Bitcode/module_hash.ll
+++ b/llvm/test/Bitcode/module_hash.ll
@@ -1,14 +1,14 @@
; Check per module hash.
-; RUN: llvm-as -module-hash %s -o - | llvm-bcanalyzer -dump | FileCheck %s --check-prefix=MOD1
+; RUN: opt -module-hash %s -o - | llvm-bcanalyzer -dump | FileCheck %s --check-prefix=MOD1
; MOD1: <HASH op0={{[0-9]*}} op1={{[0-9]*}} op2={{[0-9]*}} op3={{[0-9]*}} op4={{[0-9]*}} (match)/>
-; RUN: llvm-as -module-hash %p/Inputs/module_hash.ll -o - | llvm-bcanalyzer -dump | FileCheck %s --check-prefix=MOD2
+; RUN: opt -module-hash %p/Inputs/module_hash.ll -o - | llvm-bcanalyzer -dump | FileCheck %s --check-prefix=MOD2
; MOD2: <HASH op0={{[0-9]*}} op1={{[0-9]*}} op2={{[0-9]*}} op3={{[0-9]*}} op4={{[0-9]*}} (match)/>
; Check that the hash matches in the combined index.
; First regenerate the modules with a summary
-; RUN: llvm-as -module-hash -module-summary %s -o %t.m1.bc
-; RUN: llvm-as -module-hash -module-summary %p/Inputs/module_hash.ll -o %t.m2.bc
+; RUN: opt -module-hash -module-summary %s -o %t.m1.bc
+; RUN: opt -module-hash -module-summary %p/Inputs/module_hash.ll -o %t.m2.bc
; Recover the hashes from the modules themselves.
; RUN: llvm-bcanalyzer -dump %t.m1.bc | grep '<HASH' > %t.hash
diff --git a/llvm/test/Bitcode/thinlto-function-summary-callgraph-pgo.ll b/llvm/test/Bitcode/thinlto-function-summary-callgraph-pgo.ll
index f4d02ad..dc94608 100644
--- a/llvm/test/Bitcode/thinlto-function-summary-callgraph-pgo.ll
+++ b/llvm/test/Bitcode/thinlto-function-summary-callgraph-pgo.ll
@@ -1,7 +1,7 @@
; Test to check the callgraph in summary when there is PGO
-; RUN: llvm-as -module-summary %s -o %t.o
+; RUN: opt -module-summary %s -o %t.o
; RUN: llvm-bcanalyzer -dump %t.o | FileCheck %s
-; RUN: llvm-as -module-summary %p/Inputs/thinlto-function-summary-callgraph.ll -o %t2.o
+; RUN: opt -module-summary %p/Inputs/thinlto-function-summary-callgraph.ll -o %t2.o
; RUN: llvm-lto -thinlto -o %t3 %t.o %t2.o
; RUN: llvm-bcanalyzer -dump %t3.thinlto.bc | FileCheck %s --check-prefix=COMBINED
diff --git a/llvm/test/Bitcode/thinlto-function-summary-callgraph.ll b/llvm/test/Bitcode/thinlto-function-summary-callgraph.ll
index 992f447..e8533db 100644
--- a/llvm/test/Bitcode/thinlto-function-summary-callgraph.ll
+++ b/llvm/test/Bitcode/thinlto-function-summary-callgraph.ll
@@ -1,7 +1,7 @@
; Test to check the callgraph in summary
-; RUN: llvm-as -module-summary %s -o %t.o
+; RUN: opt -module-summary %s -o %t.o
; RUN: llvm-bcanalyzer -dump %t.o | FileCheck %s
-; RUN: llvm-as -module-summary %p/Inputs/thinlto-function-summary-callgraph.ll -o %t2.o
+; RUN: opt -module-summary %p/Inputs/thinlto-function-summary-callgraph.ll -o %t2.o
; RUN: llvm-lto -thinlto -o %t3 %t.o %t2.o
; RUN: llvm-bcanalyzer -dump %t3.thinlto.bc | FileCheck %s --check-prefix=COMBINED
diff --git a/llvm/test/Bitcode/thinlto-function-summary-refgraph.ll b/llvm/test/Bitcode/thinlto-function-summary-refgraph.ll
index d8698bf..0ae9f17 100644
--- a/llvm/test/Bitcode/thinlto-function-summary-refgraph.ll
+++ b/llvm/test/Bitcode/thinlto-function-summary-refgraph.ll
@@ -1,5 +1,5 @@
; Test to check both the callgraph and refgraph in summary
-; RUN: llvm-as -module-summary %s -o %t.o
+; RUN: opt -module-summary %s -o %t.o
; RUN: llvm-bcanalyzer -dump %t.o | FileCheck %s
; See if the calls and other references are recorded properly using the
diff --git a/llvm/test/Bitcode/thinlto-function-summary.ll b/llvm/test/Bitcode/thinlto-function-summary.ll
index 25afa43..04a3165 100644
--- a/llvm/test/Bitcode/thinlto-function-summary.ll
+++ b/llvm/test/Bitcode/thinlto-function-summary.ll
@@ -1,4 +1,4 @@
-; RUN: llvm-as -module-summary < %s | llvm-bcanalyzer -dump | FileCheck %s -check-prefix=BC
+; RUN: opt -module-summary < %s | llvm-bcanalyzer -dump | FileCheck %s -check-prefix=BC
; Check for summary block/records.
; Check the value ids in the summary entries against the
@@ -13,7 +13,7 @@
; BC-NEXT: <FNENTRY {{.*}} op0=2 {{.*}}> record string = 'bar'
; BC-NEXT: <FNENTRY {{.*}} op0=4 {{.*}}> record string = 'f'
-; RUN: llvm-as -module-summary < %s | llvm-dis | FileCheck %s
+; RUN: opt -module-summary < %s | llvm-dis | FileCheck %s
; Check that this round-trips correctly.
; ModuleID = '<stdin>'
diff --git a/llvm/test/Bitcode/thinlto-summary-linkage-types.ll b/llvm/test/Bitcode/thinlto-summary-linkage-types.ll
index f008749..6f4f3d5 100644
--- a/llvm/test/Bitcode/thinlto-summary-linkage-types.ll
+++ b/llvm/test/Bitcode/thinlto-summary-linkage-types.ll
@@ -1,5 +1,5 @@
; Check the linkage types in both the per-module and combined summaries.
-; RUN: llvm-as -module-summary %s -o %t.o
+; RUN: opt -module-summary %s -o %t.o
; RUN: llvm-bcanalyzer -dump %t.o | FileCheck %s
; RUN: llvm-lto -thinlto -o %t2 %t.o
; RUN: llvm-bcanalyzer -dump %t2.thinlto.bc | FileCheck %s --check-prefix=COMBINED