Repository navigation
Fix outofssa algorithm: lost update in insert_parallel_copy and insructions after conditional jmp - #1521
Fix outofssa algorithm: lost update in insert_parallel_copy and insructions after conditional jmp#1521Explosiontime202 wants to merge 3 commits into
Conversation
|
Hi @Explosiontime202 ! The assignment of IRDst is here "only an assignment". Here are the rules:
So you can have other assignments later in the irblock: this is legit. For the first point, have you a little example to show the faulty behavior? |
|
Thanks for your quick answer :) Regarding an example: I have an example which triggers this, but it is quite lengthy. I put it below, but I am now sure, how it is helpful to you. The difference in the example is in here is also a diff between the |
cf87cc9 to
7843f5b
Compare
I have noticed that for certain larger IRCFGs the
UnSSADiGraphproduced an invalid output. This is caused byinsert_parallel_copyin certain constellations as it would add parallel copies to the end of aIRBlockin one loop iteration and then in a later one add parallel copies to the start of the sameIRBlock. But as the iteration is over theIRBlocks 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:
As i would interpret the IRDst assignment as a jump, this seems not correct. Please correct me there if the semantics of the
IRDstassignments 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.