[clang] [llvm] [OpenMP] OpenMP 5.1 "assume" directive parsing support (PR #92731)
Julian Brown via cfe-commits
cfe-commits at lists.llvm.org
Thu Jun 27 02:58:52 PDT 2024
jtb20 wrote:
> > > don't you need more code in AST?
> >
> >
> > Sorry, I don't quite understand the question! Could you elaborate a little please?
>
> I was thinking maybe you need changes in AST related files, like `ASTWriter.cpp`, but that might be not needed as this is adding a new directive.
At the moment, since the "assume" directive is parsed but then immediately discarded, I don't think anything else is needed.
Actually the existing "assumes" support is reused -- the bit in SemaOpenMP.cpp adds the "assume" assumptions to the OMPAssumeScoped "stack". For "assumes", it's done like that so (e.g. top-level) declarations between begin/end "assumes" can be modified according to the assumptions on that stack. For "assume", once some use is made for the assumptions, that might turn out to not be the most useful representation. That can be revisited later though, I think.
https://github.com/llvm/llvm-project/pull/92731
More information about the cfe-commits
mailing list