| 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/compiler/machine-operator-reducer.h" | 5 #include "src/compiler/machine-operator-reducer.h" |
| 6 | 6 |
| 7 #include "src/base/bits.h" | 7 #include "src/base/bits.h" |
| 8 #include "src/base/division-by-constant.h" | 8 #include "src/base/division-by-constant.h" |
| 9 #include "src/base/ieee754.h" | 9 #include "src/base/ieee754.h" |
| 10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
| (...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 405 case IrOpcode::kFloat64Log: { | 405 case IrOpcode::kFloat64Log: { |
| 406 Float64Matcher m(node->InputAt(0)); | 406 Float64Matcher m(node->InputAt(0)); |
| 407 if (m.HasValue()) return ReplaceFloat64(base::ieee754::log(m.Value())); | 407 if (m.HasValue()) return ReplaceFloat64(base::ieee754::log(m.Value())); |
| 408 break; | 408 break; |
| 409 } | 409 } |
| 410 case IrOpcode::kFloat64Log1p: { | 410 case IrOpcode::kFloat64Log1p: { |
| 411 Float64Matcher m(node->InputAt(0)); | 411 Float64Matcher m(node->InputAt(0)); |
| 412 if (m.HasValue()) return ReplaceFloat64(base::ieee754::log1p(m.Value())); | 412 if (m.HasValue()) return ReplaceFloat64(base::ieee754::log1p(m.Value())); |
| 413 break; | 413 break; |
| 414 } | 414 } |
| 415 case IrOpcode::kFloat64Log2: { |
| 416 Float64Matcher m(node->InputAt(0)); |
| 417 if (m.HasValue()) return ReplaceFloat64(base::ieee754::log2(m.Value())); |
| 418 break; |
| 419 } |
| 420 case IrOpcode::kFloat64Log10: { |
| 421 Float64Matcher m(node->InputAt(0)); |
| 422 if (m.HasValue()) return ReplaceFloat64(base::ieee754::log10(m.Value())); |
| 423 break; |
| 424 } |
| 415 case IrOpcode::kChangeFloat32ToFloat64: { | 425 case IrOpcode::kChangeFloat32ToFloat64: { |
| 416 Float32Matcher m(node->InputAt(0)); | 426 Float32Matcher m(node->InputAt(0)); |
| 417 if (m.HasValue()) return ReplaceFloat64(m.Value()); | 427 if (m.HasValue()) return ReplaceFloat64(m.Value()); |
| 418 break; | 428 break; |
| 419 } | 429 } |
| 420 case IrOpcode::kChangeFloat64ToInt32: { | 430 case IrOpcode::kChangeFloat64ToInt32: { |
| 421 Float64Matcher m(node->InputAt(0)); | 431 Float64Matcher m(node->InputAt(0)); |
| 422 if (m.HasValue()) return ReplaceInt32(FastD2I(m.Value())); | 432 if (m.HasValue()) return ReplaceInt32(FastD2I(m.Value())); |
| 423 if (m.IsChangeInt32ToFloat64()) return Replace(m.node()->InputAt(0)); | 433 if (m.IsChangeInt32ToFloat64()) return Replace(m.node()->InputAt(0)); |
| 424 break; | 434 break; |
| (...skipping 677 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1102 MachineOperatorBuilder* MachineOperatorReducer::machine() const { | 1112 MachineOperatorBuilder* MachineOperatorReducer::machine() const { |
| 1103 return jsgraph()->machine(); | 1113 return jsgraph()->machine(); |
| 1104 } | 1114 } |
| 1105 | 1115 |
| 1106 | 1116 |
| 1107 Graph* MachineOperatorReducer::graph() const { return jsgraph()->graph(); } | 1117 Graph* MachineOperatorReducer::graph() const { return jsgraph()->graph(); } |
| 1108 | 1118 |
| 1109 } // namespace compiler | 1119 } // namespace compiler |
| 1110 } // namespace internal | 1120 } // namespace internal |
| 1111 } // namespace v8 | 1121 } // namespace v8 |
| OLD | NEW |