OSDN Git Service

Add CFG and SSA form checkers in the optimizing compiler.
authorRoland Levillain <rpl@google.com>
Tue, 16 Sep 2014 13:48:16 +0000 (14:48 +0100)
committerRoland Levillain <rpl@google.com>
Wed, 17 Sep 2014 17:19:46 +0000 (18:19 +0100)
commitccc07a9579c554443cd03a306ca9b4f943fd2a93
tree3514cb48520ecd6cf4bb93129bed5cd97f24cb43
parent926d8e99aa69151a271180299df68963688010d8
Add CFG and SSA form checkers in the optimizing compiler.

Checks performed on control-flow graphs:
- Ensure that the predecessors and successors of a basic block are
  consistent within a control-flow graph.
- Ensure basic blocks end with a branch instruction.
- Detect phi functions listed in non-phi instruction lists and vice
  versa.
- Ensure a block's instructions (and phi functions) are associated
  with this very block.

Checks performed on SSA form graphs:
- Ensure an instruction dominates all its uses.
- Ensure there are no critical edges.

Change-Id: I1c12b4a61ecf608682152c897980ababa7eca847
build/Android.gtest.mk
compiler/Android.mk
compiler/optimizing/graph_checker.cc [new file with mode: 0644]
compiler/optimizing/graph_checker.h [new file with mode: 0644]
compiler/optimizing/graph_checker_test.cc [new file with mode: 0644]
compiler/optimizing/nodes.cc
compiler/optimizing/nodes.h
compiler/optimizing/optimizing_unit_test.h