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

Unified Diff: src/compiler/change-lowering.cc

Issue 1916763003: [turbofan] Move ChangeTaggedToFoo lowerings to EffectControlLinearizer. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/change-lowering.h ('k') | src/compiler/effect-control-linearizer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/change-lowering.cc
diff --git a/src/compiler/change-lowering.cc b/src/compiler/change-lowering.cc
index eead1dbf62c7d5b7cc82e9991ceb25cb3f90b2d3..899300f5fd360f05184173fb07926f566708603a 100644
--- a/src/compiler/change-lowering.cc
+++ b/src/compiler/change-lowering.cc
@@ -31,14 +31,6 @@ Reduction ChangeLowering::Reduce(Node* node) {
return ChangeInt31ToTagged(node->InputAt(0), control);
case IrOpcode::kChangeTaggedSignedToInt32:
return ChangeTaggedSignedToInt32(node->InputAt(0));
- case IrOpcode::kChangeTaggedToFloat64:
- return ChangeTaggedToFloat64(node->InputAt(0), control);
- case IrOpcode::kChangeTaggedToInt32:
- return ChangeTaggedToUI32(node->InputAt(0), control, kSigned);
- case IrOpcode::kChangeTaggedToUint32:
- return ChangeTaggedToUI32(node->InputAt(0), control, kUnsigned);
- case IrOpcode::kTruncateTaggedToWord32:
- return TruncateTaggedToWord32(node->InputAt(0), control);
case IrOpcode::kLoadField:
return LoadField(node);
case IrOpcode::kStoreField:
@@ -145,79 +137,6 @@ Reduction ChangeLowering::ChangeTaggedSignedToInt32(Node* value) {
return Replace(ChangeSmiToWord32(value));
}
-Reduction ChangeLowering::ChangeTaggedToUI32(Node* value, Node* control,
- Signedness signedness) {
- const Operator* op = (signedness == kSigned)
- ? machine()->ChangeFloat64ToInt32()
- : machine()->ChangeFloat64ToUint32();
-
- if (NodeProperties::GetType(value)->Is(Type::TaggedPointer()) &&
- NodeProperties::GetType(value)->Is(Type::Number())) {
- return Replace(graph()->NewNode(op, LoadHeapNumberValue(value, control)));
- }
-
- Node* check = TestNotSmi(value);
- Node* branch =
- graph()->NewNode(common()->Branch(BranchHint::kFalse), check, control);
-
- Node* if_not_smi = graph()->NewNode(common()->IfTrue(), branch);
-
- STATIC_ASSERT(HeapNumber::kValueOffset == Oddball::kToNumberRawOffset);
- Node* vnot_smi = graph()->NewNode(op, LoadHeapNumberValue(value, if_not_smi));
-
- Node* if_smi = graph()->NewNode(common()->IfFalse(), branch);
- Node* vfrom_smi = ChangeSmiToWord32(value);
-
- Node* merge = graph()->NewNode(common()->Merge(2), if_not_smi, if_smi);
- Node* phi = graph()->NewNode(common()->Phi(MachineRepresentation::kWord32, 2),
- vnot_smi, vfrom_smi, merge);
-
- return Replace(phi);
-}
-
-
-Reduction ChangeLowering::ChangeTaggedToFloat64(Node* value, Node* control) {
- Node* check = TestNotSmi(value);
- Node* branch =
- graph()->NewNode(common()->Branch(BranchHint::kFalse), check, control);
-
- Node* if_not_smi = graph()->NewNode(common()->IfTrue(), branch);
-
- STATIC_ASSERT(HeapNumber::kValueOffset == Oddball::kToNumberRawOffset);
- Node* vnot_smi = LoadHeapNumberValue(value, if_not_smi);
-
- Node* if_smi = graph()->NewNode(common()->IfFalse(), branch);
- Node* vfrom_smi = ChangeSmiToFloat64(value);
-
- Node* merge = graph()->NewNode(common()->Merge(2), if_not_smi, if_smi);
- Node* phi =
- graph()->NewNode(common()->Phi(MachineRepresentation::kFloat64, 2),
- vnot_smi, vfrom_smi, merge);
-
- return Replace(phi);
-}
-
-Reduction ChangeLowering::TruncateTaggedToWord32(Node* value, Node* control) {
- Node* check = TestNotSmi(value);
- Node* branch =
- graph()->NewNode(common()->Branch(BranchHint::kFalse), check, control);
-
- Node* if_not_smi = graph()->NewNode(common()->IfTrue(), branch);
-
- STATIC_ASSERT(HeapNumber::kValueOffset == Oddball::kToNumberRawOffset);
- Node* vnot_smi = graph()->NewNode(machine()->TruncateFloat64ToWord32(),
- LoadHeapNumberValue(value, if_not_smi));
-
- Node* if_smi = graph()->NewNode(common()->IfFalse(), branch);
- Node* vfrom_smi = ChangeSmiToWord32(value);
-
- Node* merge = graph()->NewNode(common()->Merge(2), if_not_smi, if_smi);
- Node* phi = graph()->NewNode(common()->Phi(MachineRepresentation::kWord32, 2),
- vnot_smi, vfrom_smi, merge);
-
- return Replace(phi);
-}
-
namespace {
WriteBarrierKind ComputeWriteBarrierKind(BaseTaggedness base_is_tagged,
« no previous file with comments | « src/compiler/change-lowering.h ('k') | src/compiler/effect-control-linearizer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698