[llvm-branch-commits] [llvm] [Frontend][OpenMP] Refactor getLeafConstructs, add getCompoundConstruct (PR #87247)
Krzysztof Parzyszek via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Tue Apr 2 06:20:03 PDT 2024
https://github.com/kparzysz commented:
I have considered putting more information in the .td file, but I decided against it. The main reason was that TableGen would need to have a lot more knowledge about OMP directives than it does now:
- It would need to be aware of OpenMP's definitions of "composite" vs. "combined" directives. This information would need to be encoded in the directive emitter (as a part of TableGen), plus it would also be in the OMP.cpp file (as a part of the compiler). In my view, the .td file should be easy to update (or in other words hard to make a mistake in).
- The directive emitter is shared between OpenMP and OpenACC, and this change would mean that we need to distinguish these two targets in the emitters.
Even if there was 1000 directives to search through, the search is binary, requiring in the worst case ~10 steps.
https://github.com/llvm/llvm-project/pull/87247
More information about the llvm-branch-commits
mailing list