summaryrefslogtreecommitdiff
path: root/compiler/optimizing/ssa_builder.cc
diff options
context:
space:
mode:
authorNicolas Geoffray <ngeoffray@google.com>2014-11-11 18:21:53 +0000
committerNicolas Geoffray <ngeoffray@google.com>2014-11-11 18:24:48 +0000
commit421e9f9088b51e9680a3dfcae6965fc1854d3ee4 (patch)
tree4a9429babb514ff0d8f6772f44aa73c79ec7a773 /compiler/optimizing/ssa_builder.cc
parentd6425d7bb909b668341d9781c567f35f6d10ea16 (diff)
Remove HTemporary when building the SSA graph.
- They are useless afterwards. If we keep them around, they can crash the dump of the graph, where they always assume a previous instruction. - In the call to HTemporary::GetType, check that the previous instruction exists. Change-Id: Ie7bf44d05cb61e3654a69725c1980925580dd3a6
Diffstat (limited to 'compiler/optimizing/ssa_builder.cc')
-rw-r--r--compiler/optimizing/ssa_builder.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler/optimizing/ssa_builder.cc b/compiler/optimizing/ssa_builder.cc
index e83c528fab..fec40f93c7 100644
--- a/compiler/optimizing/ssa_builder.cc
+++ b/compiler/optimizing/ssa_builder.cc
@@ -253,4 +253,9 @@ void SsaBuilder::VisitInstruction(HInstruction* instruction) {
instruction->SetEnvironment(environment);
}
+void SsaBuilder::VisitTemporary(HTemporary* temp) {
+ // Temporaries are only used by the baseline register allocator.
+ temp->GetBlock()->RemoveInstruction(temp);
+}
+
} // namespace art