[PATCH] D133055: [MachineFunctionPass] Support -filter-passes for -print-changed

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 1 10:52:29 PDT 2022


MaskRay added inline comments.


================
Comment at: llvm/lib/CodeGen/MachineFunctionPass.cpp:155
+      const char *Reason =
+          IsInterestingPass ? " omitted because no change" : " filtered out";
+      errs() << "*** IR Dump After " << getPassName();
----------------
aeubanks wrote:
> `isFunctionInPrintList` should also use "filtered out"
There is a difference between MachineFunctionPass and a new PM pass filter: MachineFunctionPass does not print anything for a -filter-print-funcs ignored function while a new PM pass filter prints " filtered out".

Personally I feel the MachineFunctionPass behavior is more reasonable but I will note that there is inconsistency. At any rate this difference probably should be addressed in this patch.


================
Comment at: llvm/test/Other/print-changed-machine.ll:37
+
+; QUIET-FILTER: *** IR Dump After IRTranslator (irtranslator) on foo ***
+; QUIET-FILTER: *** IR Dump After IRTranslator (irtranslator) on bar ***
----------------
aeubanks wrote:
> perhaps a `QUIET-FILTER-NOT: legalizer`?
`--implicit-check-not='IR Dump'` covers this check :)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D133055/new/

https://reviews.llvm.org/D133055



More information about the llvm-commits mailing list