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

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

Issue 1772843003: [wasm] Some cleanup in the Int64Lowering. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 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 | « no previous file | 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/int64-lowering.h" 5 #include "src/compiler/int64-lowering.h"
6 #include "src/compiler/common-operator.h" 6 #include "src/compiler/common-operator.h"
7 #include "src/compiler/graph.h" 7 #include "src/compiler/graph.h"
8 #include "src/compiler/linkage.h" 8 #include "src/compiler/linkage.h"
9 #include "src/compiler/machine-operator.h" 9 #include "src/compiler/machine-operator.h"
10 #include "src/compiler/node-properties.h" 10 #include "src/compiler/node-properties.h"
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 machine()->Word32Or(), 326 machine()->Word32Or(),
327 graph()->NewNode(machine()->Word32Xor(), GetReplacementLow(left), 327 graph()->NewNode(machine()->Word32Xor(), GetReplacementLow(left),
328 GetReplacementLow(right)), 328 GetReplacementLow(right)),
329 graph()->NewNode(machine()->Word32Xor(), GetReplacementHigh(left), 329 graph()->NewNode(machine()->Word32Xor(), GetReplacementHigh(left),
330 GetReplacementHigh(right))), 330 GetReplacementHigh(right))),
331 graph()->NewNode(common()->Int32Constant(0))); 331 graph()->NewNode(common()->Int32Constant(0)));
332 332
333 ReplaceNode(node, replacement, nullptr); 333 ReplaceNode(node, replacement, nullptr);
334 break; 334 break;
335 } 335 }
336 // kExprI64Ne:
337 // kExprI64LtS: 336 // kExprI64LtS:
338 case IrOpcode::kInt64LessThan: { 337 case IrOpcode::kInt64LessThan: {
339 LowerComparison(node, machine()->Int32LessThan(), 338 LowerComparison(node, machine()->Int32LessThan(),
340 machine()->Uint32LessThan()); 339 machine()->Uint32LessThan());
341 break; 340 break;
342 } 341 }
343 case IrOpcode::kInt64LessThanOrEqual: { 342 case IrOpcode::kInt64LessThanOrEqual: {
344 LowerComparison(node, machine()->Int32LessThan(), 343 LowerComparison(node, machine()->Int32LessThan(),
345 machine()->Uint32LessThanOrEqual()); 344 machine()->Uint32LessThanOrEqual());
346 break; 345 break;
(...skipping 12 matching lines...) Expand all
359 // kExprI64SConvertI32: 358 // kExprI64SConvertI32:
360 // kExprI64UConvertI32: 359 // kExprI64UConvertI32:
361 360
362 // kExprF64ReinterpretI64: 361 // kExprF64ReinterpretI64:
363 // kExprI64ReinterpretF64: 362 // kExprI64ReinterpretF64:
364 363
365 // kExprI64Clz: 364 // kExprI64Clz:
366 // kExprI64Ctz: 365 // kExprI64Ctz:
367 // kExprI64Popcnt: 366 // kExprI64Popcnt:
368 367
369 // kExprF32SConvertI64:
370 // kExprF32UConvertI64:
371 // kExprF64SConvertI64:
372 // kExprF64UConvertI64:
373 // kExprI64SConvertF32:
374 // kExprI64SConvertF64:
375 // kExprI64UConvertF32:
376 // kExprI64UConvertF64:
377 default: { DefaultLowering(node); } 368 default: { DefaultLowering(node); }
378 } 369 }
379 } 370 }
380 371
381 void Int64Lowering::LowerComparison(Node* node, const Operator* high_word_op, 372 void Int64Lowering::LowerComparison(Node* node, const Operator* high_word_op,
382 const Operator* low_word_op) { 373 const Operator* low_word_op) {
383 DCHECK(node->InputCount() == 2); 374 DCHECK(node->InputCount() == 2);
384 Node* left = node->InputAt(0); 375 Node* left = node->InputAt(0);
385 Node* right = node->InputAt(1); 376 Node* right = node->InputAt(1);
386 Node* replacement = graph()->NewNode( 377 Node* replacement = graph()->NewNode(
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
435 } 426 }
436 427
437 Node* Int64Lowering::GetReplacementHigh(Node* node) { 428 Node* Int64Lowering::GetReplacementHigh(Node* node) {
438 Node* result = replacements_[node->id()].high; 429 Node* result = replacements_[node->id()].high;
439 DCHECK(result); 430 DCHECK(result);
440 return result; 431 return result;
441 } 432 }
442 } // namespace compiler 433 } // namespace compiler
443 } // namespace internal 434 } // namespace internal
444 } // namespace v8 435 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/compiler/wasm-compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698