ITADN

Fix outofssa algorithm: lost update in insert_parallel_copy and insructions after conditional jmp

#1521Pull RequestExplosiontime202 创建于 2026-03-14
I have noticed that for certain larger IRCFGs the `UnSSADiGraph` produced an invalid output. This is caused by `insert_parallel_copyin certain constellations as it would add parallel copies to the end of a `IRBlock` in one loop iteration and then in a later one add parallel copies to the start of the same `IRBlock`. But as the iteration is over the `IRBlock`s itself, the first update was lost. Secondly, I noticed that the code produces the following sequence of instructions at the end of a basic block: ``` IRDst = A?(loc_1, loc_2) C = D ``` As i would interpret the IRDst assignment as a jump, this seems not correct. Please correct me there if the semantics of the `IRDst` assignments differ from my assumptions. As mentioned in the paper this algorithm stems from, if we need to insert parallel copies before the conditional jump instructions, we need to check for interference with the condition computation. As for a quick fix, this is currently done with an `assert`, which is less than ideal. But I don't know how to implement that interference check into the given algorithm.
合并状态:未合并 1 条评论