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 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
295 bool HBasicBlock::Dominates(HBasicBlock* other) const { | 295 bool HBasicBlock::Dominates(HBasicBlock* other) const { |
296 HBasicBlock* current = other->dominator(); | 296 HBasicBlock* current = other->dominator(); |
297 while (current != NULL) { | 297 while (current != NULL) { |
298 if (current == this) return true; | 298 if (current == this) return true; |
299 current = current->dominator(); | 299 current = current->dominator(); |
300 } | 300 } |
301 return false; | 301 return false; |
302 } | 302 } |
303 | 303 |
304 | 304 |
| 305 bool HBasicBlock::EqualToOrDominates(HBasicBlock* other) const { |
| 306 if (this == other) return true; |
| 307 return Dominates(other); |
| 308 } |
| 309 |
| 310 |
305 int HBasicBlock::LoopNestingDepth() const { | 311 int HBasicBlock::LoopNestingDepth() const { |
306 const HBasicBlock* current = this; | 312 const HBasicBlock* current = this; |
307 int result = (current->IsLoopHeader()) ? 1 : 0; | 313 int result = (current->IsLoopHeader()) ? 1 : 0; |
308 while (current->parent_loop_header() != NULL) { | 314 while (current->parent_loop_header() != NULL) { |
309 current = current->parent_loop_header(); | 315 current = current->parent_loop_header(); |
310 result++; | 316 result++; |
311 } | 317 } |
312 return result; | 318 return result; |
313 } | 319 } |
314 | 320 |
(...skipping 10809 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11124 if (ShouldProduceTraceOutput()) { | 11130 if (ShouldProduceTraceOutput()) { |
11125 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 11131 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
11126 } | 11132 } |
11127 | 11133 |
11128 #ifdef DEBUG | 11134 #ifdef DEBUG |
11129 graph_->Verify(false); // No full verify. | 11135 graph_->Verify(false); // No full verify. |
11130 #endif | 11136 #endif |
11131 } | 11137 } |
11132 | 11138 |
11133 } } // namespace v8::internal | 11139 } } // namespace v8::internal |
OLD | NEW |