This is an archive of the discontinued LLVM Phabricator instance.

[mlir][spirv] Allow custom mangling of SPIRV built-in global variables
ClosedPublic

Authored by victor-eds on Jun 28 2023, 1:21 AM.

Details

Summary

The SPIR-V spec does not specify the mangling for these variables, so
the conversion to SPIR-V should be flexible enough to allow adding a
custom prefix and suffix to the core name.

Diff Detail

Event Timeline

victor-eds created this revision.Jun 28 2023, 1:21 AM
Herald added a reviewer: kuhar. · View Herald Transcript
Herald added a project: Restricted Project. · View Herald Transcript
victor-eds requested review of this revision.Jun 28 2023, 1:21 AM
kuhar accepted this revision.Jun 28 2023, 9:23 AM
This revision is now accepted and ready to land.Jun 28 2023, 9:23 AM
antiagainst accepted this revision.Jun 28 2023, 2:46 PM
antiagainst added inline comments.
mlir/include/mlir/Dialect/SPIRV/Transforms/SPIRVConversion.h
148

Given we are here, could you just change the default to __builtin__? var there doesn't provide much more additional value. It helps to save a few characters this way.

victor-eds edited the summary of this revision. (Show Details)

Change default prefix