| OLD | NEW |
| 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 810 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 821 // it will deoptimize if result does not fit into signed integer range. | 821 // it will deoptimize if result does not fit into signed integer range. |
| 822 // HGraph::ComputeSafeUint32Operations is responsible for setting this | 822 // HGraph::ComputeSafeUint32Operations is responsible for setting this |
| 823 // flag. | 823 // flag. |
| 824 kUint32, | 824 kUint32, |
| 825 // If a phi is involved in the evaluation of a numeric constraint the | 825 // If a phi is involved in the evaluation of a numeric constraint the |
| 826 // recursion can cause an endless cycle: we use this flag to exit the loop. | 826 // recursion can cause an endless cycle: we use this flag to exit the loop. |
| 827 kNumericConstraintEvaluationInProgress, | 827 kNumericConstraintEvaluationInProgress, |
| 828 // This flag is set to true after the SetupInformativeDefinitions() pass | 828 // This flag is set to true after the SetupInformativeDefinitions() pass |
| 829 // has processed this instruction. | 829 // has processed this instruction. |
| 830 kIDefsProcessingDone, | 830 kIDefsProcessingDone, |
| 831 kHasNoObservableSideEffects, |
| 831 kLastFlag = kIDefsProcessingDone | 832 kLastFlag = kIDefsProcessingDone |
| 832 }; | 833 }; |
| 833 | 834 |
| 834 STATIC_ASSERT(kLastFlag < kBitsPerInt); | 835 STATIC_ASSERT(kLastFlag < kBitsPerInt); |
| 835 | 836 |
| 836 static const int kChangesToDependsFlagsLeftShift = 1; | 837 static const int kChangesToDependsFlagsLeftShift = 1; |
| 837 | 838 |
| 838 static GVNFlag ChangesFlagFromInt(int x) { | 839 static GVNFlag ChangesFlagFromInt(int x) { |
| 839 return static_cast<GVNFlag>(x * 2); | 840 return static_cast<GVNFlag>(x * 2); |
| 840 } | 841 } |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 998 void ClearGVNFlag(GVNFlag f) { gvn_flags_.Remove(f); } | 999 void ClearGVNFlag(GVNFlag f) { gvn_flags_.Remove(f); } |
| 999 bool CheckGVNFlag(GVNFlag f) const { return gvn_flags_.Contains(f); } | 1000 bool CheckGVNFlag(GVNFlag f) const { return gvn_flags_.Contains(f); } |
| 1000 void SetAllSideEffects() { gvn_flags_.Add(AllSideEffectsFlagSet()); } | 1001 void SetAllSideEffects() { gvn_flags_.Add(AllSideEffectsFlagSet()); } |
| 1001 void ClearAllSideEffects() { | 1002 void ClearAllSideEffects() { |
| 1002 gvn_flags_.Remove(AllSideEffectsFlagSet()); | 1003 gvn_flags_.Remove(AllSideEffectsFlagSet()); |
| 1003 } | 1004 } |
| 1004 bool HasSideEffects() const { | 1005 bool HasSideEffects() const { |
| 1005 return gvn_flags_.ContainsAnyOf(AllSideEffectsFlagSet()); | 1006 return gvn_flags_.ContainsAnyOf(AllSideEffectsFlagSet()); |
| 1006 } | 1007 } |
| 1007 bool HasObservableSideEffects() const { | 1008 bool HasObservableSideEffects() const { |
| 1008 return gvn_flags_.ContainsAnyOf(AllObservableSideEffectsFlagSet()); | 1009 return !CheckFlag(kHasNoObservableSideEffects) && |
| 1010 gvn_flags_.ContainsAnyOf(AllObservableSideEffectsFlagSet()); |
| 1009 } | 1011 } |
| 1010 | 1012 |
| 1011 GVNFlagSet DependsOnFlags() const { | 1013 GVNFlagSet DependsOnFlags() const { |
| 1012 GVNFlagSet result = gvn_flags_; | 1014 GVNFlagSet result = gvn_flags_; |
| 1013 result.Intersect(AllDependsOnFlagSet()); | 1015 result.Intersect(AllDependsOnFlagSet()); |
| 1014 return result; | 1016 return result; |
| 1015 } | 1017 } |
| 1016 | 1018 |
| 1017 GVNFlagSet SideEffectFlags() const { | 1019 GVNFlagSet SideEffectFlags() const { |
| 1018 GVNFlagSet result = gvn_flags_; | 1020 GVNFlagSet result = gvn_flags_; |
| (...skipping 5411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6430 virtual bool IsDeletable() const { return true; } | 6432 virtual bool IsDeletable() const { return true; } |
| 6431 }; | 6433 }; |
| 6432 | 6434 |
| 6433 | 6435 |
| 6434 #undef DECLARE_INSTRUCTION | 6436 #undef DECLARE_INSTRUCTION |
| 6435 #undef DECLARE_CONCRETE_INSTRUCTION | 6437 #undef DECLARE_CONCRETE_INSTRUCTION |
| 6436 | 6438 |
| 6437 } } // namespace v8::internal | 6439 } } // namespace v8::internal |
| 6438 | 6440 |
| 6439 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 6441 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
| OLD | NEW |