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

Side by Side Diff: src/compiler/schedule.h

Issue 1811333002: Ensure Schedules generated by the RawMachineAssembler are in edge-split form (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Review feedback Created 4 years, 9 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 | « src/compiler/raw-machine-assembler.cc ('k') | src/compiler/schedule.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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_COMPILER_SCHEDULE_H_ 5 #ifndef V8_COMPILER_SCHEDULE_H_
6 #define V8_COMPILER_SCHEDULE_H_ 6 #define V8_COMPILER_SCHEDULE_H_
7 7
8 #include <iosfwd> 8 #include <iosfwd>
9 9
10 #include "src/zone-containers.h" 10 #include "src/zone-containers.h"
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 236
237 // BasicBlock mutation: insert a switch into the end of {block}. 237 // BasicBlock mutation: insert a switch into the end of {block}.
238 void InsertSwitch(BasicBlock* block, BasicBlock* end, Node* sw, 238 void InsertSwitch(BasicBlock* block, BasicBlock* end, Node* sw,
239 BasicBlock** succ_blocks, size_t succ_count); 239 BasicBlock** succ_blocks, size_t succ_count);
240 240
241 // Exposed publicly for testing only. 241 // Exposed publicly for testing only.
242 void AddSuccessorForTesting(BasicBlock* block, BasicBlock* succ) { 242 void AddSuccessorForTesting(BasicBlock* block, BasicBlock* succ) {
243 return AddSuccessor(block, succ); 243 return AddSuccessor(block, succ);
244 } 244 }
245 245
246 const BasicBlockVector* all_blocks() const { return &all_blocks_; }
246 BasicBlockVector* rpo_order() { return &rpo_order_; } 247 BasicBlockVector* rpo_order() { return &rpo_order_; }
247 const BasicBlockVector* rpo_order() const { return &rpo_order_; } 248 const BasicBlockVector* rpo_order() const { return &rpo_order_; }
248 249
249 BasicBlock* start() { return start_; } 250 BasicBlock* start() { return start_; }
250 BasicBlock* end() { return end_; } 251 BasicBlock* end() { return end_; }
251 252
252 Zone* zone() const { return zone_; } 253 Zone* zone() const { return zone_; }
253 254
254 private: 255 private:
255 friend class Scheduler; 256 friend class Scheduler;
256 friend class BasicBlockInstrumentor; 257 friend class BasicBlockInstrumentor;
258 friend class RawMachineAssembler;
259
260 // Ensure split-edge form for a hand-assembled schedule.
261 void EnsureSplitEdgeForm();
262 // Copy deferred block markers down as far as possible
263 void PropagateDeferredMark();
257 264
258 void AddSuccessor(BasicBlock* block, BasicBlock* succ); 265 void AddSuccessor(BasicBlock* block, BasicBlock* succ);
259 void MoveSuccessors(BasicBlock* from, BasicBlock* to); 266 void MoveSuccessors(BasicBlock* from, BasicBlock* to);
260 267
261 void SetControlInput(BasicBlock* block, Node* node); 268 void SetControlInput(BasicBlock* block, Node* node);
262 void SetBlockForNode(BasicBlock* block, Node* node); 269 void SetBlockForNode(BasicBlock* block, Node* node);
263 270
264 Zone* zone_; 271 Zone* zone_;
265 BasicBlockVector all_blocks_; // All basic blocks in the schedule. 272 BasicBlockVector all_blocks_; // All basic blocks in the schedule.
266 BasicBlockVector nodeid_to_block_; // Map from node to containing block. 273 BasicBlockVector nodeid_to_block_; // Map from node to containing block.
267 BasicBlockVector rpo_order_; // Reverse-post-order block list. 274 BasicBlockVector rpo_order_; // Reverse-post-order block list.
268 BasicBlock* start_; 275 BasicBlock* start_;
269 BasicBlock* end_; 276 BasicBlock* end_;
270 277
271 DISALLOW_COPY_AND_ASSIGN(Schedule); 278 DISALLOW_COPY_AND_ASSIGN(Schedule);
272 }; 279 };
273 280
274 std::ostream& operator<<(std::ostream&, const Schedule&); 281 std::ostream& operator<<(std::ostream&, const Schedule&);
275 282
276 } // namespace compiler 283 } // namespace compiler
277 } // namespace internal 284 } // namespace internal
278 } // namespace v8 285 } // namespace v8
279 286
280 #endif // V8_COMPILER_SCHEDULE_H_ 287 #endif // V8_COMPILER_SCHEDULE_H_
OLDNEW
« no previous file with comments | « src/compiler/raw-machine-assembler.cc ('k') | src/compiler/schedule.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698