| OLD | NEW |
| 1 // Copyright 2015 the V8 project authors. All rights reserved. | 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 | 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/compiler/instruction-scheduler.h" | 5 #include "src/compiler/instruction-scheduler.h" |
| 6 | 6 |
| 7 namespace v8 { | 7 namespace v8 { |
| 8 namespace internal { | 8 namespace internal { |
| 9 namespace compiler { | 9 namespace compiler { |
| 10 | 10 |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 case kX64Movsxlq: | 144 case kX64Movsxlq: |
| 145 DCHECK(instr->InputCount() >= 1); | 145 DCHECK(instr->InputCount() >= 1); |
| 146 return instr->InputAt(0)->IsRegister() ? kNoOpcodeFlags | 146 return instr->InputAt(0)->IsRegister() ? kNoOpcodeFlags |
| 147 : kIsLoadOperation; | 147 : kIsLoadOperation; |
| 148 | 148 |
| 149 case kX64Movb: | 149 case kX64Movb: |
| 150 case kX64Movw: | 150 case kX64Movw: |
| 151 return kHasSideEffect; | 151 return kHasSideEffect; |
| 152 | 152 |
| 153 case kX64Movl: | 153 case kX64Movl: |
| 154 case kX64TrapMovl: |
| 154 if (instr->HasOutput()) { | 155 if (instr->HasOutput()) { |
| 155 DCHECK(instr->InputCount() >= 1); | 156 DCHECK(instr->InputCount() >= 1); |
| 156 return instr->InputAt(0)->IsRegister() ? kNoOpcodeFlags | 157 return instr->InputAt(0)->IsRegister() ? kNoOpcodeFlags |
| 157 : kIsLoadOperation; | 158 : kIsLoadOperation; |
| 158 } else { | 159 } else { |
| 159 return kHasSideEffect; | 160 return kHasSideEffect; |
| 160 } | 161 } |
| 161 | 162 |
| 162 case kX64Movq: | 163 case kX64Movq: |
| 163 case kX64Movsd: | 164 case kX64Movsd: |
| (...skipping 25 matching lines...) Expand all Loading... |
| 189 | 190 |
| 190 | 191 |
| 191 int InstructionScheduler::GetInstructionLatency(const Instruction* instr) { | 192 int InstructionScheduler::GetInstructionLatency(const Instruction* instr) { |
| 192 // TODO(all): Add instruction cost modeling. | 193 // TODO(all): Add instruction cost modeling. |
| 193 return 1; | 194 return 1; |
| 194 } | 195 } |
| 195 | 196 |
| 196 } // namespace compiler | 197 } // namespace compiler |
| 197 } // namespace internal | 198 } // namespace internal |
| 198 } // namespace v8 | 199 } // namespace v8 |
| OLD | NEW |