================
@@ -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
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
  • [clang] [... Erich Keane via cfe-commits
    • [cla... via cfe-commits
    • [cla... via cfe-commits
    • [cla... Bruno Cardoso Lopes via cfe-commits
    • [cla... Bruno Cardoso Lopes via cfe-commits
    • [cla... Bruno Cardoso Lopes via cfe-commits
    • [cla... Bruno Cardoso Lopes via cfe-commits
    • [cla... Valentin Clement バレンタイン クレメン via cfe-commits
    • [cla... Erich Keane via cfe-commits
    • [cla... Erich Keane via cfe-commits
    • [cla... Erich Keane via cfe-commits
    • [cla... Erich Keane via cfe-commits
    • [cla... LLVM Continuous Integration via cfe-commits

Reply via email to