[llvm] a4095df - Don't print uselistorder in --print-changed
Arthur Eubanks via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 7 14:49:48 PDT 2021
Author: Arthur Eubanks
Date: 2021-10-07T14:48:18-07:00
New Revision: a4095df44cd402cdd99fccdef83cac867620e179
URL: https://github.com/llvm/llvm-project/commit/a4095df44cd402cdd99fccdef83cac867620e179
DIFF: https://github.com/llvm/llvm-project/commit/a4095df44cd402cdd99fccdef83cac867620e179.diff
LOG: Don't print uselistorder in --print-changed
Using uselistorders is fairly niche, it shouldn't be on by default and mostly just clutters the output.
Reviewed By: jamieschmeiser
Differential Revision: https://reviews.llvm.org/D111282
Added:
Modified:
llvm/lib/Passes/StandardInstrumentations.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Passes/StandardInstrumentations.cpp b/llvm/lib/Passes/StandardInstrumentations.cpp
index fbe4f25242c2d..28d2ca21f6d19 100644
--- a/llvm/lib/Passes/StandardInstrumentations.cpp
+++ b/llvm/lib/Passes/StandardInstrumentations.cpp
@@ -230,10 +230,9 @@ void printIR(raw_ostream &OS, const Function *F) {
OS << *F;
}
-void printIR(raw_ostream &OS, const Module *M,
- bool ShouldPreserveUseListOrder = false) {
+void printIR(raw_ostream &OS, const Module *M) {
if (isFunctionInPrintList("*") || forcePrintModuleIR()) {
- M->print(OS, nullptr, ShouldPreserveUseListOrder);
+ M->print(OS, nullptr);
} else {
for (const auto &F : M->functions()) {
printIR(OS, &F);
@@ -323,21 +322,20 @@ bool shouldPrintIR(Any IR) {
/// Generic IR-printing helper that unpacks a pointer to IRUnit wrapped into
/// llvm::Any and does actual print job.
-void unwrapAndPrint(raw_ostream &OS, Any IR,
- bool ShouldPreserveUseListOrder = false) {
+void unwrapAndPrint(raw_ostream &OS, Any IR) {
if (!shouldPrintIR(IR))
return;
if (forcePrintModuleIR()) {
auto *M = unwrapModule(IR);
assert(M && "should have unwrapped module");
- printIR(OS, M, ShouldPreserveUseListOrder);
+ printIR(OS, M);
return;
}
if (any_isa<const Module *>(IR)) {
const Module *M = any_cast<const Module *>(IR);
- printIR(OS, M, ShouldPreserveUseListOrder);
+ printIR(OS, M);
return;
}
@@ -497,8 +495,7 @@ void TextChangeReporter<IRUnitT>::handleInitialIR(Any IR) {
auto *M = unwrapModule(IR, /*Force=*/true);
assert(M && "Expected module to be unwrapped when forced.");
Out << "*** IR Dump At Start ***\n";
- M->print(Out, nullptr,
- /*ShouldPreserveUseListOrder=*/true);
+ M->print(Out, nullptr);
}
template <typename IRUnitT>
@@ -538,8 +535,7 @@ void IRChangedPrinter::registerCallbacks(PassInstrumentationCallbacks &PIC) {
void IRChangedPrinter::generateIRRepresentation(Any IR, StringRef PassID,
std::string &Output) {
raw_string_ostream OS(Output);
- unwrapAndPrint(OS, IR,
- /*ShouldPreserveUseListOrder=*/true);
+ unwrapAndPrint(OS, IR);
OS.str();
}
More information about the llvm-commits
mailing list