From 10e244f9e7f6d96a95c910a2bedef5bd3810c637 Mon Sep 17 00:00:00 2001 From: Calin Juravle Date: Mon, 26 Jan 2015 18:54:32 +0000 Subject: optimizing: NullCheck elimination How it works: - run a type analysis to propagate null information on instructions - during the last instruction simplifier remove null checks for which the input is known to be not null The current type analysis is actually a nullability analysis but it will be reused in follow up CLs to propagate type information: so it keeps the more convenient name. Change-Id: I54bb1d32ab24604b4d677d1ecdaf8d60a5ff5ce9 --- compiler/optimizing/builder.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compiler/optimizing/builder.cc') diff --git a/compiler/optimizing/builder.cc b/compiler/optimizing/builder.cc index 9c2facb75e..21c58598d0 100644 --- a/compiler/optimizing/builder.cc +++ b/compiler/optimizing/builder.cc @@ -161,7 +161,7 @@ void HGraphBuilder::InitializeParameters(uint16_t number_of_parameters) { if (!dex_compilation_unit_->IsStatic()) { // Add the implicit 'this' argument, not expressed in the signature. HParameterValue* parameter = - new (arena_) HParameterValue(parameter_index++, Primitive::kPrimNot); + new (arena_) HParameterValue(parameter_index++, Primitive::kPrimNot, true); entry_block_->AddInstruction(parameter); HLocal* local = GetLocalAt(locals_index++); entry_block_->AddInstruction(new (arena_) HStoreLocal(local, parameter)); -- cgit v1.2.3-59-g8ed1b