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

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

Issue 1158563008: [turbofan] Introduce prediction for exception handlers. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Architecture ports. Created 5 years, 6 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
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/adapters.h" 5 #include "src/base/adapters.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 #include "src/compiler/node-properties.h" 8 #include "src/compiler/node-properties.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 1443 matching lines...) Expand 10 before | Expand all | Expand 10 after
1454 1454
1455 // Push any stack arguments. 1455 // Push any stack arguments.
1456 // TODO(mbrandy): reverse order and use push only for first 1456 // TODO(mbrandy): reverse order and use push only for first
1457 for (Node* node : base::Reversed(buffer.pushed_nodes)) { 1457 for (Node* node : base::Reversed(buffer.pushed_nodes)) {
1458 Emit(kPPC_Push, g.NoOutput(), g.UseRegister(node)); 1458 Emit(kPPC_Push, g.NoOutput(), g.UseRegister(node));
1459 } 1459 }
1460 1460
1461 // Pass label of exception handler block. 1461 // Pass label of exception handler block.
1462 CallDescriptor::Flags flags = descriptor->flags(); 1462 CallDescriptor::Flags flags = descriptor->flags();
1463 if (handler) { 1463 if (handler) {
1464 DCHECK_EQ(IrOpcode::kIfException, handler->front()->opcode());
1465 IfExceptionHint hint = OpParameter<IfExceptionHint>(handler->front());
1466 if (hint == IfExceptionHint::kLocallyCaught) {
1467 flags |= CallDescriptor::kHasLocalCatchHandler;
1468 }
1464 flags |= CallDescriptor::kHasExceptionHandler; 1469 flags |= CallDescriptor::kHasExceptionHandler;
1465 buffer.instruction_args.push_back(g.Label(handler)); 1470 buffer.instruction_args.push_back(g.Label(handler));
1466 } 1471 }
1467 1472
1468 // Select the appropriate opcode based on the call type. 1473 // Select the appropriate opcode based on the call type.
1469 InstructionCode opcode; 1474 InstructionCode opcode;
1470 switch (descriptor->kind()) { 1475 switch (descriptor->kind()) {
1471 case CallDescriptor::kCallCodeObject: { 1476 case CallDescriptor::kCallCodeObject: {
1472 opcode = kArchCallCodeObject; 1477 opcode = kArchCallCodeObject;
1473 break; 1478 break;
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
1629 MachineOperatorBuilder::kFloat64Min | 1634 MachineOperatorBuilder::kFloat64Min |
1630 MachineOperatorBuilder::kFloat64RoundDown | 1635 MachineOperatorBuilder::kFloat64RoundDown |
1631 MachineOperatorBuilder::kFloat64RoundTruncate | 1636 MachineOperatorBuilder::kFloat64RoundTruncate |
1632 MachineOperatorBuilder::kFloat64RoundTiesAway; 1637 MachineOperatorBuilder::kFloat64RoundTiesAway;
1633 // We omit kWord32ShiftIsSafe as s[rl]w use 0x3f as a mask rather than 0x1f. 1638 // We omit kWord32ShiftIsSafe as s[rl]w use 0x3f as a mask rather than 0x1f.
1634 } 1639 }
1635 1640
1636 } // namespace compiler 1641 } // namespace compiler
1637 } // namespace internal 1642 } // namespace internal
1638 } // namespace v8 1643 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/mips64/instruction-selector-mips64.cc ('k') | src/compiler/x64/instruction-selector-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698