This is an archive of the discontinued LLVM Phabricator instance.

Make ConvertToSPIRV passes OperationPass
ClosedPublic

Authored by jackalcooper on Aug 10 2022, 9:30 AM.

Details

Summary

Make passes converting ops from other dialects to spirv OperationPass, so that downstream compiler could put them in a proper nested pass manager to lower device code only.

Diff Detail

Event Timeline

jackalcooper created this revision.Aug 10 2022, 9:30 AM
jackalcooper requested review of this revision.Aug 10 2022, 9:30 AM
antiagainst requested changes to this revision.Aug 10 2022, 9:40 AM

Awesome, thanks!

mlir/include/mlir/Conversion/ControlFlowToLLVM/ControlFlowToLLVM.h
16

This is not for SPIR-V. Could you split it out as a separate patch? Thanks!

This revision now requires changes to proceed.Aug 10 2022, 9:40 AM
jackalcooper added inline comments.Aug 10 2022, 9:43 AM
mlir/include/mlir/Conversion/ControlFlowToLLVM/ControlFlowToLLVM.h
16

This include pulls in the declaration for OperationPass<> used below.

jackalcooper added inline comments.Aug 10 2022, 9:46 AM
mlir/include/mlir/Conversion/ControlFlowToLLVM/ControlFlowToLLVM.h
16

Oh, I can use fw declaration.

antiagainst added inline comments.Aug 10 2022, 9:47 AM
mlir/include/mlir/Conversion/ControlFlowToLLVM/ControlFlowToLLVM.h
16

Sorry, the comment is misplaced. This is actually for L32, which is createConvertControlFlowToLLVMPass().

antiagainst accepted this revision.Aug 10 2022, 10:11 AM
This revision is now accepted and ready to land.Aug 10 2022, 10:11 AM
This revision was landed with ongoing or failed builds.Aug 10 2022, 10:50 AM
This revision was automatically updated to reflect the committed changes.