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

Side by Side Diff: src/hydrogen-load-elimination.cc

Issue 264693011: Various cleanups in check elimination. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 7 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-instructions.cc ('k') | src/ia32/lithium-codegen-ia32.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 // 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 "hydrogen-alias-analysis.h" 5 #include "hydrogen-alias-analysis.h"
6 #include "hydrogen-load-elimination.h" 6 #include "hydrogen-load-elimination.h"
7 #include "hydrogen-instructions.h" 7 #include "hydrogen-instructions.h"
8 #include "hydrogen-flow-engine.h" 8 #include "hydrogen-flow-engine.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 HLoadNamedField* l = HLoadNamedField::cast(instr); 50 HLoadNamedField* l = HLoadNamedField::cast(instr);
51 TRACE((" process L%d field %d (o%d)\n", 51 TRACE((" process L%d field %d (o%d)\n",
52 instr->id(), 52 instr->id(),
53 FieldOf(l->access()), 53 FieldOf(l->access()),
54 l->object()->ActualValue()->id())); 54 l->object()->ActualValue()->id()));
55 HValue* result = load(l); 55 HValue* result = load(l);
56 if (result != instr && 56 if (result != instr &&
57 result->type().Equals(instr->type()) && 57 result->type().Equals(instr->type()) &&
58 result->representation().Equals(instr->representation()) && 58 result->representation().Equals(instr->representation()) &&
59 (!result->IsLoadNamedField() || 59 (!result->IsLoadNamedField() ||
60 HLoadNamedField::cast(instr)->map_set()->IsSubset( 60 HLoadNamedField::cast(instr)->maps()->IsSubset(
61 HLoadNamedField::cast(result)->map_set()))) { 61 HLoadNamedField::cast(result)->maps()))) {
62 // The load can be replaced with a previous load or a value. 62 // The load can be replaced with a previous load or a value.
63 TRACE((" replace L%d -> v%d\n", instr->id(), result->id())); 63 TRACE((" replace L%d -> v%d\n", instr->id(), result->id()));
64 instr->DeleteAndReplaceWith(result); 64 instr->DeleteAndReplaceWith(result);
65 } 65 }
66 break; 66 break;
67 } 67 }
68 case HValue::kStoreNamedField: { 68 case HValue::kStoreNamedField: {
69 HStoreNamedField* s = HStoreNamedField::cast(instr); 69 HStoreNamedField* s = HStoreNamedField::cast(instr);
70 TRACE((" process S%d field %d (o%d) = v%d\n", 70 TRACE((" process S%d field %d (o%d) = v%d\n",
71 instr->id(), 71 instr->id(),
(...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after
508 } else { 508 } else {
509 // Perform only local analysis. 509 // Perform only local analysis.
510 for (int i = 0; i < graph()->blocks()->length(); i++) { 510 for (int i = 0; i < graph()->blocks()->length(); i++) {
511 table->Kill(); 511 table->Kill();
512 engine.AnalyzeOneBlock(graph()->blocks()->at(i), table); 512 engine.AnalyzeOneBlock(graph()->blocks()->at(i), table);
513 } 513 }
514 } 514 }
515 } 515 }
516 516
517 } } // namespace v8::internal 517 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/hydrogen-instructions.cc ('k') | src/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698