This is an archive of the discontinued LLVM Phabricator instance.

[MLIR][SPIRVToLLVM] Conversion of load and store SPIR-V ops
ClosedPublic

Authored by georgemitenkov on Jul 21 2020, 6:25 AM.

Details

Summary

This patch introduces conversion pattern for spv.Store and spv.Load.
Only op with Function Storage Class is supported at the moment
because spv.GlobalVariable has not been introduced yet. If the op
has memory access attribute, then there are the following cases.
If the access is Aligned, add alignment to the op builder. Otherwise
the conversion fails as other cases are not supported yet because they
require additional attributes for llvm.store/llvm.load ops: e.g. volatile
and nontemporal.

Diff Detail

Event Timeline

georgemitenkov created this revision.Jul 21 2020, 6:25 AM

Combined conversion patterns for spv.Load and spv.Store into one templated class.

georgemitenkov retitled this revision from [MLIR][SPIRVToLLVM] Conversion of storeOp to [MLIR][SPIRVToLLVM] Conversion of load and store SPIR-V ops.Jul 22 2020, 2:06 AM
georgemitenkov edited the summary of this revision. (Show Details)
antiagainst accepted this revision.Jul 23 2020, 4:25 PM
This revision is now accepted and ready to land.Jul 23 2020, 4:25 PM
This revision was automatically updated to reflect the committed changes.