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

Side by Side Diff: src/compiler/arm64/instruction-scheduler-arm64.cc

Issue 1375253002: [WIP][turbofan] Instruction scheduler for Turbofan. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "src/compiler/instruction-scheduler.h"
6
7 namespace v8 {
8 namespace internal {
9 namespace compiler {
10
11 int InstructionScheduler::GetInstructionLatency(const Instruction* instr) {
12 // Basic latency modeling for arm64 instructions. They have been determined
13 // in an empirical way.
14 switch (instr->arch_opcode()) {
15 case kArm64Float32ToFloat64:
16 case kArm64Float64ToFloat32:
17 case kArm64Float64ToInt32:
18 case kArm64Float64ToUint32:
19 case kArm64Int32ToFloat64:
20 case kArm64Uint32ToFloat64:
21 return 3;
22
23 case kArm64Float64Add:
24 case kArm64Float64Sub:
25 return 2;
26
27 case kArm64Float64Mul:
28 return 3;
29
30 case kArm64Float64Div:
31 return 6;
32
33 case kArm64Lsl:
34 case kArm64Lsl32:
35 case kArm64Lsr:
36 case kArm64Lsr32:
37 case kArm64Asr:
38 case kArm64Asr32:
39 case kArm64Ror:
40 case kArm64Ror32:
41 return 3;
42
43 case kCheckedLoadInt8:
44 case kCheckedLoadUint8:
45 case kCheckedLoadInt16:
46 case kCheckedLoadUint16:
47 case kCheckedLoadWord32:
48 case kCheckedLoadWord64:
49 case kCheckedLoadFloat32:
50 case kCheckedLoadFloat64:
51 case kArm64LdrS:
52 case kArm64LdrD:
53 case kArm64Ldrb:
54 case kArm64Ldrsb:
55 case kArm64Ldrh:
56 case kArm64Ldrsh:
57 case kArm64LdrW:
58 case kArm64Ldr:
59 return 5;
60
61 default:
62 return 1;
63 }
64 }
65
66 } // namespace compiler
67 } // namespace internal
68 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698