Pass Schedule Error

I've been puzzling over this for a day:

Unable to schedule 'Unnamed pass: implement Pass::getPassName()'
required by '<some pass>'
Unable to schedule pass
UNREACHABLE executed at llvm/lib/VMCore/PassManager.cpp:1213!

First, why can't getPassName find the name? I have provided one in the
usual way. Second, why is it unable to schedule the pass?

-debug-pass=Details doesn't provide much help.

This analysis pass is somewhat different in that it has a class
hierarchy like this:

             MyPass
               >
               V
          MyPassBase<T>
               >
               V
       MachineFunctionPass

I pass the static ID down through MyPassBase to MachineFunctionPass in
the constructor.

Is there any reason why this inheritance would cause a problem? The
problem occurred when I factored most of MyPass out into MyPassBase for
reuse.

Thanks!

                               -David

I’ve been puzzling over this for a day:

Unable to schedule ‘Unnamed pass: implement Pass::getPassName()’
required by ‘’
Unable to schedule pass
UNREACHABLE executed at llvm/lib/VMCore/PassManager.cpp:1213!

First, why can’t getPassName find the name? I have provided one in the
usual way. Second, why is it unable to schedule the pass?

The INITIALIZE_PASS macro is the usual way. Is that what you mean?

You would need to initialize each subclass of MyPassBase separately and each needs its own ID.

-Andy

Andrew Trick <atrick@apple.com> writes: