Skip to content

[NFC][SYCL] Move visitors into their own class. #2081

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

Merged
merged 2 commits into from
Jul 9, 2020

Conversation

erichkeane
Copy link
Contributor

A recent patch has shown there is good reason to have access to
Sema/ASTContext when doing the visiting. This also makes it more
consistent with the other visitors in Clang.

Additionally, there was an odd bracket issue that I've fixed, seemingly
a close/open namespace got lost along the way, so the 'close' namespace
(with comment) bracket was ACTUALLY the end of the function.

A recent patch has shown there is good reason to have access to
Sema/ASTContext when doing the visiting.  This also makes it more
consistent with the other visitors in Clang.

Additionally, there was an odd bracket issue that I've fixed, seemingly
a close/open namespace got lost along the way, so the 'close' namespace
(with comment) bracket was ACTUALLY the end of the function.
@erichkeane
Copy link
Contributor Author

Note that this is a pretty simple/innocuous patch, but it IS blocking critical @rdeodhar 's patch to fix arrays. If @bader or @pvchupin can merge this as soon as it passes review/validation, it would be appreciated.

Interestingly, the clang-format on my local machine doesn't suggest
this, and apparently didn't when this code was written initially.  THe
comment layout here is SUPER weird, I'm not a huge fan of it, but if
clang format says it, *shrugs*.
Copy link
Contributor

@premanandrao premanandrao left a comment

Choose a reason for hiding this comment

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

Looks okay to me. I assume the actual use of the member SemaRef will come in a later patch.

@erichkeane
Copy link
Contributor Author

Looks okay to me. I assume the actual use of the member SemaRef will come in a later patch.

Yep, it will. In order to properly canonicalize an array type you need access to ASTContext (in SemaRef). I presume we'll also see other uses for Sema in the visitors in the future.

@bader bader merged commit 07926eb into intel:sycl Jul 9, 2020
@bader
Copy link
Contributor

bader commented Jul 9, 2020

FYI. CI check uses clang-format-9, which seems to be the most recent version available on Ubuntu 18.04 from standard repo.

@erichkeane
Copy link
Contributor Author

FYI. CI check uses clang-format-9, which seems to be the most recent version available on Ubuntu 18.04 from standard repo.

Mine was apparently quite old (3.8 release!), so perhaps that is it. I've updated mine to 11, so hopefully I won't have this problem again :)

@bader
Copy link
Contributor

bader commented Jul 9, 2020

AFAIK, there were some inconsistencies in formatting between the version built from sycl branch (should be close to 11) and 9.
I can try to get 10 by adding llvm repo as suggested here: https://apt.llvm.org/.

Chenyang-L pushed a commit that referenced this pull request Feb 18, 2025
This expands our CI to test the loader; the dispatcher that is
used when multiple adapters are availabe.

The old "run on hardware" jobs should behave the same (they have
the loader tests disabled), but there are new "combined" jobs
with OpenCL/Level Zero + Native CPU.

Closes: #2081
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.

5 participants