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-instructions.h

Issue 9455011: Lazy removal of dead HValues in GVN from use lists. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 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 | src/hydrogen-instructions.cc » ('j') | src/hydrogen-instructions.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 430 matching lines...) Expand 10 before | Expand all | Expand 10 after
441 int16_t type_; 441 int16_t type_;
442 }; 442 };
443 443
444 444
445 class HUseListNode: public ZoneObject { 445 class HUseListNode: public ZoneObject {
446 public: 446 public:
447 HUseListNode(HValue* value, int index, HUseListNode* tail) 447 HUseListNode(HValue* value, int index, HUseListNode* tail)
448 : tail_(tail), value_(value), index_(index) { 448 : tail_(tail), value_(value), index_(index) {
449 } 449 }
450 450
451 HUseListNode* tail() const { return tail_; } 451 HUseListNode* tail();
452 HValue* value() const { return value_; } 452 HValue* value() const { return value_; }
453 int index() const { return index_; } 453 int index() const { return index_; }
454 454
455 void set_tail(HUseListNode* list) { tail_ = list; } 455 void set_tail(HUseListNode* list) { tail_ = list; }
456 456
457 #ifdef DEBUG 457 #ifdef DEBUG
458 void Zap() { 458 void Zap() {
459 tail_ = reinterpret_cast<HUseListNode*>(1); 459 tail_ = reinterpret_cast<HUseListNode*>(1);
460 value_ = NULL; 460 value_ = NULL;
461 index_ = -1; 461 index_ = -1;
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
523 // unnecessary recomputations. If an instruction sets this flag, it must 523 // unnecessary recomputations. If an instruction sets this flag, it must
524 // implement DataEquals(), which will be used to determine if other 524 // implement DataEquals(), which will be used to determine if other
525 // occurrences of the instruction are indeed the same. 525 // occurrences of the instruction are indeed the same.
526 kUseGVN, 526 kUseGVN,
527 kCanOverflow, 527 kCanOverflow,
528 kBailoutOnMinusZero, 528 kBailoutOnMinusZero,
529 kCanBeDivByZero, 529 kCanBeDivByZero,
530 kDeoptimizeOnUndefined, 530 kDeoptimizeOnUndefined,
531 kIsArguments, 531 kIsArguments,
532 kTruncatingToInt32, 532 kTruncatingToInt32,
533 kLastFlag = kTruncatingToInt32 533 kIsDead,
534 kLastFlag = kIsDead
534 }; 535 };
535 536
536 STATIC_ASSERT(kLastFlag < kBitsPerInt); 537 STATIC_ASSERT(kLastFlag < kBitsPerInt);
537 538
538 static const int kChangesToDependsFlagsLeftShift = 1; 539 static const int kChangesToDependsFlagsLeftShift = 1;
539 540
540 static GVNFlagSet ConvertChangesToDependsFlags(GVNFlagSet flags) { 541 static GVNFlagSet ConvertChangesToDependsFlags(GVNFlagSet flags) {
541 return GVNFlagSet(flags.ToIntegral() << kChangesToDependsFlagsLeftShift); 542 return GVNFlagSet(flags.ToIntegral() << kChangesToDependsFlagsLeftShift);
542 } 543 }
543 544
(...skipping 4219 matching lines...) Expand 10 before | Expand all | Expand 10 after
4763 DECLARE_CONCRETE_INSTRUCTION(LoadFieldByIndex); 4764 DECLARE_CONCRETE_INSTRUCTION(LoadFieldByIndex);
4764 }; 4765 };
4765 4766
4766 4767
4767 #undef DECLARE_INSTRUCTION 4768 #undef DECLARE_INSTRUCTION
4768 #undef DECLARE_CONCRETE_INSTRUCTION 4769 #undef DECLARE_CONCRETE_INSTRUCTION
4769 4770
4770 } } // namespace v8::internal 4771 } } // namespace v8::internal
4771 4772
4772 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ 4773 #endif // V8_HYDROGEN_INSTRUCTIONS_H_
OLDNEW
« no previous file with comments | « no previous file | src/hydrogen-instructions.cc » ('j') | src/hydrogen-instructions.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698