Skip to content

Commit

Permalink
change postorder blocks back
Browse files Browse the repository at this point in the history
  • Loading branch information
wangzun66 committed Nov 5, 2024
1 parent dadb0af commit b3d8250
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,15 @@

import java.util.Collections;
import java.util.List;
import java.util.stream.Collectors;
import javax.annotation.Nonnull;

public enum BlockAnalysisDirection {
POSTORDERBACKWARD {
@Override
@Nonnull
List<BasicBlock<?>> getPredecessors(BasicBlock<?> block) {
List<BasicBlock<?>> esuccs =
block.getExceptionalSuccessors().values().stream().collect(Collectors.toList());
List<BasicBlock<?>> succs = (List<BasicBlock<?>>) block.getSuccessors();
succs.addAll(esuccs);
return succs;
// todo: Blocks in PostOrderBackward contain no exceptional blocks!!
return (List<BasicBlock<?>>) block.getSuccessors();
}

@Nonnull
Expand Down

0 comments on commit b3d8250

Please sign in to comment.