Avoid PassPass cases by not blindly appending Pass. Currently pass definitions
in ODS either end or don't with Pass. This is contrary to Ops & Attr (Types are
inconsistent in this regard) where Op and Attr are appended to the name. Change
the PassGen behavior to not append 'Pass' again this avoids 'PassPass' suffix
(which I can't think where we'd need) and we can update naming to be consistent
incrementally.
Details
- Reviewers
rriddle
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Ops & attrs have Op and Attr as suffix, I want Pass definition to behave the same. This is only a hack in that it doesn't enforce or flag an error if you don't end a pass description with Pass in the def name. The fix in the source is to go append Pass everywhere, but then with the existing code you'd get registerXPassPass which is what this is addressing. Post this yes we can fix the source and not have registerXPassPass for def XPass : Pass.
I'm not sure if you're saying that the desired end state is to add a Pass suffix or not?
Either way, why not just implement the desired end-state immediately?
The desired end state is to add a Pass suffix always.
Either way, why not just implement the desired end-state immediately?
That is a mechanical change that could be done with sed. I can add it in along with this, but I felt it would obscure the code change and so I had though of doing that as a follow up instead. But I can also add it in along with this change. Up to you.