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

Side by Side Diff: src/compiler/instruction-selector.cc

Issue 2448113002: [arm64] Emit CBZ for deoptimisations. (Closed)
Patch Set: Created 4 years, 1 month 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/instruction-selector.h ('k') | 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/instruction-selector.h" 5 #include "src/compiler/instruction-selector.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "src/base/adapters.h" 9 #include "src/base/adapters.h"
10 #include "src/compiler/instruction-selector-impl.h" 10 #include "src/compiler/instruction-selector-impl.h"
(...skipping 1999 matching lines...) Expand 10 before | Expand all | Expand 10 after
2010 const int ret_count = ret->op()->ValueInputCount(); 2010 const int ret_count = ret->op()->ValueInputCount();
2011 auto value_locations = zone()->NewArray<InstructionOperand>(ret_count); 2011 auto value_locations = zone()->NewArray<InstructionOperand>(ret_count);
2012 for (int i = 0; i < ret_count; ++i) { 2012 for (int i = 0; i < ret_count; ++i) {
2013 value_locations[i] = 2013 value_locations[i] =
2014 g.UseLocation(ret->InputAt(i), linkage()->GetReturnLocation(i)); 2014 g.UseLocation(ret->InputAt(i), linkage()->GetReturnLocation(i));
2015 } 2015 }
2016 Emit(kArchRet, 0, nullptr, ret_count, value_locations); 2016 Emit(kArchRet, 0, nullptr, ret_count, value_locations);
2017 } 2017 }
2018 } 2018 }
2019 2019
2020 Instruction* InstructionSelector::EmitDeoptimize(InstructionCode opcode,
2021 InstructionOperand output,
2022 InstructionOperand a,
2023 DeoptimizeReason reason,
2024 Node* frame_state) {
2025 size_t output_count = output.IsInvalid() ? 0 : 1;
2026 InstructionOperand inputs[] = {a};
2027 size_t input_count = arraysize(inputs);
2028 return EmitDeoptimize(opcode, output_count, &output, input_count, inputs,
2029 reason, frame_state);
2030 }
2031
2020 Instruction* InstructionSelector::EmitDeoptimize( 2032 Instruction* InstructionSelector::EmitDeoptimize(
2021 InstructionCode opcode, InstructionOperand output, InstructionOperand a, 2033 InstructionCode opcode, InstructionOperand output, InstructionOperand a,
2022 InstructionOperand b, DeoptimizeReason reason, Node* frame_state) { 2034 InstructionOperand b, DeoptimizeReason reason, Node* frame_state) {
2023 size_t output_count = output.IsInvalid() ? 0 : 1; 2035 size_t output_count = output.IsInvalid() ? 0 : 1;
2024 InstructionOperand inputs[] = {a, b}; 2036 InstructionOperand inputs[] = {a, b};
2025 size_t input_count = arraysize(inputs); 2037 size_t input_count = arraysize(inputs);
2026 return EmitDeoptimize(opcode, output_count, &output, input_count, inputs, 2038 return EmitDeoptimize(opcode, output_count, &output, input_count, inputs,
2027 reason, frame_state); 2039 reason, frame_state);
2028 } 2040 }
2029 2041
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
2135 return new (instruction_zone()) FrameStateDescriptor( 2147 return new (instruction_zone()) FrameStateDescriptor(
2136 instruction_zone(), state_info.type(), state_info.bailout_id(), 2148 instruction_zone(), state_info.type(), state_info.bailout_id(),
2137 state_info.state_combine(), parameters, locals, stack, 2149 state_info.state_combine(), parameters, locals, stack,
2138 state_info.shared_info(), outer_state); 2150 state_info.shared_info(), outer_state);
2139 } 2151 }
2140 2152
2141 2153
2142 } // namespace compiler 2154 } // namespace compiler
2143 } // namespace internal 2155 } // namespace internal
2144 } // namespace v8 2156 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/instruction-selector.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698