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

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

Issue 805263003: [turbofan] move assembly order to InstructionBlock (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 years 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/compiler/instruction.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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_INSTRUCTION_H_ 5 #ifndef V8_COMPILER_INSTRUCTION_H_
6 #define V8_COMPILER_INSTRUCTION_H_ 6 #define V8_COMPILER_INSTRUCTION_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <iosfwd> 9 #include <iosfwd>
10 #include <map> 10 #include <map>
(...skipping 798 matching lines...) Expand 10 before | Expand all | Expand 10 after
809 IntVector operands_; 809 IntVector operands_;
810 InstructionOperand* output_; 810 InstructionOperand* output_;
811 Inputs inputs_; 811 Inputs inputs_;
812 }; 812 };
813 813
814 814
815 // Analogue of BasicBlock for Instructions instead of Nodes. 815 // Analogue of BasicBlock for Instructions instead of Nodes.
816 class InstructionBlock FINAL : public ZoneObject { 816 class InstructionBlock FINAL : public ZoneObject {
817 public: 817 public:
818 InstructionBlock(Zone* zone, BasicBlock::Id id, 818 InstructionBlock(Zone* zone, BasicBlock::Id id,
819 BasicBlock::RpoNumber ao_number,
820 BasicBlock::RpoNumber rpo_number, 819 BasicBlock::RpoNumber rpo_number,
821 BasicBlock::RpoNumber loop_header, 820 BasicBlock::RpoNumber loop_header,
822 BasicBlock::RpoNumber loop_end, bool deferred); 821 BasicBlock::RpoNumber loop_end, bool deferred);
823 822
824 // Instruction indexes (used by the register allocator). 823 // Instruction indexes (used by the register allocator).
825 int first_instruction_index() const { 824 int first_instruction_index() const {
826 DCHECK(code_start_ >= 0); 825 DCHECK(code_start_ >= 0);
827 DCHECK(code_end_ > 0); 826 DCHECK(code_end_ > 0);
828 DCHECK(code_end_ >= code_start_); 827 DCHECK(code_end_ >= code_start_);
829 return code_start_; 828 return code_start_;
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
898 struct PrintableInstructionSequence; 897 struct PrintableInstructionSequence;
899 898
900 899
901 // Represents architecture-specific generated code before, during, and after 900 // Represents architecture-specific generated code before, during, and after
902 // register allocation. 901 // register allocation.
903 // TODO(titzer): s/IsDouble/IsFloat64/ 902 // TODO(titzer): s/IsDouble/IsFloat64/
904 class InstructionSequence FINAL : public ZoneObject { 903 class InstructionSequence FINAL : public ZoneObject {
905 public: 904 public:
906 static InstructionBlocks* InstructionBlocksFor(Zone* zone, 905 static InstructionBlocks* InstructionBlocksFor(Zone* zone,
907 const Schedule* schedule); 906 const Schedule* schedule);
907 // Puts the deferred blocks last.
908 static void ComputeAssemblyOrder(InstructionBlocks* blocks);
908 909
909 InstructionSequence(Zone* zone, InstructionBlocks* instruction_blocks); 910 InstructionSequence(Zone* zone, InstructionBlocks* instruction_blocks);
910 911
911 int NextVirtualRegister() { return next_virtual_register_++; } 912 int NextVirtualRegister() { return next_virtual_register_++; }
912 int VirtualRegisterCount() const { return next_virtual_register_; } 913 int VirtualRegisterCount() const { return next_virtual_register_; }
913 914
914 const InstructionBlocks& instruction_blocks() const { 915 const InstructionBlocks& instruction_blocks() const {
915 return *instruction_blocks_; 916 return *instruction_blocks_;
916 } 917 }
917 918
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
1048 1049
1049 1050
1050 std::ostream& operator<<(std::ostream& os, 1051 std::ostream& operator<<(std::ostream& os,
1051 const PrintableInstructionSequence& code); 1052 const PrintableInstructionSequence& code);
1052 1053
1053 } // namespace compiler 1054 } // namespace compiler
1054 } // namespace internal 1055 } // namespace internal
1055 } // namespace v8 1056 } // namespace v8
1056 1057
1057 #endif // V8_COMPILER_INSTRUCTION_H_ 1058 #endif // V8_COMPILER_INSTRUCTION_H_
OLDNEW
« no previous file with comments | « no previous file | src/compiler/instruction.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698