Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new keyword spellings with cilk_ instead of _Cilk_ #308

Open
wants to merge 1 commit into
base: dev/19.x
Choose a base branch
from

Conversation

VoxSciurorum
Copy link
Contributor

When -fopencilk is used cilk_spawn, cilk_sync, cilk_for, cilk_reducer, and cilk_scope become keywords. The spellings prefixed with _Cilk are unaffected. They remain keywords in all compilation modes. They will not generate parallel code if Tapir is not enabled.

@VoxSciurorum VoxSciurorum requested a review from neboat January 14, 2025 15:48
Copy link
Collaborator

@neboat neboat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes seem to be working well. I was able to remove #include <cilk/cilk.h> from several Cilk codes and observe that they still compile and run with these changes. In addition, without #include <cilk/cilk.h>, once I install my VSCode extension to recognize the syntax-highlight the Cilk keywords (https://github.com/neboat/vscode-opencilk), VSCode recognizes and colors the Cilk keywords just like other control-flow keywords, as in this example:
image

The cilk_reducer keyword isn't properly recognized, however, as in this example:
image
I think there are some places in clang that recognize the _Hyperobject keyword but not cilk_reducer. I suspect that adding cilk_reducer in those places should resolve the issue.

Add cilk_reducer as alternative spelling of _Hyperobject.
@VoxSciurorum VoxSciurorum changed the base branch from dev/18.x to dev/19.x January 17, 2025 15:38
@VoxSciurorum
Copy link
Contributor Author

The cilk_reducer problem should be fixed now.

I also switched the base branch to dev/19.x.

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.

2 participants