[clang] [OpenACC][CIR] 'cache' construct lowering (PR #146915)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 7 07:18:41 PDT 2025
================
@@ -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 {
----------------
erichkeane wrote:
> Since the loop op is an ACC specific one , should this be renamed `ActiveACCLoopRAII` or similar?
Yeah, agreed, I'll make that change. Thanks!
https://github.com/llvm/llvm-project/pull/146915
More information about the cfe-commits
mailing list