[PATCH] D105006: [NewPM] Handle passes with params in -print-before/-print-after

Bjorn Pettersson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 29 01:20:03 PDT 2021


bjope added a comment.

In D105006#2845860 <https://reviews.llvm.org/D105006#2845860>, @aeubanks wrote:

> what's the actual use case for this? --print-before/after are hacky, there's usually a better way to accomplish something aside from --print-before/after

I actually tried to use getPassNameForClassName for something else when I noticed that all passes with parameteras were missing in the map. I kind of wanted to get a listing of all the "pass names" that were used when for example running with "-passes='default<O3 <https://reviews.llvm.org/owners/package/3/>>' by letting the PrintPassInstrumentation print both the class name and pass name. Maybe that could be solved by not using class names in the PassInstrumentation/PassInstrumentationCallbacks in the first place. It kind of looks like someone has assumed that there is a one-to-one mapping between class names and pass names, but currently it is a one-to-many relation.

Nevertheless. The print-before and print-after options do exist, so I guess they should work also for the passes with params. If you want to remove them, then I think that is a different story. Someone has bothered to add support for those options in new-PM, so if you want to remove them you better discuss it with the ones who added the option. I'm just trying to fix problems I see with new-PM where the implementation is broken/incomplete.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D105006



More information about the llvm-commits mailing list