-
-
Notifications
You must be signed in to change notification settings - Fork 30.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
gh-93678: add _testinternalcapi.optimize_cfg() and test utils for compiler optimization unit tests #96007
Conversation
iritkatriel
commented
Aug 15, 2022
•
edited by bedevere-bot
Loading
edited by bedevere-bot
- Issue: Direct unit tests for compiler optimisations #93678
…est utils for compiler optimization unit tests
Python/compile.c
Outdated
for (int i = 0; i < b->b_iused; i++) { | ||
struct instr *instr = &b->b_instr[i]; | ||
struct location loc = instr->i_loc; | ||
long long arg = instr->i_oparg; |
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.
Why 64bit, not 32bit?
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.
Two lines down, instr->i_target
is a pointer, and I'm passing its address back to python as the label of the block. (It get normalised by the test harness).
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.
If it is an address, it should be uintptr_t
, and add a comment that it just an ID.
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.
With uintptr_t the test fail on the Windows x86 buildbot.
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 changed to (small) calculated block IDs, so we don't have the issue anymore.
🤖 New build scheduled with the buildbot fleet by @iritkatriel for commit ebb10bb 🤖 If you want to schedule another build, you need to add the ":hammer: test-with-buildbots" label again. |
The freebsd test failure seems unrelated and affects other PRs so I think this is ready. |
…or compiler optimization unit tests (pythonGH-96007)