gh-93678: add _testinternalcapi.optimize_cfg() and test utils for compiler optimization unit tests#96007
Conversation
…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.
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.
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.
With uintptr_t the test fail on the Windows x86 buildbot.
There was a problem hiding this comment.
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)
Uh oh!
There was an error while loading. Please reload this page.