Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(98)

Side by Side Diff: src/hydrogen.cc

Issue 151333003: Load elimination fix: load should not be replaced with another load if the former is not dominated … (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/hydrogen.h ('k') | src/hydrogen-load-elimination.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 11040 matching lines...) Expand 10 before | Expand all | Expand 10 after
11355 if (ShouldProduceTraceOutput()) { 11361 if (ShouldProduceTraceOutput()) {
11356 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 11362 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
11357 } 11363 }
11358 11364
11359 #ifdef DEBUG 11365 #ifdef DEBUG
11360 graph_->Verify(false); // No full verify. 11366 graph_->Verify(false); // No full verify.
11361 #endif 11367 #endif
11362 } 11368 }
11363 11369
11364 } } // namespace v8::internal 11370 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/hydrogen.h ('k') | src/hydrogen-load-elimination.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698