[PATCH] D84772: [NewPM][PassInstrument] Add a new kind of before-pass callback that only get called if the pass is not skipped

Chen, Yuanfang via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 28 11:22:36 PDT 2020


ahh, naming is hard. I was thinking of required to run. Yes, it could also be required pass which is misleading. I'll go with `BeforePassIsNotSkippedFunc` which is not ambiguous.

________________________________________
From: Alina Sbirlea via Phabricator <reviews at reviews.llvm.org>
Sent: Tuesday, July 28, 2020 11:07 AM
To: Chen, Yuanfang; asbirlea at google.com; aeubanks at google.com; hans at chromium.org
Cc: czhengsz at cn.ibm.com; 88888yl at gmail.com; llvm-commits at lists.llvm.org
Subject: [PATCH] D84772: [NewPM][PassInstrument] Add a new kind of before-pass callback that only get called if the pass is not skipped

asbirlea added inline comments.


================
Comment at: llvm/include/llvm/IR/PassInstrumentation.h:77
   using BeforePassFunc = bool(StringRef, Any);
+  using BeforePassRunFunc = void(StringRef, Any);
   using AfterPassFunc = void(StringRef, Any);
----------------
aeubanks wrote:
> asbirlea wrote:
> > Perhaps `BeforePassRequiredFunc` (or similar) is more informative that these callbacks are run for required passes?
> "required" is sort of misleading, these callbacks will run on passes that aren't "required" as long as nothing says the pass should be skipped.
> `BeforePassIsNotSkippedFunc`? a little verbose
Sure, in my mind if a pass is not skipped, it can be viewed as required. I'm ok with either renaming as long we make it more informative.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D84772



More information about the llvm-commits mailing list