[LLVMdev] Minor pass manager related question about where to put header files...

Chandler Carruth chandlerc at gmail.com
Wed Jan 21 03:46:10 PST 2015


So the new pass manager makes passes just be classes that implement a
particular interface. And in the spirit of having boring and unsurprising
patterns, there really is nothing more to it than that. No memory
allocation is required, and passes will, by default, be "utilities" which
can be run directly and on their own.

However, this raises an interesting question. Where should the pass headers
go? They need to be visible to library consumers in order to build up their
own interesting pass pipelines. For example, I plan to eventually wrap the
functionality I've been building for the new pass manager in the 'opt' tool
into a library, and then its low-tech pass registration system will need to
include all the headers for all the passes in order to instantiate them for
particular pass pipelines.

My inclination is to just do the unsurprising thing and mirror the
Transforms lib structure under include/llvm with per-pass header files.
Does anyone see problems with this? Concerns they'd like to make sure are
addressed now?

I ask this now because I'm ready to port the first significant transform to
the new pass manager. =] I have a patch that ports InstCombine, everything
works, but I need a place to put the header.

-Chandler
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150121/aee659ed/attachment.html>


More information about the llvm-dev mailing list