Nicolas Geoffray | c32e770 | 2014-04-24 12:43:16 +0100 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2014 The Android Open Source Project |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | #include "ssa_builder.h" |
Nicolas Geoffray | 184d640 | 2014-06-09 14:06:02 +0100 | [diff] [blame] | 18 | |
Nicolas Geoffray | c32e770 | 2014-04-24 12:43:16 +0100 | [diff] [blame] | 19 | #include "nodes.h" |
Calin Juravle | 10e244f | 2015-01-26 18:54:32 +0000 | [diff] [blame] | 20 | #include "primitive_type_propagation.h" |
Nicolas Geoffray | 3159674 | 2014-11-24 15:28:45 +0000 | [diff] [blame] | 21 | #include "ssa_phi_elimination.h" |
Nicolas Geoffray | c32e770 | 2014-04-24 12:43:16 +0100 | [diff] [blame] | 22 | |
| 23 | namespace art { |
| 24 | |
| 25 | void SsaBuilder::BuildSsa() { |
Nicolas Geoffray | 804d093 | 2014-05-02 08:46:00 +0100 | [diff] [blame] | 26 | // 1) Visit in reverse post order. We need to have all predecessors of a block visited |
Nicolas Geoffray | c32e770 | 2014-04-24 12:43:16 +0100 | [diff] [blame] | 27 | // (with the exception of loops) in order to create the right environment for that |
| 28 | // block. For loops, we create phis whose inputs will be set in 2). |
Nicolas Geoffray | 804d093 | 2014-05-02 08:46:00 +0100 | [diff] [blame] | 29 | for (HReversePostOrderIterator it(*GetGraph()); !it.Done(); it.Advance()) { |
| 30 | VisitBasicBlock(it.Current()); |
Nicolas Geoffray | c32e770 | 2014-04-24 12:43:16 +0100 | [diff] [blame] | 31 | } |
| 32 | |
| 33 | // 2) Set inputs of loop phis. |
| 34 | for (size_t i = 0; i < loop_headers_.Size(); i++) { |
| 35 | HBasicBlock* block = loop_headers_.Get(i); |
Nicolas Geoffray | f635e63 | 2014-05-14 09:43:38 +0100 | [diff] [blame] | 36 | for (HInstructionIterator it(block->GetPhis()); !it.Done(); it.Advance()) { |
Nicolas Geoffray | c32e770 | 2014-04-24 12:43:16 +0100 | [diff] [blame] | 37 | HPhi* phi = it.Current()->AsPhi(); |
Nicolas Geoffray | 622d9c3 | 2014-05-12 16:11:02 +0100 | [diff] [blame] | 38 | for (size_t pred = 0; pred < block->GetPredecessors().Size(); pred++) { |
Nicolas Geoffray | a7062e0 | 2014-05-22 12:50:17 +0100 | [diff] [blame] | 39 | HInstruction* input = ValueOfLocal(block->GetPredecessors().Get(pred), phi->GetRegNumber()); |
| 40 | phi->AddInput(input); |
Nicolas Geoffray | c32e770 | 2014-04-24 12:43:16 +0100 | [diff] [blame] | 41 | } |
| 42 | } |
| 43 | } |
| 44 | |
Nicolas Geoffray | d6138ef | 2015-02-18 14:48:53 +0000 | [diff] [blame^] | 45 | // 3) Mark dead phis. This will mark phis that are only used by environments: |
Nicolas Geoffray | 3159674 | 2014-11-24 15:28:45 +0000 | [diff] [blame] | 46 | // at the DEX level, the type of these phis does not need to be consistent, but |
| 47 | // our code generator will complain if the inputs of a phi do not have the same |
Nicolas Geoffray | d6138ef | 2015-02-18 14:48:53 +0000 | [diff] [blame^] | 48 | // type. The marking allows the type propagation to know which phis it needs |
| 49 | // to handle. We mark but do not eliminate: the elimination will be done in |
| 50 | // step 5). |
| 51 | { |
| 52 | SsaDeadPhiElimination dead_phis(GetGraph()); |
| 53 | dead_phis.MarkDeadPhis(); |
| 54 | } |
Nicolas Geoffray | 3159674 | 2014-11-24 15:28:45 +0000 | [diff] [blame] | 55 | |
| 56 | // 4) Propagate types of phis. At this point, phis are typed void in the general |
Nicolas Geoffray | d6138ef | 2015-02-18 14:48:53 +0000 | [diff] [blame^] | 57 | // case, or float/double/reference when we created an equivalent phi. So we |
Nicolas Geoffray | 3159674 | 2014-11-24 15:28:45 +0000 | [diff] [blame] | 58 | // need to propagate the types across phis to give them a correct type. |
Calin Juravle | 10e244f | 2015-01-26 18:54:32 +0000 | [diff] [blame] | 59 | PrimitiveTypePropagation type_propagation(GetGraph()); |
Nicolas Geoffray | 184d640 | 2014-06-09 14:06:02 +0100 | [diff] [blame] | 60 | type_propagation.Run(); |
| 61 | |
Nicolas Geoffray | d6138ef | 2015-02-18 14:48:53 +0000 | [diff] [blame^] | 62 | // 5) Step 4) changes inputs of phis which may lead to dead phis again. We re-run |
| 63 | // the algorithm and this time elimimates them. |
| 64 | // TODO: Make this work with debug info and reference liveness. We currently |
| 65 | // eagerly remove phis used in environments. |
| 66 | { |
| 67 | SsaDeadPhiElimination dead_phis(GetGraph()); |
| 68 | dead_phis.Run(); |
| 69 | } |
| 70 | |
| 71 | // 6) Clear locals. |
Nicolas Geoffray | c32e770 | 2014-04-24 12:43:16 +0100 | [diff] [blame] | 72 | // TODO: Move this to a dead code eliminator phase. |
Nicolas Geoffray | f635e63 | 2014-05-14 09:43:38 +0100 | [diff] [blame] | 73 | for (HInstructionIterator it(GetGraph()->GetEntryBlock()->GetInstructions()); |
Nicolas Geoffray | c32e770 | 2014-04-24 12:43:16 +0100 | [diff] [blame] | 74 | !it.Done(); |
| 75 | it.Advance()) { |
| 76 | HInstruction* current = it.Current(); |
Roland Levillain | 476df55 | 2014-10-09 17:51:36 +0100 | [diff] [blame] | 77 | if (current->IsLocal()) { |
Nicolas Geoffray | c32e770 | 2014-04-24 12:43:16 +0100 | [diff] [blame] | 78 | current->GetBlock()->RemoveInstruction(current); |
| 79 | } |
| 80 | } |
| 81 | } |
| 82 | |
| 83 | HInstruction* SsaBuilder::ValueOfLocal(HBasicBlock* block, size_t local) { |
David Brazdil | ed59619 | 2015-01-23 10:39:45 +0000 | [diff] [blame] | 84 | return GetLocalsFor(block)->GetInstructionAt(local); |
Nicolas Geoffray | c32e770 | 2014-04-24 12:43:16 +0100 | [diff] [blame] | 85 | } |
| 86 | |
| 87 | void SsaBuilder::VisitBasicBlock(HBasicBlock* block) { |
| 88 | current_locals_ = GetLocalsFor(block); |
| 89 | |
| 90 | if (block->IsLoopHeader()) { |
| 91 | // If the block is a loop header, we know we only have visited the pre header |
Nicolas Geoffray | 804d093 | 2014-05-02 08:46:00 +0100 | [diff] [blame] | 92 | // because we are visiting in reverse post order. We create phis for all initialized |
Nicolas Geoffray | c32e770 | 2014-04-24 12:43:16 +0100 | [diff] [blame] | 93 | // locals from the pre header. Their inputs will be populated at the end of |
| 94 | // the analysis. |
| 95 | for (size_t local = 0; local < current_locals_->Size(); local++) { |
| 96 | HInstruction* incoming = ValueOfLocal(block->GetLoopInformation()->GetPreHeader(), local); |
| 97 | if (incoming != nullptr) { |
Nicolas Geoffray | c32e770 | 2014-04-24 12:43:16 +0100 | [diff] [blame] | 98 | HPhi* phi = new (GetGraph()->GetArena()) HPhi( |
| 99 | GetGraph()->GetArena(), local, 0, Primitive::kPrimVoid); |
| 100 | block->AddPhi(phi); |
David Brazdil | ed59619 | 2015-01-23 10:39:45 +0000 | [diff] [blame] | 101 | current_locals_->SetRawEnvAt(local, phi); |
Nicolas Geoffray | c32e770 | 2014-04-24 12:43:16 +0100 | [diff] [blame] | 102 | } |
| 103 | } |
| 104 | // Save the loop header so that the last phase of the analysis knows which |
| 105 | // blocks need to be updated. |
| 106 | loop_headers_.Add(block); |
Nicolas Geoffray | 622d9c3 | 2014-05-12 16:11:02 +0100 | [diff] [blame] | 107 | } else if (block->GetPredecessors().Size() > 0) { |
Nicolas Geoffray | 804d093 | 2014-05-02 08:46:00 +0100 | [diff] [blame] | 108 | // All predecessors have already been visited because we are visiting in reverse post order. |
Nicolas Geoffray | c32e770 | 2014-04-24 12:43:16 +0100 | [diff] [blame] | 109 | // We merge the values of all locals, creating phis if those values differ. |
| 110 | for (size_t local = 0; local < current_locals_->Size(); local++) { |
Nicolas Geoffray | 7c3560f | 2014-06-04 12:12:08 +0100 | [diff] [blame] | 111 | bool one_predecessor_has_no_value = false; |
Nicolas Geoffray | c32e770 | 2014-04-24 12:43:16 +0100 | [diff] [blame] | 112 | bool is_different = false; |
Nicolas Geoffray | 622d9c3 | 2014-05-12 16:11:02 +0100 | [diff] [blame] | 113 | HInstruction* value = ValueOfLocal(block->GetPredecessors().Get(0), local); |
Nicolas Geoffray | 7c3560f | 2014-06-04 12:12:08 +0100 | [diff] [blame] | 114 | |
| 115 | for (size_t i = 0, e = block->GetPredecessors().Size(); i < e; ++i) { |
| 116 | HInstruction* current = ValueOfLocal(block->GetPredecessors().Get(i), local); |
| 117 | if (current == nullptr) { |
Nicolas Geoffray | ec7e472 | 2014-06-06 11:24:33 +0100 | [diff] [blame] | 118 | one_predecessor_has_no_value = true; |
| 119 | break; |
Nicolas Geoffray | 7c3560f | 2014-06-04 12:12:08 +0100 | [diff] [blame] | 120 | } else if (current != value) { |
Nicolas Geoffray | c32e770 | 2014-04-24 12:43:16 +0100 | [diff] [blame] | 121 | is_different = true; |
Nicolas Geoffray | c32e770 | 2014-04-24 12:43:16 +0100 | [diff] [blame] | 122 | } |
| 123 | } |
Nicolas Geoffray | 7c3560f | 2014-06-04 12:12:08 +0100 | [diff] [blame] | 124 | |
| 125 | if (one_predecessor_has_no_value) { |
| 126 | // If one predecessor has no value for this local, we trust the verifier has |
| 127 | // successfully checked that there is a store dominating any read after this block. |
| 128 | continue; |
| 129 | } |
| 130 | |
Nicolas Geoffray | c32e770 | 2014-04-24 12:43:16 +0100 | [diff] [blame] | 131 | if (is_different) { |
Nicolas Geoffray | c32e770 | 2014-04-24 12:43:16 +0100 | [diff] [blame] | 132 | HPhi* phi = new (GetGraph()->GetArena()) HPhi( |
Nicolas Geoffray | 622d9c3 | 2014-05-12 16:11:02 +0100 | [diff] [blame] | 133 | GetGraph()->GetArena(), local, block->GetPredecessors().Size(), Primitive::kPrimVoid); |
| 134 | for (size_t i = 0; i < block->GetPredecessors().Size(); i++) { |
Andreas Gampe | 277ccbd | 2014-11-03 21:36:10 -0800 | [diff] [blame] | 135 | HInstruction* pred_value = ValueOfLocal(block->GetPredecessors().Get(i), local); |
| 136 | phi->SetRawInputAt(i, pred_value); |
Nicolas Geoffray | c32e770 | 2014-04-24 12:43:16 +0100 | [diff] [blame] | 137 | } |
| 138 | block->AddPhi(phi); |
| 139 | value = phi; |
| 140 | } |
David Brazdil | ed59619 | 2015-01-23 10:39:45 +0000 | [diff] [blame] | 141 | current_locals_->SetRawEnvAt(local, value); |
Nicolas Geoffray | c32e770 | 2014-04-24 12:43:16 +0100 | [diff] [blame] | 142 | } |
| 143 | } |
| 144 | |
| 145 | // Visit all instructions. The instructions of interest are: |
| 146 | // - HLoadLocal: replace them with the current value of the local. |
| 147 | // - HStoreLocal: update current value of the local and remove the instruction. |
| 148 | // - Instructions that require an environment: populate their environment |
| 149 | // with the current values of the locals. |
Nicolas Geoffray | f635e63 | 2014-05-14 09:43:38 +0100 | [diff] [blame] | 150 | for (HInstructionIterator it(block->GetInstructions()); !it.Done(); it.Advance()) { |
Nicolas Geoffray | c32e770 | 2014-04-24 12:43:16 +0100 | [diff] [blame] | 151 | it.Current()->Accept(this); |
| 152 | } |
| 153 | } |
| 154 | |
Nicolas Geoffray | 102cbed | 2014-10-15 18:31:05 +0100 | [diff] [blame] | 155 | /** |
| 156 | * Constants in the Dex format are not typed. So the builder types them as |
| 157 | * integers, but when doing the SSA form, we might realize the constant |
| 158 | * is used for floating point operations. We create a floating-point equivalent |
| 159 | * constant to make the operations correctly typed. |
| 160 | */ |
| 161 | static HFloatConstant* GetFloatEquivalent(HIntConstant* constant) { |
| 162 | // We place the floating point constant next to this constant. |
| 163 | HFloatConstant* result = constant->GetNext()->AsFloatConstant(); |
| 164 | if (result == nullptr) { |
| 165 | HGraph* graph = constant->GetBlock()->GetGraph(); |
| 166 | ArenaAllocator* allocator = graph->GetArena(); |
| 167 | result = new (allocator) HFloatConstant(bit_cast<int32_t, float>(constant->GetValue())); |
| 168 | constant->GetBlock()->InsertInstructionBefore(result, constant->GetNext()); |
| 169 | } else { |
| 170 | // If there is already a constant with the expected type, we know it is |
| 171 | // the floating point equivalent of this constant. |
| 172 | DCHECK_EQ((bit_cast<float, int32_t>(result->GetValue())), constant->GetValue()); |
| 173 | } |
| 174 | return result; |
| 175 | } |
| 176 | |
| 177 | /** |
| 178 | * Wide constants in the Dex format are not typed. So the builder types them as |
| 179 | * longs, but when doing the SSA form, we might realize the constant |
| 180 | * is used for floating point operations. We create a floating-point equivalent |
| 181 | * constant to make the operations correctly typed. |
| 182 | */ |
| 183 | static HDoubleConstant* GetDoubleEquivalent(HLongConstant* constant) { |
| 184 | // We place the floating point constant next to this constant. |
| 185 | HDoubleConstant* result = constant->GetNext()->AsDoubleConstant(); |
| 186 | if (result == nullptr) { |
| 187 | HGraph* graph = constant->GetBlock()->GetGraph(); |
| 188 | ArenaAllocator* allocator = graph->GetArena(); |
| 189 | result = new (allocator) HDoubleConstant(bit_cast<int64_t, double>(constant->GetValue())); |
| 190 | constant->GetBlock()->InsertInstructionBefore(result, constant->GetNext()); |
| 191 | } else { |
| 192 | // If there is already a constant with the expected type, we know it is |
| 193 | // the floating point equivalent of this constant. |
| 194 | DCHECK_EQ((bit_cast<double, int64_t>(result->GetValue())), constant->GetValue()); |
| 195 | } |
| 196 | return result; |
| 197 | } |
| 198 | |
| 199 | /** |
| 200 | * Because of Dex format, we might end up having the same phi being |
Nicolas Geoffray | d6138ef | 2015-02-18 14:48:53 +0000 | [diff] [blame^] | 201 | * used for non floating point operations and floating point / reference operations. |
| 202 | * Because we want the graph to be correctly typed (and thereafter avoid moves between |
Nicolas Geoffray | 102cbed | 2014-10-15 18:31:05 +0100 | [diff] [blame] | 203 | * floating point registers and core registers), we need to create a copy of the |
Nicolas Geoffray | d6138ef | 2015-02-18 14:48:53 +0000 | [diff] [blame^] | 204 | * phi with a floating point / reference type. |
Nicolas Geoffray | 102cbed | 2014-10-15 18:31:05 +0100 | [diff] [blame] | 205 | */ |
Nicolas Geoffray | d6138ef | 2015-02-18 14:48:53 +0000 | [diff] [blame^] | 206 | static HPhi* GetFloatDoubleOrReferenceEquivalentOfPhi(HPhi* phi, Primitive::Type type) { |
| 207 | // We place the floating point /reference phi next to this phi. |
Nicolas Geoffray | 102cbed | 2014-10-15 18:31:05 +0100 | [diff] [blame] | 208 | HInstruction* next = phi->GetNext(); |
Nicolas Geoffray | d6138ef | 2015-02-18 14:48:53 +0000 | [diff] [blame^] | 209 | if (next != nullptr |
| 210 | && next->AsPhi()->GetRegNumber() == phi->GetRegNumber() |
| 211 | && next->GetType() != type) { |
| 212 | // Move to the next phi to see if it is the one we are looking for. |
| 213 | next = next->GetNext(); |
| 214 | } |
| 215 | |
| 216 | if (next == nullptr |
| 217 | || (next->AsPhi()->GetRegNumber() != phi->GetRegNumber()) |
| 218 | || (next->GetType() != type)) { |
Nicolas Geoffray | 102cbed | 2014-10-15 18:31:05 +0100 | [diff] [blame] | 219 | ArenaAllocator* allocator = phi->GetBlock()->GetGraph()->GetArena(); |
| 220 | HPhi* new_phi = new (allocator) HPhi(allocator, phi->GetRegNumber(), phi->InputCount(), type); |
| 221 | for (size_t i = 0, e = phi->InputCount(); i < e; ++i) { |
| 222 | // Copy the inputs. Note that the graph may not be correctly typed by doing this copy, |
| 223 | // but the type propagation phase will fix it. |
| 224 | new_phi->SetRawInputAt(i, phi->InputAt(i)); |
| 225 | } |
| 226 | phi->GetBlock()->InsertPhiAfter(new_phi, phi); |
| 227 | return new_phi; |
| 228 | } else { |
Nicolas Geoffray | 21cc798 | 2014-11-17 17:50:33 +0000 | [diff] [blame] | 229 | DCHECK_EQ(next->GetType(), type); |
Nicolas Geoffray | 102cbed | 2014-10-15 18:31:05 +0100 | [diff] [blame] | 230 | return next->AsPhi(); |
| 231 | } |
| 232 | } |
| 233 | |
| 234 | HInstruction* SsaBuilder::GetFloatOrDoubleEquivalent(HInstruction* user, |
| 235 | HInstruction* value, |
| 236 | Primitive::Type type) { |
| 237 | if (value->IsArrayGet()) { |
| 238 | // The verifier has checked that values in arrays cannot be used for both |
| 239 | // floating point and non-floating point operations. It is therefore safe to just |
| 240 | // change the type of the operation. |
| 241 | value->AsArrayGet()->SetType(type); |
| 242 | return value; |
| 243 | } else if (value->IsLongConstant()) { |
| 244 | return GetDoubleEquivalent(value->AsLongConstant()); |
| 245 | } else if (value->IsIntConstant()) { |
| 246 | return GetFloatEquivalent(value->AsIntConstant()); |
| 247 | } else if (value->IsPhi()) { |
Nicolas Geoffray | d6138ef | 2015-02-18 14:48:53 +0000 | [diff] [blame^] | 248 | return GetFloatDoubleOrReferenceEquivalentOfPhi(value->AsPhi(), type); |
Nicolas Geoffray | 102cbed | 2014-10-15 18:31:05 +0100 | [diff] [blame] | 249 | } else { |
| 250 | // For other instructions, we assume the verifier has checked that the dex format is correctly |
| 251 | // typed and the value in a dex register will not be used for both floating point and |
| 252 | // non-floating point operations. So the only reason an instruction would want a floating |
| 253 | // point equivalent is for an unused phi that will be removed by the dead phi elimination phase. |
| 254 | DCHECK(user->IsPhi()); |
| 255 | return value; |
| 256 | } |
| 257 | } |
| 258 | |
Nicolas Geoffray | d6138ef | 2015-02-18 14:48:53 +0000 | [diff] [blame^] | 259 | HInstruction* SsaBuilder::GetReferenceTypeEquivalent(HInstruction* value) { |
| 260 | if (value->IsIntConstant()) { |
| 261 | DCHECK_EQ(value->AsIntConstant()->GetValue(), 0); |
| 262 | return value->GetBlock()->GetGraph()->GetNullConstant(); |
| 263 | } else { |
| 264 | DCHECK(value->IsPhi()); |
| 265 | return GetFloatDoubleOrReferenceEquivalentOfPhi(value->AsPhi(), Primitive::kPrimNot); |
| 266 | } |
| 267 | } |
| 268 | |
Nicolas Geoffray | c32e770 | 2014-04-24 12:43:16 +0100 | [diff] [blame] | 269 | void SsaBuilder::VisitLoadLocal(HLoadLocal* load) { |
David Brazdil | ed59619 | 2015-01-23 10:39:45 +0000 | [diff] [blame] | 270 | HInstruction* value = current_locals_->GetInstructionAt(load->GetLocal()->GetRegNumber()); |
Nicolas Geoffray | d6138ef | 2015-02-18 14:48:53 +0000 | [diff] [blame^] | 271 | // If the operation requests a specific type, we make sure its input is of that type. |
| 272 | if (load->GetType() != value->GetType()) { |
| 273 | if (load->GetType() == Primitive::kPrimFloat || load->GetType() == Primitive::kPrimDouble) { |
| 274 | value = GetFloatOrDoubleEquivalent(load, value, load->GetType()); |
| 275 | } else if (load->GetType() == Primitive::kPrimNot) { |
| 276 | value = GetReferenceTypeEquivalent(value); |
| 277 | } |
Nicolas Geoffray | 102cbed | 2014-10-15 18:31:05 +0100 | [diff] [blame] | 278 | } |
| 279 | load->ReplaceWith(value); |
Nicolas Geoffray | c32e770 | 2014-04-24 12:43:16 +0100 | [diff] [blame] | 280 | load->GetBlock()->RemoveInstruction(load); |
| 281 | } |
| 282 | |
| 283 | void SsaBuilder::VisitStoreLocal(HStoreLocal* store) { |
David Brazdil | ed59619 | 2015-01-23 10:39:45 +0000 | [diff] [blame] | 284 | current_locals_->SetRawEnvAt(store->GetLocal()->GetRegNumber(), store->InputAt(1)); |
Nicolas Geoffray | c32e770 | 2014-04-24 12:43:16 +0100 | [diff] [blame] | 285 | store->GetBlock()->RemoveInstruction(store); |
| 286 | } |
| 287 | |
| 288 | void SsaBuilder::VisitInstruction(HInstruction* instruction) { |
| 289 | if (!instruction->NeedsEnvironment()) { |
| 290 | return; |
| 291 | } |
| 292 | HEnvironment* environment = new (GetGraph()->GetArena()) HEnvironment( |
| 293 | GetGraph()->GetArena(), current_locals_->Size()); |
David Brazdil | ed59619 | 2015-01-23 10:39:45 +0000 | [diff] [blame] | 294 | environment->CopyFrom(current_locals_); |
Nicolas Geoffray | c32e770 | 2014-04-24 12:43:16 +0100 | [diff] [blame] | 295 | instruction->SetEnvironment(environment); |
| 296 | } |
| 297 | |
Nicolas Geoffray | 421e9f9 | 2014-11-11 18:21:53 +0000 | [diff] [blame] | 298 | void SsaBuilder::VisitTemporary(HTemporary* temp) { |
| 299 | // Temporaries are only used by the baseline register allocator. |
| 300 | temp->GetBlock()->RemoveInstruction(temp); |
| 301 | } |
| 302 | |
Nicolas Geoffray | c32e770 | 2014-04-24 12:43:16 +0100 | [diff] [blame] | 303 | } // namespace art |