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

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

Issue 147023005: Don't propagate information through phis in loop headers. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Replace print with assertEquals 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 | « no previous file | test/mjsunit/regress/regress-check-eliminate-loop-phis.js » ('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 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 } else { 157 } else {
158 // Leave it NULL till we meet a new check instruction for this object 158 // Leave it NULL till we meet a new check instruction for this object
159 // in the control flow. 159 // in the control flow.
160 new_entry->check_ = NULL; 160 new_entry->check_ = NULL;
161 } 161 }
162 } 162 }
163 copy->cursor_ = cursor_; 163 copy->cursor_ = cursor_;
164 copy->size_ = size_; 164 copy->size_ = size_;
165 165
166 // Create entries for succ block's phis. 166 // Create entries for succ block's phis.
167 if (succ->phis()->length() > 0) { 167 if (!succ->IsLoopHeader() && succ->phis()->length() > 0) {
168 int pred_index = succ->PredecessorIndexOf(from_block); 168 int pred_index = succ->PredecessorIndexOf(from_block);
169 for (int phi_index = 0; 169 for (int phi_index = 0;
170 phi_index < succ->phis()->length(); 170 phi_index < succ->phis()->length();
171 ++phi_index) { 171 ++phi_index) {
172 HPhi* phi = succ->phis()->at(phi_index); 172 HPhi* phi = succ->phis()->at(phi_index);
173 HValue* phi_operand = phi->OperandAt(pred_index); 173 HValue* phi_operand = phi->OperandAt(pred_index);
174 174
175 HCheckTableEntry* pred_entry = copy->Find(phi_operand); 175 HCheckTableEntry* pred_entry = copy->Find(phi_operand);
176 if (pred_entry != NULL) { 176 if (pred_entry != NULL) {
177 // Create an entry for a phi in the table. 177 // Create an entry for a phi in the table.
(...skipping 523 matching lines...) Expand 10 before | Expand all | Expand 10 after
701 PRINT_STAT(removed_cho); 701 PRINT_STAT(removed_cho);
702 PRINT_STAT(narrowed); 702 PRINT_STAT(narrowed);
703 PRINT_STAT(loads); 703 PRINT_STAT(loads);
704 PRINT_STAT(empty); 704 PRINT_STAT(empty);
705 PRINT_STAT(compares_true); 705 PRINT_STAT(compares_true);
706 PRINT_STAT(compares_false); 706 PRINT_STAT(compares_false);
707 PRINT_STAT(transitions); 707 PRINT_STAT(transitions);
708 } 708 }
709 709
710 } } // namespace v8::internal 710 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-check-eliminate-loop-phis.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698