blob: 52d4bfcb1e73eb215aef7d5c1bb4a29837a44653 [file] [log] [blame]
David Brazdildee58d62016-04-07 09:54:26 +00001/*
2 * Copyright (C) 2016 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#ifndef ART_COMPILER_OPTIMIZING_INSTRUCTION_BUILDER_H_
18#define ART_COMPILER_OPTIMIZING_INSTRUCTION_BUILDER_H_
19
Mathieu Chartier210531f2018-01-12 10:15:51 -080020#include "base/array_ref.h"
Vladimir Marko69d310e2017-10-09 14:12:23 +010021#include "base/scoped_arena_allocator.h"
22#include "base/scoped_arena_containers.h"
23#include "data_type.h"
David Sehr9e734c72018-01-04 17:56:19 -080024#include "dex/code_item_accessors.h"
25#include "dex/dex_file.h"
26#include "dex/dex_file_types.h"
Vladimir Marko69d310e2017-10-09 14:12:23 +010027#include "handle.h"
David Brazdildee58d62016-04-07 09:54:26 +000028#include "nodes.h"
Mathieu Chartierde4b08f2017-07-10 14:13:41 -070029#include "quicken_info.h"
David Brazdildee58d62016-04-07 09:54:26 +000030
Vladimir Marko0a516052019-10-14 13:00:44 +000031namespace art {
David Brazdildee58d62016-04-07 09:54:26 +000032
Vladimir Marko69d310e2017-10-09 14:12:23 +010033class ArenaBitVector;
34class ArtField;
35class ArtMethod;
Nicolas Geoffray83c8e272017-01-31 14:36:37 +000036class CodeGenerator;
Vladimir Marko69d310e2017-10-09 14:12:23 +010037class DexCompilationUnit;
38class HBasicBlockBuilder;
Andreas Gampe26de38b2016-07-27 17:53:11 -070039class Instruction;
Treehugger Robot2c5827a2018-05-17 22:26:08 +000040class InstructionOperands;
Vladimir Marko69d310e2017-10-09 14:12:23 +010041class OptimizingCompilerStats;
Vladimir Marko175e7862018-03-27 09:03:13 +000042class ScopedObjectAccess;
Vladimir Marko69d310e2017-10-09 14:12:23 +010043class SsaBuilder;
Vladimir Marko69d310e2017-10-09 14:12:23 +010044
45namespace mirror {
46class Class;
Orion Hodson18259d72018-04-12 11:18:23 +010047class MethodType;
Vladimir Marko69d310e2017-10-09 14:12:23 +010048} // namespace mirror
Andreas Gampe26de38b2016-07-27 17:53:11 -070049
David Brazdildee58d62016-04-07 09:54:26 +000050class HInstructionBuilder : public ValueObject {
51 public:
52 HInstructionBuilder(HGraph* graph,
53 HBasicBlockBuilder* block_builder,
54 SsaBuilder* ssa_builder,
55 const DexFile* dex_file,
Mathieu Chartier808c7a52017-12-15 11:19:33 -080056 const CodeItemDebugInfoAccessor& accessor,
Vladimir Marko0ebe0d82017-09-21 22:50:39 +010057 DataType::Type return_type,
Vladimir Markoca6fff82017-10-03 14:49:14 +010058 const DexCompilationUnit* dex_compilation_unit,
59 const DexCompilationUnit* outer_compilation_unit,
Nicolas Geoffray83c8e272017-01-31 14:36:37 +000060 CodeGenerator* code_generator,
Mathieu Chartier210531f2018-01-12 10:15:51 -080061 ArrayRef<const uint8_t> interpreter_metadata,
David Brazdildee58d62016-04-07 09:54:26 +000062 OptimizingCompilerStats* compiler_stats,
Mathieu Chartier808c7a52017-12-15 11:19:33 -080063 ScopedArenaAllocator* local_allocator);
David Brazdildee58d62016-04-07 09:54:26 +000064
65 bool Build();
Vladimir Marko92f7f3c2017-10-31 11:38:30 +000066 void BuildIntrinsic(ArtMethod* method);
David Brazdildee58d62016-04-07 09:54:26 +000067
68 private:
David Brazdildee58d62016-04-07 09:54:26 +000069 void InitializeBlockLocals();
70 void PropagateLocalsToCatchBlocks();
71 void SetLoopHeaderPhiInputs();
72
Mathieu Chartierde4b08f2017-07-10 14:13:41 -070073 bool ProcessDexInstruction(const Instruction& instruction, uint32_t dex_pc, size_t quicken_index);
Vladimir Marko69d310e2017-10-09 14:12:23 +010074 ArenaBitVector* FindNativeDebugInfoLocations();
David Brazdildee58d62016-04-07 09:54:26 +000075
76 bool CanDecodeQuickenedInfo() const;
Mathieu Chartierde4b08f2017-07-10 14:13:41 -070077 uint16_t LookupQuickenedInfo(uint32_t quicken_index);
David Brazdildee58d62016-04-07 09:54:26 +000078
79 HBasicBlock* FindBlockStartingAt(uint32_t dex_pc) const;
80
Vladimir Marko69d310e2017-10-09 14:12:23 +010081 ScopedArenaVector<HInstruction*>* GetLocalsFor(HBasicBlock* block);
Mingyao Yang01b47b02017-02-03 12:09:57 -080082 // Out of line version of GetLocalsFor(), which has a fast path that is
83 // beneficial to get inlined by callers.
Vladimir Marko69d310e2017-10-09 14:12:23 +010084 ScopedArenaVector<HInstruction*>* GetLocalsForWithAllocation(
85 HBasicBlock* block, ScopedArenaVector<HInstruction*>* locals, const size_t vregs);
David Brazdildee58d62016-04-07 09:54:26 +000086 HInstruction* ValueOfLocalAt(HBasicBlock* block, size_t local);
Vladimir Marko0ebe0d82017-09-21 22:50:39 +010087 HInstruction* LoadLocal(uint32_t register_index, DataType::Type type) const;
David Brazdilc120bbe2016-04-22 16:57:00 +010088 HInstruction* LoadNullCheckedLocal(uint32_t register_index, uint32_t dex_pc);
David Brazdildee58d62016-04-07 09:54:26 +000089 void UpdateLocal(uint32_t register_index, HInstruction* instruction);
90
91 void AppendInstruction(HInstruction* instruction);
92 void InsertInstructionAtTop(HInstruction* instruction);
93 void InitializeInstruction(HInstruction* instruction);
94
95 void InitializeParameters();
96
David Brazdildee58d62016-04-07 09:54:26 +000097 template<typename T>
Vladimir Marko0ebe0d82017-09-21 22:50:39 +010098 void Unop_12x(const Instruction& instruction, DataType::Type type, uint32_t dex_pc);
David Brazdildee58d62016-04-07 09:54:26 +000099
100 template<typename T>
Vladimir Marko0ebe0d82017-09-21 22:50:39 +0100101 void Binop_23x(const Instruction& instruction, DataType::Type type, uint32_t dex_pc);
David Brazdildee58d62016-04-07 09:54:26 +0000102
103 template<typename T>
Vladimir Marko0ebe0d82017-09-21 22:50:39 +0100104 void Binop_23x_shift(const Instruction& instruction, DataType::Type type, uint32_t dex_pc);
David Brazdildee58d62016-04-07 09:54:26 +0000105
106 void Binop_23x_cmp(const Instruction& instruction,
Vladimir Marko0ebe0d82017-09-21 22:50:39 +0100107 DataType::Type type,
David Brazdildee58d62016-04-07 09:54:26 +0000108 ComparisonBias bias,
109 uint32_t dex_pc);
110
111 template<typename T>
Vladimir Marko0ebe0d82017-09-21 22:50:39 +0100112 void Binop_12x(const Instruction& instruction, DataType::Type type, uint32_t dex_pc);
David Brazdildee58d62016-04-07 09:54:26 +0000113
114 template<typename T>
Vladimir Marko0ebe0d82017-09-21 22:50:39 +0100115 void Binop_12x_shift(const Instruction& instruction, DataType::Type type, uint32_t dex_pc);
David Brazdildee58d62016-04-07 09:54:26 +0000116
117 template<typename T>
118 void Binop_22b(const Instruction& instruction, bool reverse, uint32_t dex_pc);
119
120 template<typename T>
121 void Binop_22s(const Instruction& instruction, bool reverse, uint32_t dex_pc);
122
123 template<typename T> void If_21t(const Instruction& instruction, uint32_t dex_pc);
124 template<typename T> void If_22t(const Instruction& instruction, uint32_t dex_pc);
125
126 void Conversion_12x(const Instruction& instruction,
Vladimir Marko0ebe0d82017-09-21 22:50:39 +0100127 DataType::Type input_type,
128 DataType::Type result_type,
David Brazdildee58d62016-04-07 09:54:26 +0000129 uint32_t dex_pc);
130
131 void BuildCheckedDivRem(uint16_t out_reg,
132 uint16_t first_reg,
133 int64_t second_reg_or_constant,
134 uint32_t dex_pc,
Vladimir Marko0ebe0d82017-09-21 22:50:39 +0100135 DataType::Type type,
David Brazdildee58d62016-04-07 09:54:26 +0000136 bool second_is_lit,
137 bool is_div);
138
Vladimir Marko0ebe0d82017-09-21 22:50:39 +0100139 void BuildReturn(const Instruction& instruction, DataType::Type type, uint32_t dex_pc);
David Brazdildee58d62016-04-07 09:54:26 +0000140
141 // Builds an instance field access node and returns whether the instruction is supported.
Mathieu Chartierde4b08f2017-07-10 14:13:41 -0700142 bool BuildInstanceFieldAccess(const Instruction& instruction,
143 uint32_t dex_pc,
144 bool is_put,
145 size_t quicken_index);
David Brazdildee58d62016-04-07 09:54:26 +0000146
147 void BuildUnresolvedStaticFieldAccess(const Instruction& instruction,
148 uint32_t dex_pc,
149 bool is_put,
Vladimir Marko0ebe0d82017-09-21 22:50:39 +0100150 DataType::Type field_type);
Nicolas Geoffraydbb9aef2017-11-23 10:44:11 +0000151 // Builds a static field access node.
152 void BuildStaticFieldAccess(const Instruction& instruction, uint32_t dex_pc, bool is_put);
David Brazdildee58d62016-04-07 09:54:26 +0000153
154 void BuildArrayAccess(const Instruction& instruction,
155 uint32_t dex_pc,
156 bool is_get,
Vladimir Marko0ebe0d82017-09-21 22:50:39 +0100157 DataType::Type anticipated_type);
David Brazdildee58d62016-04-07 09:54:26 +0000158
159 // Builds an invocation node and returns whether the instruction is supported.
160 bool BuildInvoke(const Instruction& instruction,
161 uint32_t dex_pc,
162 uint32_t method_idx,
Treehugger Robot2c5827a2018-05-17 22:26:08 +0000163 const InstructionOperands& operands);
David Brazdildee58d62016-04-07 09:54:26 +0000164
Orion Hodsonac141392017-01-13 11:53:47 +0000165 // Builds an invocation node for invoke-polymorphic and returns whether the
166 // instruction is supported.
Orion Hodson4c8e12e2018-05-18 08:33:20 +0100167 bool BuildInvokePolymorphic(uint32_t dex_pc,
Orion Hodsonac141392017-01-13 11:53:47 +0000168 uint32_t method_idx,
Orion Hodson06d10a72018-05-14 08:53:38 +0100169 dex::ProtoIndex proto_idx,
Treehugger Robot2c5827a2018-05-17 22:26:08 +0000170 const InstructionOperands& operands);
Orion Hodsonac141392017-01-13 11:53:47 +0000171
Orion Hodson4c8e12e2018-05-18 08:33:20 +0100172 // Builds an invocation node for invoke-custom and returns whether the
173 // instruction is supported.
174 bool BuildInvokeCustom(uint32_t dex_pc,
175 uint32_t call_site_idx,
176 const InstructionOperands& operands);
177
Vladimir Markob5461632018-10-15 14:24:21 +0100178 // Builds a new array node.
179 HNewArray* BuildNewArray(uint32_t dex_pc, dex::TypeIndex type_index, HInstruction* length);
180
David Brazdildee58d62016-04-07 09:54:26 +0000181 // Builds a new array node and the instructions that fill it.
Igor Murashkin79d8fa72017-04-18 09:37:23 -0700182 HNewArray* BuildFilledNewArray(uint32_t dex_pc,
183 dex::TypeIndex type_index,
Treehugger Robot2c5827a2018-05-17 22:26:08 +0000184 const InstructionOperands& operands);
David Brazdildee58d62016-04-07 09:54:26 +0000185
186 void BuildFillArrayData(const Instruction& instruction, uint32_t dex_pc);
187
188 // Fills the given object with data as specified in the fill-array-data
189 // instruction. Currently only used for non-reference and non-floating point
190 // arrays.
191 template <typename T>
192 void BuildFillArrayData(HInstruction* object,
193 const T* data,
194 uint32_t element_count,
Vladimir Marko0ebe0d82017-09-21 22:50:39 +0100195 DataType::Type anticipated_type,
David Brazdildee58d62016-04-07 09:54:26 +0000196 uint32_t dex_pc);
197
198 // Fills the given object with data as specified in the fill-array-data
199 // instruction. The data must be for long and double arrays.
200 void BuildFillWideArrayData(HInstruction* object,
201 const int64_t* data,
202 uint32_t element_count,
203 uint32_t dex_pc);
204
205 // Builds a `HInstanceOf`, or a `HCheckCast` instruction.
Andra Danciu49a19f32020-08-27 12:44:25 +0000206 void BuildTypeCheck(bool is_instance_of,
207 HInstruction* object,
208 dex::TypeIndex type_index,
209 uint32_t dex_pc);
David Brazdildee58d62016-04-07 09:54:26 +0000210 void BuildTypeCheck(const Instruction& instruction,
211 uint8_t destination,
212 uint8_t reference,
Andreas Gampea5b09a62016-11-17 15:21:22 -0800213 dex::TypeIndex type_index,
David Brazdildee58d62016-04-07 09:54:26 +0000214 uint32_t dex_pc);
215
216 // Builds an instruction sequence for a switch statement.
217 void BuildSwitch(const Instruction& instruction, uint32_t dex_pc);
218
Vladimir Marko28e012a2017-12-07 11:22:59 +0000219 // Builds a `HLoadString` loading the given `string_index`.
220 void BuildLoadString(dex::StringIndex string_index, uint32_t dex_pc);
221
222 // Builds a `HLoadClass` loading the given `type_index`.
Nicolas Geoffray83c8e272017-01-31 14:36:37 +0000223 HLoadClass* BuildLoadClass(dex::TypeIndex type_index, uint32_t dex_pc);
224
Vladimir Markoa2c211c2018-11-01 09:50:52 +0000225 HLoadClass* BuildLoadClass(dex::TypeIndex type_index,
Nicolas Geoffray83c8e272017-01-31 14:36:37 +0000226 const DexFile& dex_file,
227 Handle<mirror::Class> klass,
Nicolas Geoffray5247c082017-01-13 14:17:29 +0000228 uint32_t dex_pc,
Nicolas Geoffray83c8e272017-01-31 14:36:37 +0000229 bool needs_access_check)
230 REQUIRES_SHARED(Locks::mutator_lock_);
Nicolas Geoffray5247c082017-01-13 14:17:29 +0000231
Vladimir Marko175e7862018-03-27 09:03:13 +0000232 Handle<mirror::Class> ResolveClass(ScopedObjectAccess& soa, dex::TypeIndex type_index)
233 REQUIRES_SHARED(Locks::mutator_lock_);
234
Vladimir Marko270e10a2020-09-24 11:48:47 +0100235 bool LoadClassNeedsAccessCheck(dex::TypeIndex type_index, ObjPtr<mirror::Class> klass)
Vladimir Marko175e7862018-03-27 09:03:13 +0000236 REQUIRES_SHARED(Locks::mutator_lock_);
237
Orion Hodson06d10a72018-05-14 08:53:38 +0100238 // Builds a `HLoadMethodHandle` loading the given `method_handle_index`.
Orion Hodsondbaa5c72018-05-10 08:22:46 +0100239 void BuildLoadMethodHandle(uint16_t method_handle_idx, uint32_t dex_pc);
240
Orion Hodson06d10a72018-05-14 08:53:38 +0100241 // Builds a `HLoadMethodType` loading the given `proto_index`.
242 void BuildLoadMethodType(dex::ProtoIndex proto_index, uint32_t dex_pc);
Orion Hodson18259d72018-04-12 11:18:23 +0100243
David Brazdildee58d62016-04-07 09:54:26 +0000244 void PotentiallySimplifyFakeString(uint16_t original_dex_register,
245 uint32_t dex_pc,
246 HInvoke* invoke);
247
Vladimir Marko5f846072020-04-09 13:20:11 +0100248 enum class ReceiverArg {
249 kNone, // No receiver, static method.
250 kNullCheckedArg, // Normal instance invoke, null check and pass the argument.
251 kNullCheckedOnly, // Null check but do not use the arg, used for intrinsic replacements.
252 kPlainArg, // Do not null check but pass the argument, used for unresolved methods.
253 kIgnored, // No receiver despite allocated vreg, used for String.<init>.
254 };
255 bool SetupInvokeArguments(HInstruction* invoke,
Treehugger Robot2c5827a2018-05-17 22:26:08 +0000256 const InstructionOperands& operands,
Orion Hodson4c8e12e2018-05-18 08:33:20 +0100257 const char* shorty,
Vladimir Marko5f846072020-04-09 13:20:11 +0100258 ReceiverArg receiver_arg);
David Brazdildee58d62016-04-07 09:54:26 +0000259
260 bool HandleInvoke(HInvoke* invoke,
Treehugger Robot2c5827a2018-05-17 22:26:08 +0000261 const InstructionOperands& operands,
Orion Hodson4c8e12e2018-05-18 08:33:20 +0100262 const char* shorty,
Vladimir Marko5f846072020-04-09 13:20:11 +0100263 bool is_unresolved);
David Brazdildee58d62016-04-07 09:54:26 +0000264
265 bool HandleStringInit(HInvoke* invoke,
Treehugger Robot2c5827a2018-05-17 22:26:08 +0000266 const InstructionOperands& operands,
Orion Hodson4c8e12e2018-05-18 08:33:20 +0100267 const char* shorty);
David Brazdildee58d62016-04-07 09:54:26 +0000268 void HandleStringInitResult(HInvokeStaticOrDirect* invoke);
269
270 HClinitCheck* ProcessClinitCheckForInvoke(
271 uint32_t dex_pc,
272 ArtMethod* method,
Vladimir Marko2f40d242020-04-08 12:56:45 +0100273 HInvokeStaticOrDirect::ClinitCheckRequirement* clinit_check_requirement);
David Brazdildee58d62016-04-07 09:54:26 +0000274
Vladimir Marko5f846072020-04-09 13:20:11 +0100275 // Try to build a replacement for an intrinsic invoke. Returns true on success,
276 // false on failure. Failure can be either lack of replacement HIR classes, or
277 // input register mismatch.
278 bool BuildSimpleIntrinsic(ArtMethod* method,
279 uint32_t dex_pc,
280 const InstructionOperands& operands,
281 const char* shorty);
282
David Brazdildee58d62016-04-07 09:54:26 +0000283 // Build a HNewInstance instruction.
Igor Murashkin79d8fa72017-04-18 09:37:23 -0700284 HNewInstance* BuildNewInstance(dex::TypeIndex type_index, uint32_t dex_pc);
285
286 // Build a HConstructorFence for HNewInstance and HNewArray instructions. This ensures the
287 // happens-before ordering for default-initialization of the object referred to by new_instance.
288 void BuildConstructorFenceForAllocation(HInstruction* allocation);
David Brazdildee58d62016-04-07 09:54:26 +0000289
290 // Return whether the compiler can assume `cls` is initialized.
Vladimir Marko2f40d242020-04-08 12:56:45 +0100291 bool IsInitialized(ObjPtr<mirror::Class> cls) const
Vladimir Markofca0b492018-07-23 15:30:52 +0100292 REQUIRES_SHARED(Locks::mutator_lock_);
David Brazdildee58d62016-04-07 09:54:26 +0000293
Nicolas Geoffray83c8e272017-01-31 14:36:37 +0000294 // Try to resolve a field using the class linker. Return null if it could not
295 // be found.
296 ArtField* ResolveField(uint16_t field_idx, bool is_static, bool is_put);
297
Vladimir Marko8d6768d2017-03-14 10:13:21 +0000298 ObjPtr<mirror::Class> LookupResolvedType(dex::TypeIndex type_index,
299 const DexCompilationUnit& compilation_unit) const
300 REQUIRES_SHARED(Locks::mutator_lock_);
301
302 ObjPtr<mirror::Class> LookupReferrerClass() const REQUIRES_SHARED(Locks::mutator_lock_);
303
Vladimir Markoca6fff82017-10-03 14:49:14 +0100304 ArenaAllocator* const allocator_;
David Brazdildee58d62016-04-07 09:54:26 +0000305 HGraph* const graph_;
David Brazdildee58d62016-04-07 09:54:26 +0000306
307 // The dex file where the method being compiled is, and the bytecode data.
308 const DexFile* const dex_file_;
Mathieu Chartier808c7a52017-12-15 11:19:33 -0800309 const CodeItemDebugInfoAccessor code_item_accessor_; // null for intrinsic graph.
David Brazdildee58d62016-04-07 09:54:26 +0000310
311 // The return type of the method being compiled.
Vladimir Marko0ebe0d82017-09-21 22:50:39 +0100312 const DataType::Type return_type_;
David Brazdildee58d62016-04-07 09:54:26 +0000313
Vladimir Marko69d310e2017-10-09 14:12:23 +0100314 HBasicBlockBuilder* const block_builder_;
315 SsaBuilder* const ssa_builder_;
David Brazdildee58d62016-04-07 09:54:26 +0000316
Nicolas Geoffray83c8e272017-01-31 14:36:37 +0000317 CodeGenerator* const code_generator_;
318
David Brazdildee58d62016-04-07 09:54:26 +0000319 // The compilation unit of the current method being compiled. Note that
320 // it can be an inlined method.
Vladimir Markoca6fff82017-10-03 14:49:14 +0100321 const DexCompilationUnit* const dex_compilation_unit_;
David Brazdildee58d62016-04-07 09:54:26 +0000322
323 // The compilation unit of the outermost method being compiled. That is the
324 // method being compiled (and not inlined), and potentially inlining other
325 // methods.
326 const DexCompilationUnit* const outer_compilation_unit_;
327
Mathieu Chartierde4b08f2017-07-10 14:13:41 -0700328 // Original values kept after instruction quickening.
329 QuickenInfoTable quicken_info_;
David Brazdildee58d62016-04-07 09:54:26 +0000330
Vladimir Marko69d310e2017-10-09 14:12:23 +0100331 OptimizingCompilerStats* const compilation_stats_;
David Brazdildee58d62016-04-07 09:54:26 +0000332
Vladimir Marko69d310e2017-10-09 14:12:23 +0100333 ScopedArenaAllocator* const local_allocator_;
334 ScopedArenaVector<ScopedArenaVector<HInstruction*>> locals_for_;
335 HBasicBlock* current_block_;
336 ScopedArenaVector<HInstruction*>* current_locals_;
337 HInstruction* latest_result_;
338 // Current "this" parameter.
339 // Valid only after InitializeParameters() finishes.
340 // * Null for static methods.
341 // * Non-null for instance methods.
342 HParameterValue* current_this_parameter_;
343
344 ScopedArenaVector<HBasicBlock*> loop_headers_;
David Brazdildee58d62016-04-07 09:54:26 +0000345
Vladimir Marko3b506202018-10-31 14:33:58 +0000346 // Cached resolved types for the current compilation unit's DexFile.
Vladimir Marko02ca05a2020-05-12 13:58:51 +0100347 // Handle<>s reference entries in the `graph_->GetHandleCache()`.
Vladimir Marko3b506202018-10-31 14:33:58 +0000348 ScopedArenaSafeMap<dex::TypeIndex, Handle<mirror::Class>> class_cache_;
349
David Brazdildee58d62016-04-07 09:54:26 +0000350 static constexpr int kDefaultNumberOfLoops = 2;
351
352 DISALLOW_COPY_AND_ASSIGN(HInstructionBuilder);
353};
354
355} // namespace art
356
357#endif // ART_COMPILER_OPTIMIZING_INSTRUCTION_BUILDER_H_