[Mlir-commits] [mlir] [mlir][Math][LLVMSPV] Add Math to LLVM-SPV conversion pass (PR #198370)
Mehdi Amini
llvmlistbot at llvm.org
Fri May 29 02:25:15 PDT 2026
================
@@ -119,6 +123,74 @@ struct ConvertNativeFuncPattern final : public OpConversionPattern<Op> {
const StringRef nativeFunc;
};
+template <typename OpTy>
+static void populateOCLExtSetOpPatterns(const LLVMTypeConverter &converter,
+ RewritePatternSet &patterns,
+ PatternBenefit benefit,
+ StringRef opName) {
+ std::string mangledName =
+ "_Z" + std::to_string(12 + opName.size()) + "__spirv_ocl_" + opName.str();
----------------
joker-eph wrote:
```suggestion
std::string prefix = "__spirv_ocl_";
std::string mangledName =
"_Z" + std::to_string(prefix.size() + opName.size()) + prefix + opName.str();
```
Just a nit to avoid "magic numbers"
https://github.com/llvm/llvm-project/pull/198370
More information about the Mlir-commits
mailing list