-
Notifications
You must be signed in to change notification settings - Fork 199
[LLVM] Fix compat with upstream LLVM #1003
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
Conversation
hm.. not really. We'd need to look at the IR it's actually generating. Maybe it's related to opaque pointers or something like that. |
nvc++ is also failing. |
Re SSCP failing with LLVM 17: one assert is triggered upon setting the dummy int value as content: https://github.com/OpenSYCL/OpenSYCL/blob/7cff8d4b8ca5d818d67b6fc6a23b9f14b1302e01/src/compiler/sscp/TargetSeparationPass.cpp#L260 --- a/src/compiler/sscp/TargetSeparationPass.cpp
+++ b/src/compiler/sscp/TargetSeparationPass.cpp
@@ -257,7 +257,7 @@ std::unique_ptr<llvm::Module> generateDeviceIR(llvm::Module &M,
// SscpIsHostIdentifier can also be used in device code.
S1IRConstantReplacer DeviceSideReplacer{
{{SscpIsHostIdentifier, 0}, {SscpIsDeviceIdentifier, 1}},
- {{SscpHcfContentIdentifier, 0 /* Dummy value */}, {SscpHcfObjectSizeIdentifier, 0}},
+ {{SscpHcfObjectSizeIdentifier, 0}},
{{SscpHcfContentIdentifier, std::string{}}}};
DeviceSideReplacer.run(*DeviceModule, DeviceMAM); S2 failure, this branch: An assertion is triggered, since the GV S2 failure after applying #1020 to this branch:
Thx HIP ^^ |
Thanks for digging into this... We should probably explicitly cast the |
well, |
Yes, the initialization with 0 is clearly wrong, and probably an oversight since it's followed by initalization with empty string. EDIT: The different arguments of the replacer are differently typed, so the arguments should already correctly take into account the difference between int and uint64 arguments. |
This commit: |
This fixes a few API / header incompatibilitíes introduced in upstream LLVM.
However, building the tests targeting SSCP is currently still crashing the compiler:
https://github.com/fodinabor/hipSYCL-LLVM-upstream-ci/actions/runs/4618580379/jobs/8166214068#step:11:46
Didn't investigate that too much.
Maybe @illuhad has an intuition about what might go wrong there?
#1000