| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
* Handle dependencies in the optimizer, not the tracer * Strengthen some checks to avoid relying on optimizer for correctness
There was a problem hiding this comment.
This is a really good simplification. Thanks for doing it. Just two comments.
Sorry, something went wrong.
| int delta = (int)(new_stack_pointer - current_sp); | ||
| assert(delta >= 0); | ||
| if (delta) { | ||
| /* Shift existing stack elements up */ |
There was a problem hiding this comment.
Hmm this is suspicious. How safe is this?
Sorry, something went wrong.
There was a problem hiding this comment.
I'll add a guard above that new_stack_pointer is within the limits of the array.
Sorry, something went wrong.
There was a problem hiding this comment.
Thanks
Sorry, something went wrong.
|
CI is failing because unoptimized traces can now just execute through invalidated code objects. That's intentional right? As the guard now handles those. I think you can just add @unittest.skipIf(os.getenv("PYTHON_UOPS_OPTIMIZE") == "0", "Needs uop optimizer to run.") to it and make the test pass. |
Sorry, something went wrong.
…ring tracing. (pythonGH-144948) * Handle dependencies in the optimizer, not the tracer * Strengthen some checks to avoid relying on optimizer for correctness
…ring tracing. (pythonGH-144948) * Handle dependencies in the optimizer, not the tracer * Strengthen some checks to avoid relying on optimizer for correctness
| Back | FazBrowse Home | New Git URL |
This PR adds optimizations for the new uops added in #144179 and also removes dependencies tracking from the front-end.
By splitting the optimizer stack into two parts, one for locals and one for the evaluation stack, we are able to use the stack before knowing the size of the frame. This is necessary as guards can happen after we set local or stack values, e.g in _FOR_ITER_GEN_FRAME
Also includes some small fixes to ensure that the code emitted by the front-end is stand-alone, meaning that it does not depend on watchers or the optimizer for correctness.
Also add a couple of missing invalidations for instrumentation.