-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Fix invalid LLVM IR in join builtin #2296
Fix invalid LLVM IR in join builtin #2296
Conversation
447b36c
to
a5870b7
Compare
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.
Awesome! CI now has tests for LLVM 14 where the join
tests (and one other test) are disabled. Could you please enable them and make sure that they pass?
I see, didn't know that, I'll add that to the commit to test that properly :) |
a5870b7
to
a020b15
Compare
.github/workflows/ci.yml
Outdated
@@ -114,7 +114,7 @@ jobs: | |||
TYPE: Release | |||
LLVM_VERSION: 14 | |||
RUN_ALL_TESTS: 1 | |||
RUNTIME_TEST_DISABLE: probe.kprobe_offset_fail_size,call.join,call.join_delim,intptrcast.Casting ints,json-output.join_delim,variable.32-bit tracepoint arg | |||
RUNTIME_TEST_DISABLE: probe.kprobe_offset_fail_size,intptrcast.Casting ints,json-output.join_delim,variable.32-bit tracepoint arg |
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.
Also intptrcast.Casting ints,json-output.join_delim,variable.32-bit tracepoint arg
are newly failing on LLVM 14.
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'll try to remove these, too, to see if they work now.
a020b15
to
a633f84
Compare
Add pointer casts to store instruction where required and use GEP instructions to do pointer arithmetic instead of incorrect use of add instruction. Fixes bpftrace#2222
a633f84
to
21eb463
Compare
Unrelated tests ( |
Could these be caused by an issue similar to this one? |
It's highly probable, |
Any chance you'd be able to fix it as a part of this PR? |
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.
Looks good!
Lets get this merged asap. For future work it would be nice to: have a codegen test that covers this, that way the llvm-as check will find issues like these. ALthough if we managed to just validate everything the codegen test becomes useless anyway. I wonder if the code becomes better if we convert the current monster into a
If instead we had:
we could just use geps in a logical way to access elements instead of all the inline pointer casts. But thats all for future work :) |
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 agree, let's merge this.
Add pointer casts to store instruction where required and use GEP
instructions to do pointer arithmetic instead of incorrect use of
add instruction.
Fixes #2222
Checklist
man/adoc/bpftrace.adoc
and if needed indocs/reference_guide.md
CHANGELOG.md