3 Commits

Author SHA1 Message Date
Arthur Eubanks
942cb2427a
[CodeGen][NewPM] Consolidate PASS_NAME and CONSTRUCTOR in MachinePassRegistry.def (#80779)
This matches the optimization pipeline's PassRegistry.def.

I ran into a bug where CONSTRUCTOR wasn't always being used (in
PassBuilder::registerMachineFunctionAnalyses()).

Make DUMMY_* just accept a pass name, there's no point in having proper
constructors if the generated dummy class has a templated constructor
accepting arbitrary arguments.

Remove unused getPassNameFromLegacyName() as it was using this but for
no purpose.

Remove DUMMY_MACHINE_FUNCTION_ANALYSIS, we can just add those as we port
them.

This for some reason exposed missing mock calls in existing unittests.
2024-02-05 20:17:09 -08:00
paperchalice
122ed552fc
[CodeGen] Remove MachinePassKey (#79406)
We now use PassT::name to distinguish Passes.
2024-01-25 15:44:24 +08:00
paperchalice
7251243315
[CodeGen][Passes] Move CodeGenPassBuilder.h to Passes (#79242)
`CodeGenPassBuilder` is not very tightly coupled to CodeGen, it may need
to reference some method in pass builder in future, so move
`CodeGenPassBuilder.h` to Passes.
2024-01-24 11:29:18 +08:00