[Mlir-commits] [flang] [mlir] [llvm][mlir][OpenMP] Support translation for linear clause in omp.wsloop and omp.simd (PR #139386)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Thu Jul 24 01:09:07 PDT 2025
================
@@ -1816,8 +1816,7 @@ static void genSimdClauses(
cp.processReduction(loc, clauseOps, reductionSyms);
cp.processSafelen(clauseOps);
cp.processSimdlen(clauseOps);
-
- cp.processTODO<clause::Linear>(loc, llvm::omp::Directive::OMPD_simd);
+ cp.processLinear(clauseOps);
----------------
NimishMishra wrote:
Thanks. I was relooking at the implementation while working on https://github.com/llvm/llvm-project/pull/150386. Given a linear variable, I essentially need its type to allocate similarly typed `linear-result` variable (that will have linear semantics). Is there any other way to extract the type of variables in the IRBuilder, other than casting to `AllocaInst` and then retrieving the allocated type?
That would remove the current requirement and allow our implementation to work on the test case you have provided here.
https://github.com/llvm/llvm-project/pull/139386
More information about the Mlir-commits
mailing list