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 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
381 if (m.IsFoldable()) { // K % K => K | 381 if (m.IsFoldable()) { // K % K => K |
382 return ReplaceFloat64(modulo(m.left().Value(), m.right().Value())); | 382 return ReplaceFloat64(modulo(m.left().Value(), m.right().Value())); |
383 } | 383 } |
384 break; | 384 break; |
385 } | 385 } |
386 case IrOpcode::kFloat64Log: { | 386 case IrOpcode::kFloat64Log: { |
387 Float64Matcher m(node->InputAt(0)); | 387 Float64Matcher m(node->InputAt(0)); |
388 if (m.HasValue()) return ReplaceFloat64(base::ieee754::log(m.Value())); | 388 if (m.HasValue()) return ReplaceFloat64(base::ieee754::log(m.Value())); |
389 break; | 389 break; |
390 } | 390 } |
| 391 case IrOpcode::kFloat64Log1p: { |
| 392 Float64Matcher m(node->InputAt(0)); |
| 393 if (m.HasValue()) return ReplaceFloat64(base::ieee754::log1p(m.Value())); |
| 394 break; |
| 395 } |
391 case IrOpcode::kChangeFloat32ToFloat64: { | 396 case IrOpcode::kChangeFloat32ToFloat64: { |
392 Float32Matcher m(node->InputAt(0)); | 397 Float32Matcher m(node->InputAt(0)); |
393 if (m.HasValue()) return ReplaceFloat64(m.Value()); | 398 if (m.HasValue()) return ReplaceFloat64(m.Value()); |
394 break; | 399 break; |
395 } | 400 } |
396 case IrOpcode::kChangeFloat64ToInt32: { | 401 case IrOpcode::kChangeFloat64ToInt32: { |
397 Float64Matcher m(node->InputAt(0)); | 402 Float64Matcher m(node->InputAt(0)); |
398 if (m.HasValue()) return ReplaceInt32(FastD2I(m.Value())); | 403 if (m.HasValue()) return ReplaceInt32(FastD2I(m.Value())); |
399 if (m.IsChangeInt32ToFloat64()) return Replace(m.node()->InputAt(0)); | 404 if (m.IsChangeInt32ToFloat64()) return Replace(m.node()->InputAt(0)); |
400 break; | 405 break; |
(...skipping 677 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1078 MachineOperatorBuilder* MachineOperatorReducer::machine() const { | 1083 MachineOperatorBuilder* MachineOperatorReducer::machine() const { |
1079 return jsgraph()->machine(); | 1084 return jsgraph()->machine(); |
1080 } | 1085 } |
1081 | 1086 |
1082 | 1087 |
1083 Graph* MachineOperatorReducer::graph() const { return jsgraph()->graph(); } | 1088 Graph* MachineOperatorReducer::graph() const { return jsgraph()->graph(); } |
1084 | 1089 |
1085 } // namespace compiler | 1090 } // namespace compiler |
1086 } // namespace internal | 1091 } // namespace internal |
1087 } // namespace v8 | 1092 } // namespace v8 |
OLD | NEW |