-
Notifications
You must be signed in to change notification settings - Fork 751
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
[NFC][OpaquePtrs] Update SYCLLowerIR tests to use opaque pointers #10687
Conversation
Current failures: LLVM :: SYCLLowerIR/CompileTimePropertiesPass/sycl-properties-alignment-loadstore.ll LLVM :: SYCLLowerIR/ESIMD/global.ll opt: /iusers/lujohn/src/SYCLOS/llvm/llvm/include/llvm/IR/Type.h:425: llvm::Type* llvm::Type::getNonOpaquePointerElementType() const: Assertion `NumContainedTys && "Attempting to get element type of opaque pointer"' failed. |
Hi @LU-JOHN The llorg community has removed all uses of getNonOpaquePointerElementType and deprecated it. There are two issues I see:
Thanks |
@asudarsa Hey, the only match I found was LowerESIMDVecArg. This pass actually is never run if opaque pointers are on, you can see that here. So I don't think there's any work to do. We can just delete the pass whenever we pull down the change removing |
Ah. Interesting, Thanks so much @sarnex. I wonder why @LU-JOHN is seeing the call to this function in his stack trace above. One thing I noted, the checking condition in the code you pointed to, it has a call to supportsTypedPointers which is also deprecated. We might need a cleanup of sycl-post-link I suppose. Thanks |
Wouldn't you get a compilation error if method declaration is removed before all uses? |
I meant as part of the pulldown. We can also remove it whenever we enable opaque pointers by default in this repo. |
Let's remove the pass right after #9828 to make the process easier for the folks doing pulldown. Most likely they are not ESIMD experts and don't know if pass can be removed or not. |
@bader Sure just ping me when it gets merged. |
Thanks @bader. I agree. I think changes might be required across the board here. Here, we have noticed ESIMD lowering and sycl-post-link. Think there will be lot more. All components (SYCL related) might need to respond to this? Thanks |
I see the crash when invoking the opt tool, not sycl-post-link: /SYCLOS/llvm/build/bin/opt < SYCLOS/llvm/llvm/test/SYCLLowerIR/ESIMD/global.ll -passes=LowerESIMD,ESIMDLowerVecArg -S ESIMDLowerVecArg pass is initialized with opt.cpp:462 initializeESIMDLowerVecArgLegacyPassPass(Registry); The crash occurs in line 714:
|
SYCLLowerIR/CompileTimePropertiesPass/sycl-properties-alignment-loadstore.ll does not fail before this PR. Mistaken conclusion is due to a stale build of opt in my build area. Edits/pulls to opt.cpp do not trigger a rebuild. sycl-properties-alignment-loadstore.ll fails with the changes in this PR. Larger alignments expected by this testcase are not generated. |
@LU-JOHN Sorry, just to be super clear, would you like me to investigate the ESIMDLowerVecArg issue? Happy to do it, just not sure if needed. |
@broxigarchen Can you look at the changes in sycl-properties-alignment-loadstore.ll ? This PR changes:
to:
The CHECK no longer passes in this PR. Is the CHECK still valid? |
@LU-JOHN Sure, I just took a look and sorry, I should have been able to figure out the problem without actually debugging it lol. The problem is we are running the pass directly, whereas when actually called from a real compiler run the pass won't get run if opaque pointers are disabled. So I think the correct fix is to let all tests calling this pass directly to use typed pointers for now and then just delete the tests and the pass when we enable opaque pointers by default. There was already some talk of deleting the pass in the PR to enable opaqye pointers by default. |
Signed-off-by: Lu, John <[email protected]>
…s pass requires typed pointers. Signed-off-by: Lu, John <[email protected]>
Signed-off-by: Lu, John <[email protected]>
PR to remove LowerESIMDVecArg #10738, still a draft but will publish once tests pass |
… preserved after opaquification. Signed-off-by: Lu, John <[email protected]>
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.
esimd test changes lgtm, i didn't review any tools files
@bader ah thanks for requesting review explicitly from tools, i'll do that in the future, i didn't think of doing that |
Hi. This PR should fix the issue |
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.
LGTM
@intel/llvm-gatekeepers Can this one be merged? Here is a comment from @LU-JOHN: It has two approvals, and it has a disabled test that exposed a bug in handling compileTimeProperty alignment with opaque pointers. This bug is fixed in PR 10748, but PR 10748 should enable the disabled test. (i.e. PR 10748 is waiting for 10687 to be merged). |
Update SYCLLowerIR tests to use opaque pointers.