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

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

Issue 1513383003: [turbofan] Store nodes use only MachineRepresentation, not MachineType. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: please mips64 Created 5 years 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/wasm-compiler.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 1092 matching lines...) Expand 10 before | Expand all | Expand 10 after
1103 ProcessRemainingInputs(node, 2); 1103 ProcessRemainingInputs(node, 2);
1104 SetOutput(node, rep); 1104 SetOutput(node, rep);
1105 break; 1105 break;
1106 } 1106 }
1107 case IrOpcode::kStore: { 1107 case IrOpcode::kStore: {
1108 // TODO(jarin) Eventually, we should get rid of all machine stores 1108 // TODO(jarin) Eventually, we should get rid of all machine stores
1109 // from the high-level phases, then this becomes UNREACHABLE. 1109 // from the high-level phases, then this becomes UNREACHABLE.
1110 StoreRepresentation rep = StoreRepresentationOf(node->op()); 1110 StoreRepresentation rep = StoreRepresentationOf(node->op());
1111 ProcessInput(node, 0, UseInfo::AnyTagged()); // tagged pointer 1111 ProcessInput(node, 0, UseInfo::AnyTagged()); // tagged pointer
1112 ProcessInput(node, 1, UseInfo::PointerInt()); // index 1112 ProcessInput(node, 1, UseInfo::PointerInt()); // index
1113 ProcessInput(node, 2, TruncatingUseInfoFromRepresentation( 1113 ProcessInput(node, 2,
1114 rep.machine_type().representation())); 1114 TruncatingUseInfoFromRepresentation(rep.representation()));
1115 ProcessRemainingInputs(node, 3); 1115 ProcessRemainingInputs(node, 3);
1116 SetOutput(node, MachineType::None()); 1116 SetOutput(node, MachineType::None());
1117 break; 1117 break;
1118 } 1118 }
1119 case IrOpcode::kWord32Shr: 1119 case IrOpcode::kWord32Shr:
1120 // We output unsigned int32 for shift right because JavaScript. 1120 // We output unsigned int32 for shift right because JavaScript.
1121 return VisitBinop(node, UseInfo::TruncatingWord32(), 1121 return VisitBinop(node, UseInfo::TruncatingWord32(),
1122 MachineType::Uint32()); 1122 MachineType::Uint32());
1123 case IrOpcode::kWord32And: 1123 case IrOpcode::kWord32And:
1124 case IrOpcode::kWord32Or: 1124 case IrOpcode::kWord32Or:
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
1403 NodeProperties::ChangeOp(node, 1403 NodeProperties::ChangeOp(node,
1404 common()->Phi(output_type.representation(), 2)); 1404 common()->Phi(output_type.representation(), 2));
1405 } else { 1405 } else {
1406 NodeProperties::ChangeOp(node, machine()->CheckedLoad(type)); 1406 NodeProperties::ChangeOp(node, machine()->CheckedLoad(type));
1407 } 1407 }
1408 } 1408 }
1409 1409
1410 1410
1411 void SimplifiedLowering::DoStoreBuffer(Node* node) { 1411 void SimplifiedLowering::DoStoreBuffer(Node* node) {
1412 DCHECK_EQ(IrOpcode::kStoreBuffer, node->opcode()); 1412 DCHECK_EQ(IrOpcode::kStoreBuffer, node->opcode());
1413 MachineType const type = BufferAccessOf(node->op()).machine_type(); 1413 MachineRepresentation const rep =
1414 NodeProperties::ChangeOp(node, machine()->CheckedStore(type)); 1414 BufferAccessOf(node->op()).machine_type().representation();
1415 NodeProperties::ChangeOp(node, machine()->CheckedStore(rep));
1415 } 1416 }
1416 1417
1417 1418
1418 void SimplifiedLowering::DoObjectIsNumber(Node* node) { 1419 void SimplifiedLowering::DoObjectIsNumber(Node* node) {
1419 Node* input = NodeProperties::GetValueInput(node, 0); 1420 Node* input = NodeProperties::GetValueInput(node, 0);
1420 // TODO(bmeurer): Optimize somewhat based on input type. 1421 // TODO(bmeurer): Optimize somewhat based on input type.
1421 Node* check = 1422 Node* check =
1422 graph()->NewNode(machine()->WordEqual(), 1423 graph()->NewNode(machine()->WordEqual(),
1423 graph()->NewNode(machine()->WordAnd(), input, 1424 graph()->NewNode(machine()->WordAnd(), input,
1424 jsgraph()->IntPtrConstant(kSmiTagMask)), 1425 jsgraph()->IntPtrConstant(kSmiTagMask)),
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
1771 ReplaceEffectUses(node, comparison); 1772 ReplaceEffectUses(node, comparison);
1772 node->ReplaceInput(0, comparison); 1773 node->ReplaceInput(0, comparison);
1773 node->ReplaceInput(1, jsgraph()->SmiConstant(EQUAL)); 1774 node->ReplaceInput(1, jsgraph()->SmiConstant(EQUAL));
1774 node->TrimInputCount(2); 1775 node->TrimInputCount(2);
1775 NodeProperties::ChangeOp(node, machine()->IntLessThanOrEqual()); 1776 NodeProperties::ChangeOp(node, machine()->IntLessThanOrEqual());
1776 } 1777 }
1777 1778
1778 } // namespace compiler 1779 } // namespace compiler
1779 } // namespace internal 1780 } // namespace internal
1780 } // namespace v8 1781 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/raw-machine-assembler.h ('k') | src/compiler/wasm-compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698