[issue39151] Simplify the deep-first-search of the assembler

2020-06-27 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset 60eb9f1ab59a59ddf81d3da3513cfa3251169b5c by Pablo Galindo in branch 'master': bpo-39151: Simplify DFS in the assembler (GH-17733) https://github.com/python/cpython/commit/60eb9f1ab59a59ddf81d3da3513cfa3251169b5c --

[issue39151] Simplify the deep-first-search of the assembler

2020-06-27 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue39151] Simplify the deep-first-search of the assembler

2019-12-29 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: > The code that orders blocks for output should not make assumptions about the > shape of the CFG, IMO. I very much agree with this but notice that technically this function is doing it already if I am not mistaken. Following the b_next pointers in th

[issue39151] Simplify the deep-first-search of the assembler

2019-12-29 Thread Mark Shannon
Mark Shannon added the comment: This seems correct, but your change assumes that there is no optimisation pass that reorders the blocks. While the is currently true, it might not be in future. The code that orders blocks for output should not make assumptions about the shape of the CFG, IMO.

[issue39151] Simplify the deep-first-search of the assembler

2019-12-28 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- keywords: +patch pull_requests: +17178 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17733 ___ Python tracker __

[issue39151] Simplify the deep-first-search of the assembler

2019-12-28 Thread Pablo Galindo Salgado
New submission from Pablo Galindo Salgado : I was recently checking the code of the assembler and when looking in detail at the dfs() function I was surprised by this code: static void dfs(struct compiler *c, basicblock *b, struct assembler *a, int end) { while (j < end) { b