[PATCH] D93576: [openacc] Use TableGen enum for default clause value

Valentin Clement via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 22 06:55:18 PST 2020


clementval added inline comments.


================
Comment at: llvm/include/llvm/Frontend/OpenACC/ACC.td:84
+def ACC_Default_none : ClauseVal<"none", 1, 0> { let isDefault = 1; }
+def ACC_Default_present : ClauseVal<"present", 0, 0> {}
+
----------------
sameeranjoshi wrote:
> Trying to understand - 
> `class ClauseVal<string n, int v, bit uv>` mentions second parameter (`i.e v`)as value of clause.
> 
> Is there are reason to start the numbering from `0`?
> In `OMP.td` as well I see they always start with index `2`, any defined pattern used here?
> 
The enum in `OMP.td` starts at 2 to follow the one already defined for Clang here: `llvm/include/llvm/Frontend/OpenMP/OMPKinds.def` In the long term the `OMPKinds.def` file is supposed to go away gradually. 

This is my guess but @kiranchandramohan can confirm since he introduced those change for OpenMP. 


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D93576/new/

https://reviews.llvm.org/D93576



More information about the llvm-commits mailing list