-
Notifications
You must be signed in to change notification settings - Fork 13.4k
[CodeGen][Pass] Add TargetPassBuilder
#137290
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
base: main
Are you sure you want to change the base?
Conversation
But there are no virtual methods, so are we removing distinct phases (like |
IMHO some phases here is not clear, the example is pre emit, we have
Yeah pre isel is one of phases To be more radical, I even want to use type erasure to ensure backends only add dag isel and asm printer to replace the |
22d7f27
to
b34d27c
Compare
d9d61ec
to
d30808d
Compare
d30808d
to
5e3864a
Compare
5e3864a
to
b4867b3
Compare
Support dummy injection points now, they are PreISel, PostBBSections and PreEmit. |
Instead of force pushing, can you keep separate commits each time you add a new patch? It would be easier to identify the new changes coming in. |
This implementation supports
--start/stop-before/after
options by hijacking original pass managers. With injected-class-name, user should not feel any difference from original pass manager in most cases.Except virtual functions to add necessary passes (e.g. instruction select pass), the only method to extend the pipeline is
injectBefore
, which accept a callback to extend pipeline at the specified point. The return type of the callback is depend on the selected pass