[PATCH] D130434: [MachineFunctinPass] Support -print-changed and -print-changed=quiet
Arthur Eubanks via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 25 09:10:58 PDT 2022
aeubanks added inline comments.
================
Comment at: llvm/include/llvm/IR/PrintPasses.h:13
#include "llvm/ADT/StringRef.h"
+#include "llvm/Support/CommandLine.h"
#include <vector>
----------------
I was worried how widespread this include may have been, but looks like only .cpp files include PrintPasses.h
================
Comment at: llvm/lib/CodeGen/MachineFunctionPass.cpp:75
+ SmallString<0> BeforeStr, AfterStr;
+ bool ShouldPrintChanged = PrintChanged != ChangePrinter::None &&
+ isFunctionInPrintList(MF.getName());
----------------
add a comment on how this only acts as `--print-changed=quiet` regardless of what's passed to `--print-changed`, with perhaps a TODO
================
Comment at: llvm/test/Other/print-changed-machine.ll:2
+; REQUIRES: aarch64-registered-target
+; RUN: llc -filetype=null -mtriple=aarch64 -O0 -print-changed %s 2>&1 | FileCheck %s --check-prefixes=VERBOSE,VERBOSE-BAR
+; RUN: llc -filetype=null -mtriple=aarch64 -O0 -print-changed -filter-print-funcs=foo %s 2>&1 | FileCheck %s --check-prefixes=VERBOSE,NO-BAR
----------------
I'm worried about how brittle this test is
making the input MIR would probably help a little
I'm also not sure which target is the simplest in terms backend passes
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D130434/new/
https://reviews.llvm.org/D130434
More information about the llvm-commits
mailing list