-
Notifications
You must be signed in to change notification settings - Fork 788
[SYCL] no more ast visitor usage for variable type checks. #1513
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
bader
merged 5 commits into
intel:sycl
from
cperkinsintel:cperkins-reduce-ast-visitor-usage
Apr 15, 2020
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
62b088a
moved VLA test, updated lit tests
cperkinsintel 0a78215
removing CheckSYCLType and calls to it. Several AST Visitor methods r…
cperkinsintel 5681620
clang-formattery
cperkinsintel cba85e5
added some markers so the crazy nested notes get tidied up, at least …
cperkinsintel 75c6efd
clang formatation
cperkinsintel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What are the two errors here? How'd we get the extra one? I'd like to understand how this happens.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a theory .
Everything else in the
isa_B
function context has double the number of expectation values than you would expect. I think this is because the calling hierarchy looks like this:main -> kernel -> usage -> kernel -> isa_B -> restriction
Note that there is a kernel inside the
usage
function, which is called from a different kernel.The change in this PR moves the diagnostics for VLA to be a Deferred Diagnostic, like most of the others. The Deferred Diagnostics walk the final produced kernel looking to see if there were any warnings deferred earlier for that thing, and then they emit.
So my theory is the the old system, using the AST Visitor, only visited it once (and then issued an immediate diagnostic). But with this change ,the deferred diagnostic system essentially visits it twice, because of the nested kernels.
I did a quick test and move that call to
restriction()
up a level tousage()
, and now it fires just once, not twice.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can make that change to the sycl-restrict, to make it clearer. I do not know why there are nested kernels for these tests. Let me know if you would like a change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, I just want to make sure its still an appropriate amount. sycl-restrict is criminally oversized unfortunately, so understanding this stuff is annoying. If there is a simplification that you can makes it clearer, I would be appreciative.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I there any reason for having nested kernels in these tests? Or is it just an artifact of this files history?
I'd be happy to get rid of the kernel nesting which would tidy things up a bit. But I don't want to undo anything important.
Otherwise, I can simply move the testing of the VLA . My own inclination is to get rid of the nested kernels entirely.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry to be dense. Like this?
Is there another way of using the "@" syntax so it's not absolute line numbers? I have used the relative "@+1" to put these immediately before a line, but in the case we are discussing, the caller we are mentioning is far away. This approach seems like it'll just break the minute someone edits the file.
Is this -verify expectation system documented anywhere? I've searched, but the llvm-lit docs don't talk about this part. Are there other ways of using the "@" in the expectation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See https://clang.llvm.org/doxygen/classclang_1_1VerifyDiagnosticConsumer.html
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks. A veritable rosetta stone, that. Do you have the decipher key for Linear A as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Negative ghostrider.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I have pushed added markers and moved the notes into reasonable places for the VLA test, which is the one test this PR touches.
I would like to just go ahead and finish that and move all the stray note expectations in sycl-restrict.cpp and put them close to their caller. Is that ok to do in this PR? Or should I open a different one for that?