[clang] [CIR][OpenMP] Enable lowering of the OpenMP dialect to LLVM IR (PR #178515)
Jan Leyonberg via cfe-commits
cfe-commits at lists.llvm.org
Fri Jan 30 07:58:57 PST 2026
================
@@ -149,9 +149,7 @@ void CIRGenerator::HandleTagDeclDefinition(TagDecl *d) {
// inline initializers as definitions.
if (astContext->getTargetInfo().getCXXABI().isMicrosoft())
cgm->errorNYI(d->getSourceRange(), "HandleTagDeclDefinition: MSABI");
- // For OpenMP emit declare reduction functions, if required.
- if (astContext->getLangOpts().OpenMP)
- cgm->errorNYI(d->getSourceRange(), "HandleTagDeclDefinition: OpenMP");
+ // TODO(OMP): For OpenMP emit declare reduction functions, if required.
----------------
jsjodin wrote:
I took a look at this function in the old clang generation, which this is essentially a copy of. I took the specific cases for OpenMP from ModuleBuilder.cpp:HandleTagDeclDefinition() and added errorNYI calls for those here.
I cannot write a test since using declare target gives this error first:
main.c:3:39: error: ClangIR code gen Not Yet Implemented: OpenMP
OMPDeclareReduction
3 | #pragma omp declare reduction (mysum: int : omp_out = omp_out + omp_in)
|
This should reflect what is not yet implemented correctly at least.
https://github.com/llvm/llvm-project/pull/178515
More information about the cfe-commits
mailing list