[llvm] aa0981b - Revert "[LTO] Add a function `LTOCodeGenerator::getMergedModule`"
Shilei Tian via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 13 13:31:30 PST 2021
Author: Shilei Tian
Date: 2021-12-13T16:31:22-05:00
New Revision: aa0981ba86d73309163b70b95da50ee79c1eda05
URL: https://github.com/llvm/llvm-project/commit/aa0981ba86d73309163b70b95da50ee79c1eda05
DIFF: https://github.com/llvm/llvm-project/commit/aa0981ba86d73309163b70b95da50ee79c1eda05.diff
LOG: Revert "[LTO] Add a function `LTOCodeGenerator::getMergedModule`"
This reverts commit 61051e42c2d5b30ad440b2b275397fc0aa478434.
Added:
Modified:
llvm/include/llvm/LTO/legacy/LTOCodeGenerator.h
llvm/tools/llvm-lto/llvm-lto.cpp
Removed:
llvm/test/tools/llvm-lto/dump.ll
################################################################################
diff --git a/llvm/include/llvm/LTO/legacy/LTOCodeGenerator.h b/llvm/include/llvm/LTO/legacy/LTOCodeGenerator.h
index 91c1decac373f..333f483f29c54 100644
--- a/llvm/include/llvm/LTO/legacy/LTOCodeGenerator.h
+++ b/llvm/include/llvm/LTO/legacy/LTOCodeGenerator.h
@@ -193,8 +193,6 @@ struct LTOCodeGenerator {
void resetMergedModule() { MergedModule.reset(); }
void DiagnosticHandler(const DiagnosticInfo &DI);
- Module &getMergedModule() { return *MergedModule; }
-
private:
/// Verify the merged module on first call.
///
diff --git a/llvm/test/tools/llvm-lto/dump.ll b/llvm/test/tools/llvm-lto/dump.ll
deleted file mode 100644
index 57e6b757664f0..0000000000000
--- a/llvm/test/tools/llvm-lto/dump.ll
+++ /dev/null
@@ -1,14 +0,0 @@
-; RUN: llvm-as < %s > %t1
-; RUN: llvm-lto --dump-linked-module %t1 2>&1 | FileCheck %s
-
-; CHEKCK: target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
-
-; CHECK: define void @f() {
-define void @f() {
-; CHECK-NEXT: entry:
-entry:
-; CHECK-NEXT: ret void
- ret void
-; CHECK-NEXT: }
-}
diff --git a/llvm/tools/llvm-lto/llvm-lto.cpp b/llvm/tools/llvm-lto/llvm-lto.cpp
index be91ec25d7ad4..995ebacacb870 100644
--- a/llvm/tools/llvm-lto/llvm-lto.cpp
+++ b/llvm/tools/llvm-lto/llvm-lto.cpp
@@ -197,11 +197,6 @@ static cl::opt<bool>
cl::desc("Write merged LTO module to file before CodeGen"),
cl::cat(LTOCategory));
-static cl::opt<bool>
- DumpLinkedModule("dump-linked-module", cl::init(false),
- cl::desc("Dump linked LTO module before optimize"),
- cl::cat(LTOCategory));
-
static cl::list<std::string> InputFilenames(cl::Positional, cl::OneOrMore,
cl::desc("<input bitcode files>"),
cl::cat(LTOCategory));
@@ -321,11 +316,11 @@ namespace {
if (!CurrentActivity.empty())
OS << ' ' << CurrentActivity;
OS << ": ";
-
+
DiagnosticPrinterRawOStream DP(OS);
DI.print(DP);
OS << '\n';
-
+
if (DI.getSeverity() == DS_Error)
exit(1);
return true;
@@ -1120,14 +1115,6 @@ int main(int argc, char **argv) {
error("error compiling the code");
} else {
- if (DumpLinkedModule) {
- if (SaveLinkedModuleFile)
- error(": -dump-linked-module must be used without -dump-linked-module");
-
- Module &M = CodeGen.getMergedModule();
- M.dump();
- }
-
if (Parallelism != 1)
error("-j must be specified together with -o");
More information about the llvm-commits
mailing list