Skip to content

Fix OpenMP 6.0 taskgraph/target clause parsing and graph_reset payload#46

Merged
ouankou merged 1 commit into
mainfrom
fix/openmp-6-taskgraph-clause-support
Feb 27, 2026
Merged

Fix OpenMP 6.0 taskgraph/target clause parsing and graph_reset payload#46
ouankou merged 1 commit into
mainfrom
fix/openmp-6-taskgraph-clause-support

Conversation

@ouankou
Copy link
Copy Markdown
Owner

@ouankou ouankou commented Feb 27, 2026

Summary

This PR rebases the OpenMP 6.0 fixes onto the latest origin/main and addresses parser/IR root causes uncovered by OpenMP_VV 6.0 coverage.

Root Cause

OpenMP 6.0 syntax was partially parsed but not fully modeled in clause construction paths:

  • taskgraph nogroup was not accepted in taskgraph_clause.
  • graph_reset(expr) was not accepted (only bare graph_reset).
  • target ... shared(...) used in taskgraph-target cases was rejected.
  • Several OpenMP 6.0 clause kinds were not handled in OpenMPDirective::addOpenMPClause, causing null clause objects and parser instability.
  • graph_reset stringification dropped optional expression payload.

Changes

src/ompparser.yy

  • Allow optional argument form for graph_reset:
    • graph_reset
    • graph_reset(<expression>)
  • Add nogroup_clause to taskgraph_clause.
  • Add shared_clause to target_clause.

src/OpenMPIR.cpp

  • Add missing clause-kind handling in OpenMPDirective::addOpenMPClause for:
    • OMPC_graph_id
    • OMPC_graph_reset
    • OMPC_replayable
    • OMPC_memscope
  • Update OpenMPGraphResetClause::toString() to preserve optional expression payload:
    • graph_reset or graph_reset(expr) as appropriate.

Validation

Built and tested after rebasing onto latest origin/main:

cmake --build build -j$(nproc)
ctest --test-dir build --output-on-failure -j$(nproc)

Result: 1526/1526 tests passed.

Notes

This keeps behavior in the parser/IR layer (no output masking/workarounds) and aligns OpenMP 6.0 taskgraph/target clause acceptance with OpenMP_VV usage.

@ouankou
Copy link
Copy Markdown
Owner Author

ouankou commented Feb 27, 2026

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Breezy!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@ouankou ouankou merged commit cb39a35 into main Feb 27, 2026
13 checks passed
@ouankou ouankou deleted the fix/openmp-6-taskgraph-clause-support branch February 27, 2026 08:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant