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 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
330 } | 330 } |
331 | 331 |
332 // Only the first entry into the loop is from outside the loop. All other | 332 // Only the first entry into the loop is from outside the loop. All other |
333 // entries must be back edges. | 333 // entries must be back edges. |
334 for (int i = 1; i < predecessors()->length(); ++i) { | 334 for (int i = 1; i < predecessors()->length(); ++i) { |
335 loop_information()->RegisterBackEdge(predecessors()->at(i)); | 335 loop_information()->RegisterBackEdge(predecessors()->at(i)); |
336 } | 336 } |
337 } | 337 } |
338 | 338 |
339 | 339 |
| 340 void HBasicBlock::MarkSuccEdgeUnreachable(int succ) { |
| 341 ASSERT(IsFinished()); |
| 342 HBasicBlock* succ_block = end()->SuccessorAt(succ); |
| 343 |
| 344 ASSERT(succ_block->predecessors()->length() == 1); |
| 345 succ_block->MarkUnreachable(); |
| 346 } |
| 347 |
| 348 |
340 void HBasicBlock::RegisterPredecessor(HBasicBlock* pred) { | 349 void HBasicBlock::RegisterPredecessor(HBasicBlock* pred) { |
341 if (HasPredecessor()) { | 350 if (HasPredecessor()) { |
342 // Only loop header blocks can have a predecessor added after | 351 // Only loop header blocks can have a predecessor added after |
343 // instructions have been added to the block (they have phis for all | 352 // instructions have been added to the block (they have phis for all |
344 // values in the environment, these phis may be eliminated later). | 353 // values in the environment, these phis may be eliminated later). |
345 ASSERT(IsLoopHeader() || first_ == NULL); | 354 ASSERT(IsLoopHeader() || first_ == NULL); |
346 HEnvironment* incoming_env = pred->last_environment(); | 355 HEnvironment* incoming_env = pred->last_environment(); |
347 if (IsLoopHeader()) { | 356 if (IsLoopHeader()) { |
348 ASSERT(phis()->length() == incoming_env->length()); | 357 ASSERT(phis()->length() == incoming_env->length()); |
349 for (int i = 0; i < phis_.length(); ++i) { | 358 for (int i = 0; i < phis_.length(); ++i) { |
(...skipping 10810 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11160 if (ShouldProduceTraceOutput()) { | 11169 if (ShouldProduceTraceOutput()) { |
11161 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 11170 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
11162 } | 11171 } |
11163 | 11172 |
11164 #ifdef DEBUG | 11173 #ifdef DEBUG |
11165 graph_->Verify(false); // No full verify. | 11174 graph_->Verify(false); // No full verify. |
11166 #endif | 11175 #endif |
11167 } | 11176 } |
11168 | 11177 |
11169 } } // namespace v8::internal | 11178 } } // namespace v8::internal |
OLD | NEW |