OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |