mirror of
https://github.com/konsoletyper/teavm.git
synced 2024-12-09 02:00:25 +08:00
Fix bug in LoopInversion
This commit is contained in:
parent
920a17ff63
commit
3ac7bd1c68
@ -359,6 +359,9 @@ class LoopInversionImpl {
|
||||
|
||||
for (int node = 0; node < cfg.size(); ++node) {
|
||||
BasicBlock block = program.basicBlockAt(node);
|
||||
if (copiedNodes.containsKey(block.getIndex())) {
|
||||
continue;
|
||||
}
|
||||
for (Phi phi : block.getPhis()) {
|
||||
for (Incoming incoming : phi.getIncomings().toArray(new Incoming[0])) {
|
||||
int source = incoming.getSource().getIndex();
|
||||
|
@ -737,6 +737,7 @@ public class TeaVM implements TeaVMHost, ServiceRepository {
|
||||
|
||||
private List<MethodOptimization> getOptimizations() {
|
||||
return Arrays.asList(
|
||||
new RedundantJumpElimination(),
|
||||
new ArrayUnwrapMotion(),
|
||||
new LoopInversion(),
|
||||
new LoopInvariantMotion(),
|
||||
|
Loading…
Reference in New Issue
Block a user