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

Side by Side Diff: src/compiler/basic-block-instrumentor.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/arm64/instruction-selector-arm64.cc ('k') | src/compiler/change-lowering.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/basic-block-instrumentor.h" 5 #include "src/compiler/basic-block-instrumentor.h"
6 6
7 #include <sstream> 7 #include <sstream>
8 8
9 #include "src/compiler.h" 9 #include "src/compiler.h"
10 #include "src/compiler/common-operator.h" 10 #include "src/compiler/common-operator.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 BasicBlock* block = (*it); 78 BasicBlock* block = (*it);
79 data->SetBlockId(block_number, block->id().ToSize()); 79 data->SetBlockId(block_number, block->id().ToSize());
80 // TODO(dcarney): wire effect and control deps for load and store. 80 // TODO(dcarney): wire effect and control deps for load and store.
81 // Construct increment operation. 81 // Construct increment operation.
82 Node* base = graph->NewNode( 82 Node* base = graph->NewNode(
83 PointerConstant(&common, data->GetCounterAddress(block_number))); 83 PointerConstant(&common, data->GetCounterAddress(block_number)));
84 Node* load = graph->NewNode(machine.Load(MachineType::Uint32()), base, zero, 84 Node* load = graph->NewNode(machine.Load(MachineType::Uint32()), base, zero,
85 graph->start(), graph->start()); 85 graph->start(), graph->start());
86 Node* inc = graph->NewNode(machine.Int32Add(), load, one); 86 Node* inc = graph->NewNode(machine.Int32Add(), load, one);
87 Node* store = 87 Node* store =
88 graph->NewNode(machine.Store(StoreRepresentation(MachineType::Uint32(), 88 graph->NewNode(machine.Store(StoreRepresentation(
89 kNoWriteBarrier)), 89 MachineRepresentation::kWord32, kNoWriteBarrier)),
90 base, zero, inc, graph->start(), graph->start()); 90 base, zero, inc, graph->start(), graph->start());
91 // Insert the new nodes. 91 // Insert the new nodes.
92 static const int kArraySize = 6; 92 static const int kArraySize = 6;
93 Node* to_insert[kArraySize] = {zero, one, base, load, inc, store}; 93 Node* to_insert[kArraySize] = {zero, one, base, load, inc, store};
94 int insertion_start = block_number == 0 ? 0 : 2; 94 int insertion_start = block_number == 0 ? 0 : 2;
95 NodeVector::iterator insertion_point = FindInsertionPoint(block); 95 NodeVector::iterator insertion_point = FindInsertionPoint(block);
96 block->InsertNodes(insertion_point, &to_insert[insertion_start], 96 block->InsertNodes(insertion_point, &to_insert[insertion_start],
97 &to_insert[kArraySize]); 97 &to_insert[kArraySize]);
98 // Tell the scheduler about the new nodes. 98 // Tell the scheduler about the new nodes.
99 for (int i = insertion_start; i < kArraySize; ++i) { 99 for (int i = insertion_start; i < kArraySize; ++i) {
100 schedule->SetBlockForNode(block, to_insert[i]); 100 schedule->SetBlockForNode(block, to_insert[i]);
101 } 101 }
102 } 102 }
103 return data; 103 return data;
104 } 104 }
105 105
106 } // namespace compiler 106 } // namespace compiler
107 } // namespace internal 107 } // namespace internal
108 } // namespace v8 108 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/arm64/instruction-selector-arm64.cc ('k') | src/compiler/change-lowering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698