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

Side by Side Diff: src/compiler/arm/instruction-selector-arm.cc

Issue 745633002: [turbofan] Clean up and factor out branch generation logic. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix IA32 fall through. Created 6 years, 1 month 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/arm/code-generator-arm.cc ('k') | src/compiler/arm64/code-generator-arm64.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 #include "src/base/bits.h" 5 #include "src/base/bits.h"
6 #include "src/compiler/instruction-selector-impl.h" 6 #include "src/compiler/instruction-selector-impl.h"
7 #include "src/compiler/node-matchers.h" 7 #include "src/compiler/node-matchers.h"
8 8
9 namespace v8 { 9 namespace v8 {
10 namespace internal { 10 namespace internal {
(...skipping 1152 matching lines...) Expand 10 before | Expand all | Expand 10 after
1163 value_operand); 1163 value_operand);
1164 } 1164 }
1165 } 1165 }
1166 1166
1167 } // namespace 1167 } // namespace
1168 1168
1169 1169
1170 void InstructionSelector::VisitBranch(Node* branch, BasicBlock* tbranch, 1170 void InstructionSelector::VisitBranch(Node* branch, BasicBlock* tbranch,
1171 BasicBlock* fbranch) { 1171 BasicBlock* fbranch) {
1172 FlagsContinuation cont(kNotEqual, tbranch, fbranch); 1172 FlagsContinuation cont(kNotEqual, tbranch, fbranch);
1173 if (IsNextInAssemblyOrder(tbranch)) { // We can fallthru to the true block.
1174 cont.Negate();
1175 cont.SwapBlocks();
1176 }
1177 VisitWordCompareZero(this, branch, branch->InputAt(0), &cont); 1173 VisitWordCompareZero(this, branch, branch->InputAt(0), &cont);
1178 } 1174 }
1179 1175
1180 1176
1181 void InstructionSelector::VisitWord32Equal(Node* const node) { 1177 void InstructionSelector::VisitWord32Equal(Node* const node) {
1182 FlagsContinuation cont(kEqual, node); 1178 FlagsContinuation cont(kEqual, node);
1183 Int32BinopMatcher m(node); 1179 Int32BinopMatcher m(node);
1184 if (m.right().Is(0)) { 1180 if (m.right().Is(0)) {
1185 return VisitWordCompareZero(this, m.node(), m.left().node(), &cont); 1181 return VisitWordCompareZero(this, m.node(), m.left().node(), &cont);
1186 } 1182 }
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
1262 MachineOperatorBuilder::kFloat64Ceil | 1258 MachineOperatorBuilder::kFloat64Ceil |
1263 MachineOperatorBuilder::kFloat64RoundTruncate | 1259 MachineOperatorBuilder::kFloat64RoundTruncate |
1264 MachineOperatorBuilder::kFloat64RoundTiesAway; 1260 MachineOperatorBuilder::kFloat64RoundTiesAway;
1265 } 1261 }
1266 return flags; 1262 return flags;
1267 } 1263 }
1268 1264
1269 } // namespace compiler 1265 } // namespace compiler
1270 } // namespace internal 1266 } // namespace internal
1271 } // namespace v8 1267 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/arm/code-generator-arm.cc ('k') | src/compiler/arm64/code-generator-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698