OSDN Git Service

ART: Fix overlapping instruction IDs in inliner
authorDavid Brazdil <dbrazdil@google.com>
Mon, 29 Feb 2016 16:53:33 +0000 (16:53 +0000)
committerDavid Brazdil <dbrazdil@google.com>
Tue, 1 Mar 2016 22:54:29 +0000 (22:54 +0000)
commit3f52306b259caed1c654c4b3fd5b594d5ec8d46c
tree8a94e537ee9c17ce8591e1775fb232ee1af09425
parent757701fc80dfe35ff9677c858b3d85e946e1ae36
ART: Fix overlapping instruction IDs in inliner

Inliner creates the inner graph so that it generates instruction IDs
higher than the outer graph. This was broken because the inliner
would create instructions in the outer graph before the inner graph
is inlined.

The bug cannot be triggered because the offending instruction would
share the same ID as the first inner HLocal, which is removed before
the inner graph is inlined. The added DCHECKs reveal the hidden problem
and make it safe for HLocals to be removed in the future.

Change-Id: I486eb0f3987e20c50cbec0fb06332229e07fbae9
compiler/optimizing/inliner.cc
compiler/optimizing/nodes.cc
compiler/optimizing/nodes.h