llvm / circt

Circuit IR Compilers and Tools
https://circt.org
Other
1.64k stars 286 forks source link

[ExportVerilog] Avoid using interface pass for PrepareForEmission, NFCI #7168

Closed uenoku closed 3 months ago

uenoku commented 3 months ago

ODS InterfacePass generates canScheduleOn method with a specified interface in a header file and currently we import every pass declaration through PassesDetail.h. Gcc/clang seem to compile when there is an unknown interface class but MSVC emits an error. So this PR avoids InterfacePass in ODS and manually implements canScheduleOn in PrepareForEmission.

Windows CI: https://github.com/llvm/circt/actions/runs/9497120978

uenoku commented 3 months ago

I'm going to merge the PR to fix windows CI. I think a right fix is to stop using GEN_PASS_DECL in PassDetail.h. See https://github.com/llvm/circt/issues/3962.