[PATCH] D58406: Fix IR/Analysis layering issue in OptBisect

Fedor Sergeev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 27 03:50:53 PST 2019


fedor.sergeev accepted this revision.
fedor.sergeev added a comment.
This revision is now accepted and ready to land.

I do like the final result!
See my comment, but its good to go even w/o my suggestion.



================
Comment at: include/llvm/IR/OptBisect.h:29
 
-  virtual bool shouldRunPass(const Pass *P, const Module &U) { return true; }
-  virtual bool shouldRunPass(const Pass *P, const Function &U)  {return true; }
-  virtual bool shouldRunPass(const Pass *P, const BasicBlock &U)  { return true; }
-  virtual bool shouldRunPass(const Pass *P, const Region &U)  { return true; }
-  virtual bool shouldRunPass(const Pass *P, const Loop &U)  { return true; }
-  virtual bool shouldRunPass(const Pass *P, const CallGraphSCC &U)  { return true; }
+  virtual bool shouldRunPass(const Pass *P, StringRef IRDescription) {
+    return true;
----------------
So, since we went over changing the interface to use StringRef for description, can we move one more step further
in that direction and start passing StringRef for Pass?
That would make this interface fully ready for new pass manager.

I can do it later on myself, but doing it here would lessen the churn by doing one change in interface, not two of them.

(it will not add any more overhead since pass name is always available as a string literal)


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

https://reviews.llvm.org/D58406





More information about the llvm-commits mailing list