This is an archive of the discontinued LLVM Phabricator instance.

[MLIR] Make gpu.launch_func rewrite pattern part of the LLVM lowering pass.
ClosedPublic

Authored by csigg on Aug 1 2020, 7:41 AM.

Diff Detail

Event Timeline

csigg created this revision.Aug 1 2020, 7:41 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 1 2020, 7:41 AM
csigg requested review of this revision.Aug 1 2020, 7:41 AM
csigg retitled this revision from Make gpu.launch_func rewrite pattern part of the LLVM lowering pass. to [MLIR] Make gpu.launch_func rewrite pattern part of the LLVM lowering pass..Aug 1 2020, 7:41 AM

Nice, some nits.

mlir/include/mlir/Conversion/Passes.td
84–85

nit: formatting

mlir/lib/Conversion/GPUCommon/ConvertLaunchFuncToRuntimeCalls.cpp
229

nit: formatting

290

Maybe return rewriter.notifyMatchfailure(op, "Cannot convert...")?

298–299

SymbolTable::lookupNearestSymbolFrom ?

csigg updated this revision to Diff 283558.Aug 6 2020, 3:25 AM
csigg marked 3 inline comments as done.

Rebase, apply reviewer comments.

csigg updated this revision to Diff 283559.Aug 6 2020, 3:30 AM
csigg marked an inline comment as done.

Fix.

jurahul added inline comments.Aug 6 2020, 8:26 AM
mlir/lib/Conversion/GPUCommon/ConvertLaunchFuncToRuntimeCalls.cpp
298–299

Would it make sense to make this a member function of gpu::LaunchFuncOp if this lookup is done in multiple places?

csigg added inline comments.Aug 6 2020, 11:35 AM
mlir/lib/Conversion/GPUCommon/ConvertLaunchFuncToRuntimeCalls.cpp
298–299

As far as I can tell, this is only used here.

herhut accepted this revision.Aug 10 2020, 7:50 AM
herhut added inline comments.
mlir/lib/Conversion/GPUCommon/ConvertLaunchFuncToRuntimeCalls.cpp
287–292

Maybe put this lambda in a local and give it a name?

This revision is now accepted and ready to land.Aug 10 2020, 7:50 AM
csigg updated this revision to Diff 284392.Aug 10 2020, 8:43 AM

Add isLLVMType function.

This revision was landed with ongoing or failed builds.Aug 10 2020, 10:28 AM
This revision was automatically updated to reflect the committed changes.