瀏覽代碼

Fix a bug in check-local-exists elision

jonathanvdc 8 年之前
父節點
當前提交
3f36859158
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      kernel/modelverse_jit/cfg_optimization.py

+ 1 - 0
kernel/modelverse_jit/cfg_optimization.py

@@ -132,6 +132,7 @@ def elide_local_checks(entry_point):
                 if dominator_tree.dominates_instruction(local_def, check):
                 if dominator_tree.dominates_instruction(local_def, check):
                     # Check is dominated by a definition. Replace it by a 'True' literal.
                     # Check is dominated by a definition. Replace it by a 'True' literal.
                     check.redefine(cfg_ir.Literal(True))
                     check.redefine(cfg_ir.Literal(True))
+                    is_reachable = True
                     break
                     break
                 elif check.block in reachable_blocks[local_def.block]:
                 elif check.block in reachable_blocks[local_def.block]:
                     is_reachable = True
                     is_reachable = True