Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/hydrogen-bch.h" | 5 #include "src/hydrogen-bch.h" |
| 6 | 6 |
| 7 namespace v8 { | 7 namespace v8 { |
| 8 namespace internal { | 8 namespace internal { |
| 9 | 9 |
| 10 /* | 10 /* |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 167 break; | 167 break; |
| 168 } | 168 } |
| 169 } | 169 } |
| 170 | 170 |
| 171 current = next; | 171 current = next; |
| 172 } | 172 } |
| 173 | 173 |
| 174 return unsafe ? OPTIMISTICALLY_HOISTABLE : HOISTABLE; | 174 return unsafe ? OPTIMISTICALLY_HOISTABLE : HOISTABLE; |
| 175 } | 175 } |
| 176 | 176 |
| 177 // Work around for GCC 4.4.6 at -O3 reporting | |
| 178 // warning: may be used uninitialized in this function | |
| 179 #pragma GCC diagnostic ignored "-Wuninitialized" | |
|
Sven Panne
2014/09/01 07:55:16
Remove this, GCC 4.4 is unsupported.
| |
| 177 explicit InductionVariableBlocksTable(HGraph* graph) | 180 explicit InductionVariableBlocksTable(HGraph* graph) |
| 178 : graph_(graph), loop_header_(NULL), | 181 : graph_(graph), loop_header_(NULL), |
| 179 elements_(graph->blocks()->length(), graph->zone()) { | 182 elements_(graph->blocks()->length(), graph->zone()) { |
| 180 for (int i = 0; i < graph->blocks()->length(); i++) { | 183 for (int i = 0; i < graph->blocks()->length(); i++) { |
| 181 Element element; | 184 Element element; |
| 182 element.set_block(graph->blocks()->at(i)); | 185 element.set_block(graph->blocks()->at(i)); |
| 183 elements_.Add(element, graph->zone()); | 186 elements_.Add(element, graph->zone()); |
| 184 DCHECK(at(i)->block()->block_id() == i); | 187 DCHECK(at(i)->block()->block_id() == i); |
| 185 } | 188 } |
| 186 } | 189 } |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 370 | 373 |
| 371 void HBoundsCheckHoistingPhase::HoistRedundantBoundsChecks() { | 374 void HBoundsCheckHoistingPhase::HoistRedundantBoundsChecks() { |
| 372 InductionVariableBlocksTable table(graph()); | 375 InductionVariableBlocksTable table(graph()); |
| 373 table.CollectInductionVariableData(graph()->entry_block()); | 376 table.CollectInductionVariableData(graph()->entry_block()); |
| 374 for (int i = 0; i < graph()->blocks()->length(); i++) { | 377 for (int i = 0; i < graph()->blocks()->length(); i++) { |
| 375 table.EliminateRedundantBoundsChecks(graph()->blocks()->at(i)); | 378 table.EliminateRedundantBoundsChecks(graph()->blocks()->at(i)); |
| 376 } | 379 } |
| 377 } | 380 } |
| 378 | 381 |
| 379 } } // namespace v8::internal | 382 } } // namespace v8::internal |
| OLD | NEW |