[PATCH] D18576: Initial implementation of optimization bisect

Matthias Braun via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 29 18:02:13 PDT 2016


MatzeB added a comment.

In http://reviews.llvm.org/D18576#386443, @andrew.w.kaylor wrote:

> One difference I see is that "optnone" is an attribute within the IR and so the pass manager shouldn't be looking for it (maybe that's the "trickery" that Chandler didn't want the pass manager to be in on?) whereas the OptBisect class exists for the sole purpose of deciding to skip optimizations, and so it necessarily (maybe) needs to be aware that there are some passes that can't be skipped.
>
> The obvious alternative is to not have the pass manager involved in any of this and put the shouldRunPass() check directly into the passes themselves.  I was trying to avoid having to change a lot of different places to get this working, but that feels a bit more natural and it matches what's going to have to happen to skip individual optimizations.


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.


Repository:
  rL LLVM

http://reviews.llvm.org/D18576





More information about the llvm-commits mailing list