[llvm-branch-commits] [flang] [flang][OpenMP] Move clause/object conversion to happen early, in genOMP (PR #87086)
Sergio Afonso via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Tue Apr 2 04:08:24 PDT 2024
================
@@ -49,9 +49,8 @@ class ClauseProcessor {
public:
ClauseProcessor(Fortran::lower::AbstractConverter &converter,
Fortran::semantics::SemanticsContext &semaCtx,
- const Fortran::parser::OmpClauseList &clauses)
- : converter(converter), semaCtx(semaCtx),
- clauses(makeClauses(clauses, semaCtx)) {}
+ const List<Clause> &clauses)
+ : converter(converter), semaCtx(semaCtx), clauses(clauses) {}
----------------
skatrak wrote:
Could we make the `clauses` field an `ArrayRef<Clause>`? In the regular use pattern of this class the clause list of the caller does not go out of scope before the `ClauseProcessor` instance does. Maybe we can document this and avoid creating a local copy.
In any case this is a discussion to consider creating another patch for, not something to be addressed here.
https://github.com/llvm/llvm-project/pull/87086
More information about the llvm-branch-commits
mailing list