Implemented conversion for spv.BitReverse and spv.BitCount. Since ODS generates builders in a different way for LLVM dialect intrinsics, I added attributes to build method in DirectConversionPattern class. The tests for these ops are in bitwise-ops-to-llvm.mlir.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
mlir/lib/Conversion/SPIRVToLLVM/ConvertSPIRVToLLVM.cpp | ||
---|---|---|
76 | Should we rather preserve the attributes of the original operation, operation.getAttrs() ? I think it is good practice in general. |
Comment Actions
- [MLIR][SPIRVToLLVM] Preserved op attributes in Direct Conversion pattern
Included operation.getAttrs() instead of ArrayRef<NamedAttribute>() in order to preserve the attributes of ops.
Comment Actions
- [MLIR][SPIRVToLLVM] Conversion for bitrverse and bitcount ops
- [MLIR][SPIRVToLLVM] Preserved op attributes in Direct Conversion pattern
Rebased against master to pick up other changes.
Comment Actions
Hey @georgemitenkov, could you rebase this against master branch so I can land this? Thanks!
Comment Actions
- [MLIR][SPIRVToLLVM] Conversion for bitrverse and bitcount ops
- [MLIR][SPIRVToLLVM] Preserved op attributes in Direct Conversion pattern
Rebased against master to add new changes.
Should we rather preserve the attributes of the original operation, operation.getAttrs() ? I think it is good practice in general.