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 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
342 continue; | 342 continue; |
343 } | 343 } |
344 } | 344 } |
345 prev = approx; | 345 prev = approx; |
346 approx = approx->next_; | 346 approx = approx->next_; |
347 } | 347 } |
348 } | 348 } |
349 | 349 |
350 bool Equal(HValue* a, HValue* b) { | 350 bool Equal(HValue* a, HValue* b) { |
351 if (a == b) return true; | 351 if (a == b) return true; |
352 if (a != NULL && b != NULL) return a->Equals(b); | 352 if (a != NULL && b != NULL && a->CheckFlag(HValue::kUseGVN)) { |
| 353 return a->Equals(b); |
| 354 } |
353 return false; | 355 return false; |
354 } | 356 } |
355 | 357 |
356 // Remove the last approximation for a field so that it can be reused. | 358 // Remove the last approximation for a field so that it can be reused. |
357 // We reuse the last entry because it was the first inserted and is thus | 359 // We reuse the last entry because it was the first inserted and is thus |
358 // farthest away from the current instruction. | 360 // farthest away from the current instruction. |
359 HFieldApproximation* ReuseLastApproximation(int field) { | 361 HFieldApproximation* ReuseLastApproximation(int field) { |
360 HFieldApproximation* approx = fields_[field]; | 362 HFieldApproximation* approx = fields_[field]; |
361 ASSERT(approx != NULL); | 363 ASSERT(approx != NULL); |
362 | 364 |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
499 } else { | 501 } else { |
500 // Perform only local analysis. | 502 // Perform only local analysis. |
501 for (int i = 0; i < graph()->blocks()->length(); i++) { | 503 for (int i = 0; i < graph()->blocks()->length(); i++) { |
502 table->Kill(); | 504 table->Kill(); |
503 engine.AnalyzeOneBlock(graph()->blocks()->at(i), table); | 505 engine.AnalyzeOneBlock(graph()->blocks()->at(i), table); |
504 } | 506 } |
505 } | 507 } |
506 } | 508 } |
507 | 509 |
508 } } // namespace v8::internal | 510 } } // namespace v8::internal |
OLD | NEW |