[llvm-dev] OptBisect implementation for new pass manager

David Greene via llvm-dev llvm-dev at lists.llvm.org
Thu Sep 27 10:29:33 PDT 2018


Philip Pfaffe <philip.pfaffe at gmail.com> writes:

> If a pass shouldn't be skipped for whatever reason, that's not
> something the pass should worry about, that's the bisect driver's
> problem! My proposal here would be make it an opt-out design, but let
> the driver control that. E.g., for skipping, let the user provide a
> list of passes they don't want skipped.

I came to a similar conclusion while stuck in traffic yesterday.

Whether the model is opt-in or opt-out should not matter to pass
developers at all.  Passes should be completely unaware of bisect
because passes alone don't have enough information whether they should
opt in or opt out.

Only the thing that sets up the pass pipeline knows what the
requirements are.  I know we're not tackling codegen yet, but bear with
me.  Is scheduling required to run to produce a correct executable?  It
depends.  Different targets have different needs.  The scheduling pass
itself cannot know.  Whichever entity constructs the pass pipeline needs
to specify whether an added pass is required at that point.  Maybe that
same pass isn't required to run at some other point.

Whether bisect is opt-in or opt-out by default only affects the thing
constructing pass pipelines.  It has to decide what to tell the manager
of passes concerning its needs.

                            -David


More information about the llvm-dev mailing list