[llvm] f8e7b28 - [NewPM] Mark BitcodeWriter as required.
Eli Friedman via llvm-commits
llvm-commits at lists.llvm.org
Fri May 21 16:15:09 PDT 2021
Author: Eli Friedman
Date: 2021-05-21T16:14:09-07:00
New Revision: f8e7b28c99e9e1fdbca6600fc9d9182d7aefa162
URL: https://github.com/llvm/llvm-project/commit/f8e7b28c99e9e1fdbca6600fc9d9182d7aefa162
DIFF: https://github.com/llvm/llvm-project/commit/f8e7b28c99e9e1fdbca6600fc9d9182d7aefa162.diff
LOG: [NewPM] Mark BitcodeWriter as required.
The textual IR writer has an equivalent marking. It looks like this got
missed in e6ea877.
Added:
Modified:
llvm/include/llvm/Bitcode/BitcodeWriterPass.h
llvm/test/Other/opt-bisect-new-pass-manager.ll
Removed:
################################################################################
diff --git a/llvm/include/llvm/Bitcode/BitcodeWriterPass.h b/llvm/include/llvm/Bitcode/BitcodeWriterPass.h
index 1773d1b9f11b..dda5b20973c1 100644
--- a/llvm/include/llvm/Bitcode/BitcodeWriterPass.h
+++ b/llvm/include/llvm/Bitcode/BitcodeWriterPass.h
@@ -71,6 +71,8 @@ class BitcodeWriterPass : public PassInfoMixin<BitcodeWriterPass> {
/// Run the bitcode writer pass, and output the module to the selected
/// output stream.
PreservedAnalyses run(Module &M, ModuleAnalysisManager &);
+
+ static bool isRequired() { return true; }
};
}
diff --git a/llvm/test/Other/opt-bisect-new-pass-manager.ll b/llvm/test/Other/opt-bisect-new-pass-manager.ll
index 98080dcb9ef8..91450472398e 100644
--- a/llvm/test/Other/opt-bisect-new-pass-manager.ll
+++ b/llvm/test/Other/opt-bisect-new-pass-manager.ll
@@ -94,6 +94,10 @@
; CHECK-LIMIT-MULTI-PASS: BISECT: NOT running pass (8) PostOrderFunctionAttrsPass on (f4)
; CHECK-LIMIT-MULTI-PASS: BISECT: NOT running pass (9) EarlyCSEPass on f4
+; Make sure we don't skip writing the output to stdout.
+; RUN: opt %s -opt-bisect-limit=0 -passes=early-cse | opt -S | FileCheck %s -check-prefix=CHECK-OUTPUT
+; RUN: opt %s -opt-bisect-limit=0 -passes=early-cse -S | FileCheck %s -check-prefix=CHECK-OUTPUT
+; CHECK-OUTPUT: define void @f1
declare i32 @g()
More information about the llvm-commits
mailing list