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

Side by Side Diff: src/hydrogen-instructions.h

Issue 23691064: Make HValue::ActualValue() traverse all idefs. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 3 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-alias-analysis.h ('k') | no next file » | no next file with comments »
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 764 matching lines...) Expand 10 before | Expand all | Expand 10 after
775 HValue* RedefinedOperand() { 775 HValue* RedefinedOperand() {
776 int index = RedefinedOperandIndex(); 776 int index = RedefinedOperandIndex();
777 return index == kNoRedefinedOperand ? NULL : OperandAt(index); 777 return index == kNoRedefinedOperand ? NULL : OperandAt(index);
778 } 778 }
779 779
780 // A purely informative definition is an idef that will not emit code and 780 // A purely informative definition is an idef that will not emit code and
781 // should therefore be removed from the graph in the RestoreActualValues 781 // should therefore be removed from the graph in the RestoreActualValues
782 // phase (so that live ranges will be shorter). 782 // phase (so that live ranges will be shorter).
783 virtual bool IsPurelyInformativeDefinition() { return false; } 783 virtual bool IsPurelyInformativeDefinition() { return false; }
784 784
785 // This method must always return the original HValue SSA definition 785 // This method must always return the original HValue SSA definition,
786 // (regardless of any iDef of this value). 786 // regardless of any chain of iDefs of this value.
787 HValue* ActualValue() { 787 HValue* ActualValue() {
788 int index = RedefinedOperandIndex(); 788 HValue* value = this;
789 return index == kNoRedefinedOperand ? this : OperandAt(index); 789 int index;
790 while ((index = value->RedefinedOperandIndex()) != kNoRedefinedOperand) {
791 value = value->OperandAt(index);
792 }
793 return value;
790 } 794 }
791 795
792 bool IsInteger32Constant(); 796 bool IsInteger32Constant();
793 int32_t GetInteger32Constant(); 797 int32_t GetInteger32Constant();
794 bool EqualsInteger32Constant(int32_t value); 798 bool EqualsInteger32Constant(int32_t value);
795 799
796 bool IsDefinedAfter(HBasicBlock* other) const; 800 bool IsDefinedAfter(HBasicBlock* other) const;
797 801
798 // Operands. 802 // Operands.
799 virtual int OperandCount() = 0; 803 virtual int OperandCount() = 0;
(...skipping 6169 matching lines...) Expand 10 before | Expand all | Expand 10 after
6969 virtual bool IsDeletable() const V8_OVERRIDE { return true; } 6973 virtual bool IsDeletable() const V8_OVERRIDE { return true; }
6970 }; 6974 };
6971 6975
6972 6976
6973 #undef DECLARE_INSTRUCTION 6977 #undef DECLARE_INSTRUCTION
6974 #undef DECLARE_CONCRETE_INSTRUCTION 6978 #undef DECLARE_CONCRETE_INSTRUCTION
6975 6979
6976 } } // namespace v8::internal 6980 } } // namespace v8::internal
6977 6981
6978 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ 6982 #endif // V8_HYDROGEN_INSTRUCTIONS_H_
OLDNEW
« no previous file with comments | « src/hydrogen-alias-analysis.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698