OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 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 bool InstructionScheduler::SchedulerSupported() { return true; } |
| 12 |
| 13 |
| 14 int InstructionScheduler::GetTargetInstructionFlags( |
| 15 const Instruction* instr) const { |
| 16 switch (instr->arch_opcode()) { |
| 17 case kArmAdd: |
| 18 case kArmAnd: |
| 19 case kArmBic: |
| 20 case kArmClz: |
| 21 case kArmCmp: |
| 22 case kArmCmn: |
| 23 case kArmTst: |
| 24 case kArmTeq: |
| 25 case kArmOrr: |
| 26 case kArmEor: |
| 27 case kArmSub: |
| 28 case kArmRsb: |
| 29 case kArmMul: |
| 30 case kArmMla: |
| 31 case kArmMls: |
| 32 case kArmSmmul: |
| 33 case kArmSmmla: |
| 34 case kArmUmull: |
| 35 case kArmSdiv: |
| 36 case kArmUdiv: |
| 37 case kArmMov: |
| 38 case kArmMvn: |
| 39 case kArmBfc: |
| 40 case kArmUbfx: |
| 41 case kArmSxtb: |
| 42 case kArmSxth: |
| 43 case kArmSxtab: |
| 44 case kArmSxtah: |
| 45 case kArmUxtb: |
| 46 case kArmUxth: |
| 47 case kArmUxtab: |
| 48 case kArmUxtah: |
| 49 case kArmVcmpF32: |
| 50 case kArmVaddF32: |
| 51 case kArmVsubF32: |
| 52 case kArmVmulF32: |
| 53 case kArmVmlaF32: |
| 54 case kArmVmlsF32: |
| 55 case kArmVdivF32: |
| 56 case kArmVabsF32: |
| 57 case kArmVnegF32: |
| 58 case kArmVsqrtF32: |
| 59 case kArmVcmpF64: |
| 60 case kArmVaddF64: |
| 61 case kArmVsubF64: |
| 62 case kArmVmulF64: |
| 63 case kArmVmlaF64: |
| 64 case kArmVmlsF64: |
| 65 case kArmVdivF64: |
| 66 case kArmVmodF64: |
| 67 case kArmVabsF64: |
| 68 case kArmVnegF64: |
| 69 case kArmVsqrtF64: |
| 70 case kArmVrintmF32: |
| 71 case kArmVrintmF64: |
| 72 case kArmVrintpF32: |
| 73 case kArmVrintpF64: |
| 74 case kArmVrintzF32: |
| 75 case kArmVrintzF64: |
| 76 case kArmVrintaF64: |
| 77 case kArmVrintnF32: |
| 78 case kArmVrintnF64: |
| 79 case kArmVcvtF32F64: |
| 80 case kArmVcvtF64F32: |
| 81 case kArmVcvtF64S32: |
| 82 case kArmVcvtF64U32: |
| 83 case kArmVcvtS32F64: |
| 84 case kArmVcvtU32F64: |
| 85 case kArmVmovLowU32F64: |
| 86 case kArmVmovLowF64U32: |
| 87 case kArmVmovHighU32F64: |
| 88 case kArmVmovHighF64U32: |
| 89 case kArmVmovF64U32U32: |
| 90 return kNoOpcodeFlags; |
| 91 |
| 92 case kArmVldrF32: |
| 93 case kArmVldrF64: |
| 94 case kArmLdrb: |
| 95 case kArmLdrsb: |
| 96 case kArmLdrh: |
| 97 case kArmLdrsh: |
| 98 case kArmLdr: |
| 99 return kIsLoadOperation; |
| 100 |
| 101 case kArmVstrF32: |
| 102 case kArmVstrF64: |
| 103 case kArmStrb: |
| 104 case kArmStrh: |
| 105 case kArmStr: |
| 106 case kArmPush: |
| 107 case kArmPoke: |
| 108 return kHasSideEffect; |
| 109 |
| 110 #define CASE(Name) case k##Name: |
| 111 COMMON_ARCH_OPCODE_LIST(CASE) |
| 112 #undef CASE |
| 113 // Already covered in architecture independent code. |
| 114 UNREACHABLE(); |
| 115 } |
| 116 } |
| 117 |
| 118 |
| 119 int InstructionScheduler::GetInstructionLatency(const Instruction* instr) { |
| 120 // TODO(all): Add instruction cost modeling. |
| 121 return 1; |
| 122 } |
| 123 |
| 124 } // namespace compiler |
| 125 } // namespace internal |
| 126 } // namespace v8 |
OLD | NEW |