| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 332 } | 332 } |
| 333 | 333 |
| 334 // Only the first entry into the loop is from outside the loop. All other | 334 // Only the first entry into the loop is from outside the loop. All other |
| 335 // entries must be back edges. | 335 // entries must be back edges. |
| 336 for (int i = 1; i < predecessors()->length(); ++i) { | 336 for (int i = 1; i < predecessors()->length(); ++i) { |
| 337 loop_information()->RegisterBackEdge(predecessors()->at(i)); | 337 loop_information()->RegisterBackEdge(predecessors()->at(i)); |
| 338 } | 338 } |
| 339 } | 339 } |
| 340 | 340 |
| 341 | 341 |
| 342 void HBasicBlock::MarkSuccEdgeUnreachable(int succ) { |
| 343 ASSERT(IsFinished()); |
| 344 HBasicBlock* succ_block = end()->SuccessorAt(succ); |
| 345 |
| 346 ASSERT(succ_block->predecessors()->length() == 1); |
| 347 succ_block->MarkUnreachable(); |
| 348 } |
| 349 |
| 350 |
| 342 void HBasicBlock::RegisterPredecessor(HBasicBlock* pred) { | 351 void HBasicBlock::RegisterPredecessor(HBasicBlock* pred) { |
| 343 if (HasPredecessor()) { | 352 if (HasPredecessor()) { |
| 344 // Only loop header blocks can have a predecessor added after | 353 // Only loop header blocks can have a predecessor added after |
| 345 // instructions have been added to the block (they have phis for all | 354 // instructions have been added to the block (they have phis for all |
| 346 // values in the environment, these phis may be eliminated later). | 355 // values in the environment, these phis may be eliminated later). |
| 347 ASSERT(IsLoopHeader() || first_ == NULL); | 356 ASSERT(IsLoopHeader() || first_ == NULL); |
| 348 HEnvironment* incoming_env = pred->last_environment(); | 357 HEnvironment* incoming_env = pred->last_environment(); |
| 349 if (IsLoopHeader()) { | 358 if (IsLoopHeader()) { |
| 350 ASSERT(phis()->length() == incoming_env->length()); | 359 ASSERT(phis()->length() == incoming_env->length()); |
| 351 for (int i = 0; i < phis_.length(); ++i) { | 360 for (int i = 0; i < phis_.length(); ++i) { |
| (...skipping 10819 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11171 if (ShouldProduceTraceOutput()) { | 11180 if (ShouldProduceTraceOutput()) { |
| 11172 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 11181 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
| 11173 } | 11182 } |
| 11174 | 11183 |
| 11175 #ifdef DEBUG | 11184 #ifdef DEBUG |
| 11176 graph_->Verify(false); // No full verify. | 11185 graph_->Verify(false); // No full verify. |
| 11177 #endif | 11186 #endif |
| 11178 } | 11187 } |
| 11179 | 11188 |
| 11180 } } // namespace v8::internal | 11189 } } // namespace v8::internal |
| OLD | NEW |