mirror of
https://gitlab.com/camelot/kickc.git
synced 2024-11-27 19:50:10 +00:00
Implemented handling of default successor PHI blocks in logical or if()'s. Closes #149
This commit is contained in:
parent
ff716c0343
commit
5cf5d88228
@ -135,10 +135,6 @@ public class Pass2ConditionalAndOrRewriting extends Pass2SsaOptimization {
|
||||
// Remove any unrolling from the original conditional as only the new one leaves the loop
|
||||
conditional.setDeclaredUnroll(false);
|
||||
|
||||
ControlFlowBlock conditionalDestBlock = getGraph().getBlock(conditional.getDestination());
|
||||
if(conditionalDestBlock.hasPhiBlock()) {
|
||||
throw new RuntimeException("TODO: Fix phi-values inside the conditional destination phi-block!");
|
||||
}
|
||||
// Update the default destination PHI block to reflect the last of the conditions
|
||||
ControlFlowBlock defaultDestBlock = getGraph().getBlock(newBlock.getDefaultSuccessor());
|
||||
if(defaultDestBlock.hasPhiBlock()) {
|
||||
@ -153,6 +149,10 @@ public class Pass2ConditionalAndOrRewriting extends Pass2SsaOptimization {
|
||||
}
|
||||
}
|
||||
|
||||
ControlFlowBlock conditionalDestBlock = getGraph().getBlock(conditional.getDestination());
|
||||
if(conditionalDestBlock.hasPhiBlock()) {
|
||||
throw new RuntimeException("TODO: Fix phi-values inside the conditional destination phi-block!");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user