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

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

Issue 2587593002: Revert of MIPS: Fix bad RegisterConfiguration usage in InstructionSequence unit tests. (Closed)
Patch Set: Created 4 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 | « src/compiler/instruction.h ('k') | test/unittests/compiler/instruction-sequence-unittest.h » ('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 #include "src/compiler/common-operator.h" 5 #include "src/compiler/common-operator.h"
6 #include "src/compiler/graph.h" 6 #include "src/compiler/graph.h"
7 #include "src/compiler/instruction.h" 7 #include "src/compiler/instruction.h"
8 #include "src/compiler/schedule.h" 8 #include "src/compiler/schedule.h"
9 #include "src/compiler/state-values-utils.h" 9 #include "src/compiler/state-values-utils.h"
10 10
11 namespace v8 { 11 namespace v8 {
12 namespace internal { 12 namespace internal {
13 namespace compiler { 13 namespace compiler {
14 14
15 const RegisterConfiguration* (*GetRegConfig)() = 15 const auto GetRegConfig = RegisterConfiguration::Turbofan;
16 RegisterConfiguration::Turbofan;
17 16
18 FlagsCondition CommuteFlagsCondition(FlagsCondition condition) { 17 FlagsCondition CommuteFlagsCondition(FlagsCondition condition) {
19 switch (condition) { 18 switch (condition) {
20 case kSignedLessThan: 19 case kSignedLessThan:
21 return kSignedGreaterThan; 20 return kSignedGreaterThan;
22 case kSignedGreaterThanOrEqual: 21 case kSignedGreaterThanOrEqual:
23 return kSignedLessThanOrEqual; 22 return kSignedLessThanOrEqual;
24 case kSignedLessThanOrEqual: 23 case kSignedLessThanOrEqual:
25 return kSignedGreaterThanOrEqual; 24 return kSignedGreaterThanOrEqual;
26 case kSignedGreaterThan: 25 case kSignedGreaterThan:
(...skipping 948 matching lines...) Expand 10 before | Expand all | Expand 10 after
975 const InstructionBlock* block = InstructionBlockAt(rpo); 974 const InstructionBlock* block = InstructionBlockAt(rpo);
976 CHECK(block->rpo_number() == rpo); 975 CHECK(block->rpo_number() == rpo);
977 PrintableInstructionBlock printable_block = {config, block, this}; 976 PrintableInstructionBlock printable_block = {config, block, this};
978 os << printable_block << std::endl; 977 os << printable_block << std::endl;
979 } 978 }
980 979
981 void InstructionSequence::PrintBlock(int block_id) const { 980 void InstructionSequence::PrintBlock(int block_id) const {
982 PrintBlock(GetRegConfig(), block_id); 981 PrintBlock(GetRegConfig(), block_id);
983 } 982 }
984 983
985 const RegisterConfiguration*
986 InstructionSequence::GetRegisterConfigurationForTesting() {
987 return GetRegConfig();
988 }
989
990 FrameStateDescriptor::FrameStateDescriptor( 984 FrameStateDescriptor::FrameStateDescriptor(
991 Zone* zone, FrameStateType type, BailoutId bailout_id, 985 Zone* zone, FrameStateType type, BailoutId bailout_id,
992 OutputFrameStateCombine state_combine, size_t parameters_count, 986 OutputFrameStateCombine state_combine, size_t parameters_count,
993 size_t locals_count, size_t stack_count, 987 size_t locals_count, size_t stack_count,
994 MaybeHandle<SharedFunctionInfo> shared_info, 988 MaybeHandle<SharedFunctionInfo> shared_info,
995 FrameStateDescriptor* outer_state) 989 FrameStateDescriptor* outer_state)
996 : type_(type), 990 : type_(type),
997 bailout_id_(bailout_id), 991 bailout_id_(bailout_id),
998 frame_state_combine_(state_combine), 992 frame_state_combine_(state_combine),
999 parameters_count_(parameters_count), 993 parameters_count_(parameters_count),
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
1072 for (int i = 0; i < code.InstructionBlockCount(); i++) { 1066 for (int i = 0; i < code.InstructionBlockCount(); i++) {
1073 printable_block.block_ = code.InstructionBlockAt(RpoNumber::FromInt(i)); 1067 printable_block.block_ = code.InstructionBlockAt(RpoNumber::FromInt(i));
1074 os << printable_block; 1068 os << printable_block;
1075 } 1069 }
1076 return os; 1070 return os;
1077 } 1071 }
1078 1072
1079 } // namespace compiler 1073 } // namespace compiler
1080 } // namespace internal 1074 } // namespace internal
1081 } // namespace v8 1075 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/instruction.h ('k') | test/unittests/compiler/instruction-sequence-unittest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698