================ @@ -1204,7 +1204,41 @@ class CIRGenFunction : public CIRGenTypeCache { void updateLoopOpParallelism(mlir::acc::LoopOp &op, bool isOrphan, OpenACCDirectiveKind dk); + // The OpenACC 'cache' construct actually applies to the 'loop' if present. So + // keep track of the 'loop' so that we can add the cache vars to it correctly. + mlir::acc::LoopOp *activeLoopOp = nullptr; + + struct ActiveLoopRAII { ---------------- bcardosolopes wrote:
Since the loop op is an ACC specific one , should this be renamed `ActiveACCLoopRAII` or similar? https://github.com/llvm/llvm-project/pull/146915 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits