OSDN Git Service

Skip BBs without SSA representation in the Constant Propagation phase
authorAlexei Zavjalov <alexei.zavjalov@intel.com>
Mon, 21 Apr 2014 13:45:24 +0000 (20:45 +0700)
committerAlexei Zavjalov <alexei.zavjalov@intel.com>
Mon, 21 Apr 2014 13:45:24 +0000 (20:45 +0700)
commit9d894662426e413454935e483d56a8cc33924174
tree6ae3c812e6a56401fb98a074f77f27f4bc7ba13e
parent86e1b5e7e2bca99dd2092eab8ced977d97830873
Skip BBs without SSA representation in the Constant Propagation phase

In some cases the constant propagation optimization may get the MIR graph
where some of the BBs have no predecessors and do not transformed to the
SSA form. If such BB has operations on constants this may lead to segfault.
This patch adds the condition that will pass the only BBs with SSA.

Change-Id: I816d46b2492c5bd4748f983c3725b4798f9ebd68
Signed-off-by: Alexei Zavjalov <alexei.zavjalov@intel.com>
compiler/dex/mir_optimization.cc
test/083-compiler-regressions/expected.txt
test/083-compiler-regressions/src/Main.java