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 30 matching lines...) Expand all Loading... |
41 public: | 41 public: |
42 explicit HGlobalValueNumberingPhase(HGraph* graph); | 42 explicit HGlobalValueNumberingPhase(HGraph* graph); |
43 | 43 |
44 void Run() { | 44 void Run() { |
45 Analyze(); | 45 Analyze(); |
46 // Trigger a second analysis pass to further eliminate duplicate values | 46 // Trigger a second analysis pass to further eliminate duplicate values |
47 // that could only be discovered by removing side-effect-generating | 47 // that could only be discovered by removing side-effect-generating |
48 // instructions during the first pass. | 48 // instructions during the first pass. |
49 if (FLAG_smi_only_arrays && removed_side_effects_) { | 49 if (FLAG_smi_only_arrays && removed_side_effects_) { |
50 Analyze(); | 50 Analyze(); |
51 ASSERT(!removed_side_effects_); | 51 // TODO(danno): Turn this into a fixpoint iteration. |
52 } | 52 } |
53 } | 53 } |
54 | 54 |
55 private: | 55 private: |
56 void Analyze(); | 56 void Analyze(); |
57 GVNFlagSet CollectSideEffectsOnPathsToDominatedBlock( | 57 GVNFlagSet CollectSideEffectsOnPathsToDominatedBlock( |
58 HBasicBlock* dominator, | 58 HBasicBlock* dominator, |
59 HBasicBlock* dominated); | 59 HBasicBlock* dominated); |
60 void AnalyzeGraph(); | 60 void AnalyzeGraph(); |
61 void ComputeBlockSideEffects(); | 61 void ComputeBlockSideEffects(); |
(...skipping 18 matching lines...) Expand all Loading... |
80 // dominated. | 80 // dominated. |
81 BitVector visited_on_paths_; | 81 BitVector visited_on_paths_; |
82 | 82 |
83 DISALLOW_COPY_AND_ASSIGN(HGlobalValueNumberingPhase); | 83 DISALLOW_COPY_AND_ASSIGN(HGlobalValueNumberingPhase); |
84 }; | 84 }; |
85 | 85 |
86 | 86 |
87 } } // namespace v8::internal | 87 } } // namespace v8::internal |
88 | 88 |
89 #endif // V8_HYDROGEN_GVN_H_ | 89 #endif // V8_HYDROGEN_GVN_H_ |
OLD | NEW |