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

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

Issue 834003002: Version 3.31.74.1 (cherry-pick) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@3.31
Patch Set: Created 5 years, 11 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/operator-properties-inl.h ('k') | src/compiler/x64/code-generator-x64.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"
11 #include "src/compiler/common-operator.h" 11 #include "src/compiler/common-operator.h"
12 #include "src/compiler/diamond.h" 12 #include "src/compiler/diamond.h"
13 #include "src/compiler/graph-inl.h" 13 #include "src/compiler/graph-inl.h"
14 #include "src/compiler/linkage.h"
14 #include "src/compiler/node-matchers.h" 15 #include "src/compiler/node-matchers.h"
15 #include "src/compiler/node-properties-inl.h" 16 #include "src/compiler/node-properties-inl.h"
16 #include "src/compiler/representation-change.h" 17 #include "src/compiler/representation-change.h"
17 #include "src/compiler/simplified-lowering.h" 18 #include "src/compiler/simplified-lowering.h"
18 #include "src/compiler/simplified-operator.h" 19 #include "src/compiler/simplified-operator.h"
19 #include "src/objects.h" 20 #include "src/objects.h"
20 21
21 namespace v8 { 22 namespace v8 {
22 namespace internal { 23 namespace internal {
23 namespace compiler { 24 namespace compiler {
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 } 174 }
174 175
175 void ProcessTruncateWord32Input(Node* node, int index, MachineTypeUnion use) { 176 void ProcessTruncateWord32Input(Node* node, int index, MachineTypeUnion use) {
176 Node* input = node->InputAt(index); 177 Node* input = node->InputAt(index);
177 if (phase_ == PROPAGATE) { 178 if (phase_ == PROPAGATE) {
178 // In the propagate phase, propagate the usage information backward. 179 // In the propagate phase, propagate the usage information backward.
179 Enqueue(input, use); 180 Enqueue(input, use);
180 } else { 181 } else {
181 // In the change phase, insert a change before the use if necessary. 182 // In the change phase, insert a change before the use if necessary.
182 MachineTypeUnion output = GetInfo(input)->output; 183 MachineTypeUnion output = GetInfo(input)->output;
183 if ((output & kRepWord32) == 0) { 184 if ((output & (kRepBit | kRepWord8 | kRepWord16 | kRepWord32)) == 0) {
184 // Output representation doesn't match usage. 185 // Output representation doesn't match usage.
185 TRACE((" truncate-to-int32: #%d:%s(@%d #%d:%s) ", node->id(), 186 TRACE((" truncate-to-int32: #%d:%s(@%d #%d:%s) ", node->id(),
186 node->op()->mnemonic(), index, input->id(), 187 node->op()->mnemonic(), index, input->id(),
187 input->op()->mnemonic())); 188 input->op()->mnemonic()));
188 TRACE((" from ")); 189 TRACE((" from "));
189 PrintInfo(output); 190 PrintInfo(output);
190 TRACE((" to ")); 191 TRACE((" to "));
191 PrintInfo(use); 192 PrintInfo(use);
192 TRACE(("\n")); 193 TRACE(("\n"));
193 Node* n = changer_->GetTruncatedWord32For(input, output); 194 Node* n = changer_->GetTruncatedWord32For(input, output);
(...skipping 1282 matching lines...) Expand 10 before | Expand all | Expand 10 after
1476 1477
1477 void SimplifiedLowering::DoStringLessThanOrEqual(Node* node) { 1478 void SimplifiedLowering::DoStringLessThanOrEqual(Node* node) {
1478 node->set_op(machine()->IntLessThanOrEqual()); 1479 node->set_op(machine()->IntLessThanOrEqual());
1479 node->ReplaceInput(0, StringComparison(node, true)); 1480 node->ReplaceInput(0, StringComparison(node, true));
1480 node->ReplaceInput(1, jsgraph()->SmiConstant(EQUAL)); 1481 node->ReplaceInput(1, jsgraph()->SmiConstant(EQUAL));
1481 } 1482 }
1482 1483
1483 } // namespace compiler 1484 } // namespace compiler
1484 } // namespace internal 1485 } // namespace internal
1485 } // namespace v8 1486 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/operator-properties-inl.h ('k') | src/compiler/x64/code-generator-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698