[PATCH] D18576: Initial implementation of optimization bisect

Paul Robinson via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 29 17:11:10 PDT 2016


probinson added a subscriber: probinson.
probinson added a comment.

Hmmm.  When we first did the 'optnone' attribute, we designed in a feature where each pass would identify itself as skippable or not, and the pass manager would run only non-skippable passes on an 'optnone' function.

Chandler was adamant that we NOT do it this way, that the pass manager should remain ignorant of this sort of trickery and each individual pass would need to decide for itself whether 'optnone' was something to pay attention to.  So, you now find at the top of a good many passes, a quick check to bail out early for 'optnone' functions.  The fiddly bits are all factored out into a base class method, but each pass has to have a two-liner at the top of its Run method to (ahem) opt-in to optnone.

This feels morally equivalent, and I think this mechanism and 'optnone' ought to behave in similar ways.
So, rather than a list of passes that are allowed to run regardless of the bisection state, you'd have each individual pass opt-in to participating in bisection.
It makes for a lot of cut-and-paste across the Transform passes, but that's the existing practice.


Repository:
  rL LLVM

http://reviews.llvm.org/D18576





More information about the llvm-commits mailing list