[all-commits] [llvm/llvm-project] 329879: [utils][TableGen] Handle versions on clause/direct...
Krzysztof Parzyszek via All-commits
all-commits at lists.llvm.org
Thu Jun 5 11:56:58 PDT 2025
Branch: refs/heads/users/kparzysz/spr/t08-versioned-spellings
Home: https://github.com/llvm/llvm-project
Commit: 3298791d9baeff1137fcb74f151f87b2d2196816
https://github.com/llvm/llvm-project/commit/3298791d9baeff1137fcb74f151f87b2d2196816
Author: Krzysztof Parzyszek <Krzysztof.Parzyszek at amd.com>
Date: 2025-06-05 (Thu, 05 Jun 2025)
Changed paths:
A llvm/include/llvm/Frontend/Directive/Spelling.h
M llvm/include/llvm/TableGen/DirectiveEmitter.h
M llvm/lib/Frontend/CMakeLists.txt
A llvm/lib/Frontend/Directive/CMakeLists.txt
A llvm/lib/Frontend/Directive/Spelling.cpp
M llvm/lib/Frontend/OpenACC/CMakeLists.txt
M llvm/lib/Frontend/OpenMP/CMakeLists.txt
M llvm/test/TableGen/directive1.td
M llvm/test/TableGen/directive2.td
M llvm/utils/TableGen/Basic/DirectiveEmitter.cpp
Log Message:
-----------
[utils][TableGen] Handle versions on clause/directive spellings
In "get<lang>DirectiveName(Kind, Version)", return the spelling that
corresponds to Version, and in "get<lang>DirectiveKindAndVersions(Name)"
return the pair {Kind, VersionRange}, where VersionRange contains the
minimum and the maximum versions that allow "Name" as a spelling.
This applies to clauses as well. In general it applies to classes that
have spellings (defined via TableGen class "Spelling").
Given a Kind and a Version, getting the corresponding spelling requires
a runtime search (which can fail in a general case). To avoid generating
the search function inline, a small additional component of llvm/Frontent
was added: LLVMFrontendDirective. The corresponding header file also
defines C++ classes "Spelling" and "VersionRange", which are used in
TableGen/DirectiveEmitter as well.
For background information see
https://discourse.llvm.org/t/rfc-alternative-spellings-of-openmp-directives/85507
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list