[PATCH] D106896: [flang][OpenMP] Add parsing support for nontemporal clause.
Valentin Clement via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 27 12:54:58 PDT 2021
clementval requested changes to this revision.
clementval added inline comments.
This revision now requires changes to proceed.
================
Comment at: flang/include/flang/Parser/dump-parse-tree.h:503
NODE(parser, OmpMapType)
+ NODE(parser, OmpNontemporalClause)
NODE(OmpMapType, Always)
----------------
Non necessary with update to `OMP.td`
================
Comment at: flang/include/flang/Parser/parse-tree.h:3380
+// nontemporal-clause -> NONTEMPORAL (variable-name-list)
+struct OmpNontemporalClause {
+ TUPLE_CLASS_BOILERPLATE(OmpNontemporalClause);
----------------
Non necessary with update to `OMP.td`
================
Comment at: flang/lib/Parser/unparse.cpp:1993
}
+ void Unparse(const OmpNontemporalClause &x) {
+ Walk(std::get<std::list<Name>>(x.t), ",");
----------------
If you update the `OMP.td` as mentioned below, the unpausing will be done automatically.
================
Comment at: flang/lib/Semantics/check-omp-structure.cpp:1428
}
+void OmpStructureChecker::Enter(const parser::OmpClause::Nontemporal &x) {
+ CheckAllowed(llvm::omp::Clause::OMPC_nontemporal);
----------------
Why removing the `CHECK_SIMPLE_CLAUSE` that is doing this already?
================
Comment at: llvm/include/llvm/Frontend/OpenMP/OMP.td:264
let clangClass = "OMPNontemporalClause";
+ let flangClass = "OmpNontemporalClause";
}
----------------
You should be able to avoid a specific node by using this:
```
let flangClass = "Name";
let isValueList = true;
```
`is_device_ptr`, `uniform` and `use_device_ptr` are using this already.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D106896/new/
https://reviews.llvm.org/D106896
More information about the llvm-commits
mailing list