OSDN Git Service

ART: Update graph's exit block field if removed
authorDavid Brazdil <dbrazdil@google.com>
Tue, 26 May 2015 11:05:55 +0000 (12:05 +0100)
committerDavid Brazdil <dbrazdil@google.com>
Tue, 26 May 2015 11:05:55 +0000 (12:05 +0100)
commitc7af85dad0dc392cfc0b373b0c1cb4b4197c89f4
treeb49bf148c462e9b5f1911037b2ae830ed3beed6e
parent8a8d8252f52bec14a8fe2b6f88e1f184c63cf351
ART: Update graph's exit block field if removed

Running DCE on an infinite loop will delete the exit block but the
corresponding field is currently not cleared in the parent graph.
This does not cause any problems at the moment as that information is
only used in codegens to DCHECK that a block is not the exit block.
However, it will be necessary to update the inliner once we start to
inline methods with loops.

With this patch, DCE will update the HGraph::exit_block_ field. DCHECK
was also added to HGraph::InlineInto to make sure that the inlined
graph does have an exit block.

Change-Id: Ia8ddca375bbc6830cd919af6059a52cc9b73a023
compiler/optimizing/nodes.cc
compiler/optimizing/nodes.h