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

Side by Side Diff: src/compiler/arm64/code-generator-arm64.cc

Issue 2357583003: [turbofan] Remove bogus constant materialization from frame. (Closed)
Patch Set: Created 4 years, 3 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/arm/code-generator-arm.cc ('k') | src/compiler/code-generator.h » ('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/code-generator.h" 5 #include "src/compiler/code-generator.h"
6 6
7 #include "src/arm64/frames-arm64.h" 7 #include "src/arm64/frames-arm64.h"
8 #include "src/arm64/macro-assembler-arm64.h" 8 #include "src/arm64/macro-assembler-arm64.h"
9 #include "src/compilation-info.h" 9 #include "src/compilation-info.h"
10 #include "src/compiler/code-generator-impl.h" 10 #include "src/compiler/code-generator-impl.h"
(...skipping 1918 matching lines...) Expand 10 before | Expand all | Expand 10 after
1929 } 1929 }
1930 } else if (source->IsConstant()) { 1930 } else if (source->IsConstant()) {
1931 Constant src = g.ToConstant(ConstantOperand::cast(source)); 1931 Constant src = g.ToConstant(ConstantOperand::cast(source));
1932 if (destination->IsRegister() || destination->IsStackSlot()) { 1932 if (destination->IsRegister() || destination->IsStackSlot()) {
1933 UseScratchRegisterScope scope(masm()); 1933 UseScratchRegisterScope scope(masm());
1934 Register dst = destination->IsRegister() ? g.ToRegister(destination) 1934 Register dst = destination->IsRegister() ? g.ToRegister(destination)
1935 : scope.AcquireX(); 1935 : scope.AcquireX();
1936 if (src.type() == Constant::kHeapObject) { 1936 if (src.type() == Constant::kHeapObject) {
1937 Handle<HeapObject> src_object = src.ToHeapObject(); 1937 Handle<HeapObject> src_object = src.ToHeapObject();
1938 Heap::RootListIndex index; 1938 Heap::RootListIndex index;
1939 int slot; 1939 if (IsMaterializableFromRoot(src_object, &index)) {
1940 if (IsMaterializableFromFrame(src_object, &slot)) {
1941 __ Ldr(dst, g.SlotToMemOperand(slot, masm()));
1942 } else if (IsMaterializableFromRoot(src_object, &index)) {
1943 __ LoadRoot(dst, index); 1940 __ LoadRoot(dst, index);
1944 } else { 1941 } else {
1945 __ LoadObject(dst, src_object); 1942 __ LoadObject(dst, src_object);
1946 } 1943 }
1947 } else { 1944 } else {
1948 __ Mov(dst, g.ToImmediate(source)); 1945 __ Mov(dst, g.ToImmediate(source));
1949 } 1946 }
1950 if (destination->IsStackSlot()) { 1947 if (destination->IsStackSlot()) {
1951 __ Str(dst, g.ToMemOperand(destination, masm())); 1948 __ Str(dst, g.ToMemOperand(destination, masm()));
1952 } 1949 }
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
2090 padding_size -= kInstructionSize; 2087 padding_size -= kInstructionSize;
2091 } 2088 }
2092 } 2089 }
2093 } 2090 }
2094 2091
2095 #undef __ 2092 #undef __
2096 2093
2097 } // namespace compiler 2094 } // namespace compiler
2098 } // namespace internal 2095 } // namespace internal
2099 } // namespace v8 2096 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/arm/code-generator-arm.cc ('k') | src/compiler/code-generator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698