Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some minor passes template support for the generator #2

Open
yu810226 opened this issue Oct 6, 2018 · 1 comment
Open

Some minor passes template support for the generator #2

yu810226 opened this issue Oct 6, 2018 · 1 comment

Comments

@yu810226
Copy link

yu810226 commented Oct 6, 2018

Hi:)

I found the generator is useful for developing passes in LLVM. If I would like to add some little more supports for the generator, such as Loop pass template, choosing to register analysis pass or not. How can I test it at my local side, and probably have a patch to you.

Or if it does not meet your plan for the tool, is there a way that I can update it at my local side but not creating another similar generator? Since from my quick look of the tool, it seems like I would need to have another generator on Yeoman system if I do not merge the change in your repo. Do you have any suggestions for this?

Thanks!

@mshockwave
Copy link
Owner

mshockwave commented Oct 8, 2018

Hi!,

I'm glad that you found this tool helpful. Adding template for LoopPass looks good to me, I'll put in my TODO list. Of course, you're very welcome to send PR regarding new project template for Pass or Analysis.

To give you a really simple "getting started", you might want to read this guideline about yeoman generator development first. Then you can checkout the pass folder, which contains the sub-generator for LLVM Passes.

Currently the logic for all kinds of LLVM Passes(i.e. FunctionPass, ModulePass .etc) is put in pass/index.js. The sub-generator would choose the right template files according to user selection. All the legacy Passes shared the same template file(i.e. pass/templates/passTpl/templatePass.cpp) now, since they have nearly identical declaration structure. But IIRC, some Passes,LoopPass for example, have pretty unique Pass declarations, so you might want to create another template file.

Hope this information helps you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants