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

Side by Side Diff: src/compiler/simplified-lowering.cc

Issue 1021183002: [turbofan] Turn Math.clz32 into an inlinable builtin. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 9 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
« no previous file with comments | « src/compiler/raw-machine-assembler.h ('k') | src/compiler/typer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/simplified-lowering.h" 5 #include "src/compiler/simplified-lowering.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/code-factory.h" 10 #include "src/code-factory.h"
(...skipping 921 matching lines...) Expand 10 before | Expand all | Expand 10 after
932 case IrOpcode::kWord32Xor: 932 case IrOpcode::kWord32Xor:
933 case IrOpcode::kWord32Shl: 933 case IrOpcode::kWord32Shl:
934 case IrOpcode::kWord32Sar: 934 case IrOpcode::kWord32Sar:
935 // We use signed int32 as the output type for these word32 operations, 935 // We use signed int32 as the output type for these word32 operations,
936 // though the machine bits are the same for either signed or unsigned, 936 // though the machine bits are the same for either signed or unsigned,
937 // because JavaScript considers the result from these operations signed. 937 // because JavaScript considers the result from these operations signed.
938 return VisitBinop(node, kRepWord32, kRepWord32 | kTypeInt32); 938 return VisitBinop(node, kRepWord32, kRepWord32 | kTypeInt32);
939 case IrOpcode::kWord32Equal: 939 case IrOpcode::kWord32Equal:
940 return VisitBinop(node, kRepWord32, kRepBit); 940 return VisitBinop(node, kRepWord32, kRepBit);
941 941
942 case IrOpcode::kWord32Clz:
943 return VisitUnop(node, kMachUint32, kMachUint32);
944
942 case IrOpcode::kInt32Add: 945 case IrOpcode::kInt32Add:
943 case IrOpcode::kInt32Sub: 946 case IrOpcode::kInt32Sub:
944 case IrOpcode::kInt32Mul: 947 case IrOpcode::kInt32Mul:
945 case IrOpcode::kInt32MulHigh: 948 case IrOpcode::kInt32MulHigh:
946 case IrOpcode::kInt32Div: 949 case IrOpcode::kInt32Div:
947 case IrOpcode::kInt32Mod: 950 case IrOpcode::kInt32Mod:
948 return VisitInt32Binop(node); 951 return VisitInt32Binop(node);
949 case IrOpcode::kUint32Div: 952 case IrOpcode::kUint32Div:
950 case IrOpcode::kUint32Mod: 953 case IrOpcode::kUint32Mod:
951 case IrOpcode::kUint32MulHigh: 954 case IrOpcode::kUint32MulHigh:
(...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after
1592 1595
1593 void SimplifiedLowering::DoStringLessThanOrEqual(Node* node) { 1596 void SimplifiedLowering::DoStringLessThanOrEqual(Node* node) {
1594 node->set_op(machine()->IntLessThanOrEqual()); 1597 node->set_op(machine()->IntLessThanOrEqual());
1595 node->ReplaceInput(0, StringComparison(node, true)); 1598 node->ReplaceInput(0, StringComparison(node, true));
1596 node->ReplaceInput(1, jsgraph()->SmiConstant(EQUAL)); 1599 node->ReplaceInput(1, jsgraph()->SmiConstant(EQUAL));
1597 } 1600 }
1598 1601
1599 } // namespace compiler 1602 } // namespace compiler
1600 } // namespace internal 1603 } // namespace internal
1601 } // namespace v8 1604 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/raw-machine-assembler.h ('k') | src/compiler/typer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698