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

Side by Side Diff: src/hydrogen.h

Issue 295543002: Perform block ordering in-place. (Closed) Base URL: git@github.com:v8/v8.git@master
Patch Set: Created 6 years, 7 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
« no previous file with comments | « no previous file | src/hydrogen.cc » ('j') | 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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_HYDROGEN_H_ 5 #ifndef V8_HYDROGEN_H_
6 #define V8_HYDROGEN_H_ 6 #define V8_HYDROGEN_H_
7 7
8 #include "v8.h" 8 #include "v8.h"
9 9
10 #include "accessors.h" 10 #include "accessors.h"
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 bool IsUnreachable() const { return !is_reachable_; } 144 bool IsUnreachable() const { return !is_reachable_; }
145 bool IsReachable() const { return is_reachable_; } 145 bool IsReachable() const { return is_reachable_; }
146 146
147 bool IsLoopSuccessorDominator() const { 147 bool IsLoopSuccessorDominator() const {
148 return dominates_loop_successors_; 148 return dominates_loop_successors_;
149 } 149 }
150 void MarkAsLoopSuccessorDominator() { 150 void MarkAsLoopSuccessorDominator() {
151 dominates_loop_successors_ = true; 151 dominates_loop_successors_ = true;
152 } 152 }
153 153
154 bool IsOrdered() const { return is_ordered_; }
155 void MarkAsOrdered() { is_ordered_ = true; }
156
154 void MarkSuccEdgeUnreachable(int succ); 157 void MarkSuccEdgeUnreachable(int succ);
155 158
156 inline Zone* zone() const; 159 inline Zone* zone() const;
157 160
158 #ifdef DEBUG 161 #ifdef DEBUG
159 void Verify(); 162 void Verify();
160 #endif 163 #endif
161 164
162 protected: 165 protected:
163 friend class HGraphBuilder; 166 friend class HGraphBuilder;
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 int first_instruction_index_; 203 int first_instruction_index_;
201 int last_instruction_index_; 204 int last_instruction_index_;
202 ZoneList<int> deleted_phis_; 205 ZoneList<int> deleted_phis_;
203 HBasicBlock* parent_loop_header_; 206 HBasicBlock* parent_loop_header_;
204 // For blocks marked as inline return target: the block with HEnterInlined. 207 // For blocks marked as inline return target: the block with HEnterInlined.
205 HBasicBlock* inlined_entry_block_; 208 HBasicBlock* inlined_entry_block_;
206 bool is_inline_return_target_ : 1; 209 bool is_inline_return_target_ : 1;
207 bool is_reachable_ : 1; 210 bool is_reachable_ : 1;
208 bool dominates_loop_successors_ : 1; 211 bool dominates_loop_successors_ : 1;
209 bool is_osr_entry_ : 1; 212 bool is_osr_entry_ : 1;
213 bool is_ordered_ : 1;
210 }; 214 };
211 215
212 216
213 class HPredecessorIterator V8_FINAL BASE_EMBEDDED { 217 class HPredecessorIterator V8_FINAL BASE_EMBEDDED {
214 public: 218 public:
215 explicit HPredecessorIterator(HBasicBlock* block) 219 explicit HPredecessorIterator(HBasicBlock* block)
216 : predecessor_list_(block->predecessors()), current_(0) { } 220 : predecessor_list_(block->predecessors()), current_(0) { }
217 221
218 bool Done() { return current_ >= predecessor_list_->length(); } 222 bool Done() { return current_ >= predecessor_list_->length(); }
219 HBasicBlock* Current() { return predecessor_list_->at(current_); } 223 HBasicBlock* Current() { return predecessor_list_->at(current_); }
(...skipping 2581 matching lines...) Expand 10 before | Expand all | Expand 10 after
2801 } 2805 }
2802 2806
2803 private: 2807 private:
2804 HGraphBuilder* builder_; 2808 HGraphBuilder* builder_;
2805 }; 2809 };
2806 2810
2807 2811
2808 } } // namespace v8::internal 2812 } } // namespace v8::internal
2809 2813
2810 #endif // V8_HYDROGEN_H_ 2814 #endif // V8_HYDROGEN_H_
OLDNEW
« no previous file with comments | « no previous file | src/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698