Skip to content

Refactor OpenACC clause parsing/unparsing#10

Merged
ouankou merged 1 commit into
mainfrom
feat/accept-clause-commas
Nov 22, 2025
Merged

Refactor OpenACC clause parsing/unparsing#10
ouankou merged 1 commit into
mainfrom
feat/accept-clause-commas

Conversation

@ouankou
Copy link
Copy Markdown
Owner

@ouankou ouankou commented Nov 22, 2025

Summary

  • Refactor clause parsing/IR to eliminate raw-string payloads: var-lists, async/default_async, device/device_num/num_gangs/num_workers/collapse/tile, gang/wait/bind/routine, data-like clauses, reductions, self, cache, etc. now carry structured fields/enums in OpenACCKinds.h and AST rather than opaque strings; clause merging for self disabled.
  • Clean up unparsing: generatePragmaString joins clauses without trim hacks; expression/var-list formatting avoids trailing comma trims; reduction emits reduction(op : vars); routine/gang/wait/bind/copy* formatting normalized; removed after-the-fact spacing/comma hacks.
  • Testing: test_single_pragma.sh enforces roundtrip comparisons; preprocess keeps inputs intact; lexer now accepts comma-separated clauses via CLAUSE_COMMA so users need no preprocessing; canonical output remains space-separated. All ctests (including openacc_vv roundtrip) passing.

Testing

  • cmake --build build
  • ctest --output-on-failure

@ouankou ouankou changed the title Handle comma clause separators in OpenACC parser Refactor OpenACC clause parsing/unparsing Nov 22, 2025
@ouankou ouankou merged commit b37a0aa into main Nov 22, 2025
11 checks passed
@ouankou ouankou deleted the feat/accept-clause-commas branch November 22, 2025 03:04
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