aboutsummaryrefslogtreecommitdiff
path: root/src/target.cpp
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2018-01-02 20:52:24 -0500
committerAndrew Kelley <superjoe30@gmail.com>2018-01-02 21:08:12 -0500
commit0ea50b3157f00ab56b2752dfa8c70edb4bce2af7 (patch)
treef93d27fecd278dec741d35d5f0f6099d9d136d07 /src/target.cpp
parentaafb83228890c07eb3f0a203010d044aaceb8f85 (diff)
downloadzig-0ea50b3157f00ab56b2752dfa8c70edb4bce2af7.tar.gz
zig-0ea50b3157f00ab56b2752dfa8c70edb4bce2af7.zip
ir: new pass iteration strategy
Before: * IR basic blocks are in arbitrary order * when doing an IR pass, when a block is encountered, code must look at all the instructions in the old basic block, determine what blocks are referenced, and queue up those old basic blocks first. * This had a bug (See #667) Now: * IR basic blocks are required to be in an order that guarantees they will be referenced by a branch, before any instructions within are referenced. ir pass1 is updated to meet this constraint. * When doing an IR pass, we iterate over old basic blocks in the order they appear. Blocks which have not been referenced are discarded. * After the pass is complete, we must iterate again to look for old basic blocks which now point to incomplete new basic blocks, due to comptime code generation. * This last part can probably be optimized - most of the time we don't need to iterate over the basic block again. closes #667
Diffstat (limited to 'src/target.cpp')
0 files changed, 0 insertions, 0 deletions