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

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

Issue 671703003: Fix off-by-one bug in TurboFan register allocator. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | src/compiler/register-allocator.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 844 matching lines...) Expand 10 before | Expand all | Expand 10 after
855 int node_count() const { return static_cast<int>(node_map_.size()); } 855 int node_count() const { return static_cast<int>(node_map_.size()); }
856 856
857 int InstructionBlockCount() const { 857 int InstructionBlockCount() const {
858 return static_cast<int>(instruction_blocks_.size()); 858 return static_cast<int>(instruction_blocks_.size());
859 } 859 }
860 860
861 InstructionBlock* InstructionBlockAt(BasicBlock::RpoNumber rpo_number) { 861 InstructionBlock* InstructionBlockAt(BasicBlock::RpoNumber rpo_number) {
862 return instruction_blocks_[rpo_number.ToSize()]; 862 return instruction_blocks_[rpo_number.ToSize()];
863 } 863 }
864 864
865 int LastLoopInstructionIndex(const InstructionBlock* block) {
866 return instruction_blocks_[block->loop_end().ToSize() - 1]
867 ->last_instruction_index();
868 }
869
865 const InstructionBlock* InstructionBlockAt( 870 const InstructionBlock* InstructionBlockAt(
866 BasicBlock::RpoNumber rpo_number) const { 871 BasicBlock::RpoNumber rpo_number) const {
867 return instruction_blocks_[rpo_number.ToSize()]; 872 return instruction_blocks_[rpo_number.ToSize()];
868 } 873 }
869 874
870 const InstructionBlock* GetInstructionBlock(int instruction_index) const; 875 const InstructionBlock* GetInstructionBlock(int instruction_index) const;
871 876
872 int GetVirtualRegister(const Node* node); 877 int GetVirtualRegister(const Node* node);
873 const NodeToVregMap& GetNodeMapForTesting() const { return node_map_; } 878 const NodeToVregMap& GetNodeMapForTesting() const { return node_map_; }
874 879
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
966 DeoptimizationVector deoptimization_entries_; 971 DeoptimizationVector deoptimization_entries_;
967 }; 972 };
968 973
969 std::ostream& operator<<(std::ostream& os, const InstructionSequence& code); 974 std::ostream& operator<<(std::ostream& os, const InstructionSequence& code);
970 975
971 } // namespace compiler 976 } // namespace compiler
972 } // namespace internal 977 } // namespace internal
973 } // namespace v8 978 } // namespace v8
974 979
975 #endif // V8_COMPILER_INSTRUCTION_H_ 980 #endif // V8_COMPILER_INSTRUCTION_H_
OLDNEW
« no previous file with comments | « no previous file | src/compiler/register-allocator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698