[PATCH] D18576: Initial implementation of optimization bisect

Andy Kaylor via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 29 18:10:27 PDT 2016


andrew.w.kaylor added a comment.

In http://reviews.llvm.org/D18576#386453, @MatzeB wrote:

> Maintaining a list of necessary passes in the pass manager sounds wrong to me. The pass author should know best whether a pass is necessary and it would be naturally to specify it together with the pass instead of in a separate file. It also works better for out-of-tree targets or passes loaded as plugins.


Agreed.  In spite of that being the code I submitted for review, I really don't want to do it that way.  I just wanted to have something functional while searching for a better solution.

The two options I see are:

1. Have the pass managers invoke the "shouldRunPass" check and implement some way for OptBisect to query a pass to see if it is skippable.
2. Have every pass that is skippable make a shouldRunPass call at each skippable level.

I like the first option because it "automatically" provides the capability to skip passes unless the pass author explicitly does something to indicate that the pass shouldn't be skipped, but I like the second option because it gives each pass the ability to determine the granularity at which things can be skipped.


Repository:
  rL LLVM

http://reviews.llvm.org/D18576





More information about the llvm-commits mailing list