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

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

Issue 2079233006: [turbofan] Propagate word32 truncations through tagged-hole checks. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 6 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 | no next file » | 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/address-map.h" 9 #include "src/address-map.h"
10 #include "src/base/bits.h" 10 #include "src/base/bits.h"
(...skipping 1842 matching lines...) Expand 10 before | Expand all | Expand 10 after
1853 ProcessInput(node, 0, UseInfo::TruncatingFloat64()); 1853 ProcessInput(node, 0, UseInfo::TruncatingFloat64());
1854 ProcessRemainingInputs(node, 1); 1854 ProcessRemainingInputs(node, 1);
1855 SetOutput(node, MachineRepresentation::kFloat64); 1855 SetOutput(node, MachineRepresentation::kFloat64);
1856 if (truncation.TruncatesToFloat64() && 1856 if (truncation.TruncatesToFloat64() &&
1857 mode == CheckFloat64HoleMode::kAllowReturnHole) { 1857 mode == CheckFloat64HoleMode::kAllowReturnHole) {
1858 if (lower()) DeferReplacement(node, node->InputAt(0)); 1858 if (lower()) DeferReplacement(node, node->InputAt(0));
1859 } 1859 }
1860 return; 1860 return;
1861 } 1861 }
1862 case IrOpcode::kCheckTaggedHole: { 1862 case IrOpcode::kCheckTaggedHole: {
1863 ProcessInput(node, 0, UseInfo::AnyTagged()); 1863 CheckTaggedHoleMode mode = CheckTaggedHoleModeOf(node->op());
1864 ProcessRemainingInputs(node, 1); 1864 if (truncation.TruncatesToWord32() &&
1865 SetOutput(node, MachineRepresentation::kTagged); 1865 mode == CheckTaggedHoleMode::kConvertHoleToUndefined) {
1866 ProcessInput(node, 0, UseInfo::CheckedSigned32AsWord32());
1867 ProcessRemainingInputs(node, 1);
1868 SetOutput(node, MachineRepresentation::kWord32);
1869 if (lower()) DeferReplacement(node, node->InputAt(0));
1870 } else {
1871 ProcessInput(node, 0, UseInfo::AnyTagged());
1872 ProcessRemainingInputs(node, 1);
1873 SetOutput(node, MachineRepresentation::kTagged);
1874 }
1866 return; 1875 return;
1867 } 1876 }
1868 1877
1869 //------------------------------------------------------------------ 1878 //------------------------------------------------------------------
1870 // Machine-level operators. 1879 // Machine-level operators.
1871 //------------------------------------------------------------------ 1880 //------------------------------------------------------------------
1872 case IrOpcode::kLoad: { 1881 case IrOpcode::kLoad: {
1873 // TODO(jarin) Eventually, we should get rid of all machine stores 1882 // TODO(jarin) Eventually, we should get rid of all machine stores
1874 // from the high-level phases, then this becomes UNREACHABLE. 1883 // from the high-level phases, then this becomes UNREACHABLE.
1875 LoadRepresentation rep = LoadRepresentationOf(node->op()); 1884 LoadRepresentation rep = LoadRepresentationOf(node->op());
(...skipping 1180 matching lines...) Expand 10 before | Expand all | Expand 10 after
3056 isolate(), graph()->zone(), callable.descriptor(), 0, flags, 3065 isolate(), graph()->zone(), callable.descriptor(), 0, flags,
3057 Operator::kNoProperties); 3066 Operator::kNoProperties);
3058 to_number_operator_.set(common()->Call(desc)); 3067 to_number_operator_.set(common()->Call(desc));
3059 } 3068 }
3060 return to_number_operator_.get(); 3069 return to_number_operator_.get();
3061 } 3070 }
3062 3071
3063 } // namespace compiler 3072 } // namespace compiler
3064 } // namespace internal 3073 } // namespace internal
3065 } // namespace v8 3074 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698