Home | History | Annotate | Download | only in optimizing

Lines Matching defs:dex_pc

32 HBasicBlock* HInstructionBuilder::FindBlockStartingAt(uint32_t dex_pc) const {
33 return block_builder_->GetBlockAt(dex_pc);
218 HInstruction* HInstructionBuilder::LoadNullCheckedLocal(uint32_t register_index, uint32_t dex_pc) {
224 HNullCheck* null_check = new (arena_) HNullCheck(ref, dex_pc);
312 uint32_t dex_pc = it.CurrentDexPc();
313 if (dex_pc != block_dex_pc && FindBlockStartingAt(dex_pc) != nullptr) {
314 // This dex_pc starts a new basic block.
322 if (native_debuggable && native_debug_info_locations->IsBitSet(dex_pc)) {
323 AppendInstruction(new (arena_) HNativeDebugInfo(dex_pc));
326 if (!ProcessDexInstruction(it.CurrentInstruction(), dex_pc)) {
473 void HInstructionBuilder::If_22t(const Instruction& instruction, uint32_t dex_pc) {
476 T* comparison = new (arena_) T(first, second, dex_pc);
478 AppendInstruction(new (arena_) HIf(comparison, dex_pc));
483 void HInstructionBuilder::If_21t(const Instruction& instruction, uint32_t dex_pc) {
485 T* comparison = new (arena_) T(value, graph_->GetIntConstant(0, dex_pc), dex_pc);
487 AppendInstruction(new (arena_) HIf(comparison, dex_pc));
494 uint32_t dex_pc) {
496 AppendInstruction(new (arena_) T(type, first, dex_pc));
503 uint32_t dex_pc) {
505 AppendInstruction(new (arena_) HTypeConversion(result_type, first, dex_pc));
512 uint32_t dex_pc) {
515 AppendInstruction(new (arena_) T(type, first, second, dex_pc));
522 uint32_t dex_pc) {
525 AppendInstruction(new (arena_) T(type, first, second, dex_pc));
532 uint32_t dex_pc) {
535 AppendInstruction(new (arena_) HCompare(type, first, second, bias, dex_pc));
542 uint32_t dex_pc) {
545 AppendInstruction(new (arena_) T(type, first, second, dex_pc));
552 uint32_t dex_pc) {
555 AppendInstruction(new (arena_) T(type, first, second, dex_pc));
560 void HInstructionBuilder::Binop_22s(const Instruction& instruction, bool reverse, uint32_t dex_pc) {
562 HInstruction* second = graph_->GetIntConstant(instruction.VRegC_22s(), dex_pc);
566 AppendInstruction(new (arena_) T(Primitive::kPrimInt, first, second, dex_pc));
571 void HInstructionBuilder::Binop_22b(const Instruction& instruction, bool reverse, uint32_t dex_pc) {
573 HInstruction* second = graph_->GetIntConstant(instruction.VRegC_22b(), dex_pc);
577 AppendInstruction(new (arena_) T(Primitive::kPrimInt, first, second, dex_pc));
588 // dex_pc after `instruction` at `dex_pc`.
590 uint32_t dex_pc,
592 uint32_t next_dex_pc = dex_pc + instruction.SizeInCodeUnits();
596 void HInstructionBuilder::BuildSwitch(const Instruction& instruction, uint32_t dex_pc) {
598 DexSwitchTable table(instruction, dex_pc);
602 DCHECK(IsFallthroughInstruction(instruction, dex_pc, current_block_));
603 AppendInstruction(new (arena_) HGoto(dex_pc));
606 HInstruction* case_value = graph_->GetIntConstant(it.CurrentKey(), dex_pc);
607 HEqual* comparison = new (arena_) HEqual(value, case_value, dex_pc);
609 AppendInstruction(new (arena_) HIf(comparison, dex_pc));
617 new (arena_) HPackedSwitch(table.GetEntryAt(0), table.GetNumEntries(), value, dex_pc));
625 uint32_t dex_pc) {
633 AppendInstruction(new (arena_) HMemoryBarrier(kStoreStore, dex_pc));
635 AppendInstruction(new (arena_) HReturnVoid(dex_pc));
638 AppendInstruction(new (arena_) HReturn(value, dex_pc));
768 uint32_t dex_pc,
804 dex_pc,
826 dex_pc,
849 dex_pc, resolved_method, method_idx, &clinit_check_requirement);
868 dex_pc,
880 dex_pc,
889 dex_pc,
903 bool HInstructionBuilder::BuildNewInstance(uint16_t type_index, uint32_t dex_pc) {
931 dex_pc,
938 cls = new (arena_) HClinitCheck(load_class, dex_pc);
945 dex_pc,
985 uint32_t dex_pc,
1022 dex_pc,
1026 clinit_check = new (arena_) HClinitCheck(load_class, dex_pc);
1188 uint32_t dex_pc,
1197 field_index = LookupQuickenedInfo(dex_pc);
1207 HInstruction* object = LoadNullCheckedLocal(obj_reg, dex_pc);
1221 dex_pc);
1233 dex_pc);
1243 dex_pc);
1254 dex_pc);
1302 uint32_t dex_pc,
1311 new (arena_) HUnresolvedStaticFieldSet(value, field_type, field_index, dex_pc));
1313 AppendInstruction(new (arena_) HUnresolvedStaticFieldGet(field_type, field_index, dex_pc));
1319 uint32_t dex_pc,
1335 BuildUnresolvedStaticFieldAccess(instruction, dex_pc, is_put, field_type);
1363 BuildUnresolvedStaticFieldAccess(instruction, dex_pc, is_put, field_type);
1374 dex_pc,
1383 cls = new (arena_) HClinitCheck(constant, dex_pc);
1401 dex_pc));
1411 dex_pc));
1420 uint32_t dex_pc,
1430 second = graph_->GetIntConstant(second_vreg_or_constant, dex_pc);
1432 second = graph_->GetLongConstant(second_vreg_or_constant, dex_pc);
1441 second = new (arena_) HDivZeroCheck(second, dex_pc);
1446 AppendInstruction(new (arena_) HDiv(type, first, second, dex_pc));
1448 AppendInstruction(new (arena_) HRem(type, first, second, dex_pc));
1454 uint32_t dex_pc,
1461 HInstruction* object = LoadNullCheckedLocal(array_reg, dex_pc);
1462 HInstruction* length = new (arena_) HArrayLength(object, dex_pc);
1465 index = new (arena_) HBoundsCheck(index, length, dex_pc);
1470 HArraySet* aset = new (arena_) HArraySet(object, index, value, anticipated_type, dex_pc);
1474 HArrayGet* aget = new (arena_) HArrayGet(object, index, anticipated_type, dex_pc);
1482 void HInstructionBuilder::BuildFilledNewArray(uint32_t dex_pc,
1488 HInstruction* length = graph_->GetIntConstant(number_of_vreg_arguments, dex_pc);
1495 dex_pc,
1512 HInstruction* index = graph_->GetIntConstant(i, dex_pc);
1513 HArraySet* aset = new (arena_) HArraySet(object, index, value, type, dex_pc);
1525 uint32_t dex_pc) {
1527 HInstruction* index = graph_->GetIntConstant(i, dex_pc);
1528 HInstruction* value = graph_->GetIntConstant(data[i], dex_pc);
1529 HArraySet* aset = new (arena_) HArraySet(object, index, value, anticipated_type, dex_pc);
1535 void HInstructionBuilder::BuildFillArrayData(const Instruction& instruction, uint32_t dex_pc) {
1536 HInstruction* array = LoadNullCheckedLocal(instruction.VRegA_31t(), dex_pc);
1537 HInstruction* length = new (arena_) HArrayLength(array, dex_pc);
1540 int32_t payload_offset = instruction.VRegB_31t() + dex_pc;
1548 HInstruction* last_index = graph_->GetIntConstant(payload->element_count - 1, dex_pc);
1549 AppendInstruction(new (arena_) HBoundsCheck(last_index, length, dex_pc));
1557 dex_pc);
1564 dex_pc);
1571 dex_pc);
1577 dex_pc);
1588 uint32_t dex_pc) {
1590 HInstruction* index = graph_->GetIntConstant(i, dex_pc);
1591 HInstruction* value = graph_->GetLongConstant(data[i], dex_pc);
1592 HArraySet* aset = new (arena_) HArraySet(object, index, value, Primitive::kPrimLong, dex_pc);
1625 uint32_t dex_pc) {
1643 dex_pc,
1650 AppendInstruction(new (arena_) HInstanceOf(object, cls, check_kind, dex_pc));
1657 AppendInstruction(new (arena_) HCheckCast(object, cls, check_kind, dex_pc));
1658 AppendInstruction(new (arena_) HBoundType(object, dex_pc));
1680 uint16_t HInstructionBuilder::LookupQuickenedInfo(uint32_t dex_pc) {
1684 auto it = skipped_interpreter_metadata_.find(dex_pc);
1692 // Otherwise start parsing `interpreter_metadata_` until the slot for `dex_pc`
1697 DCHECK_LE(dex_pc_in_map, dex_pc);
1699 if (dex_pc_in_map == dex_pc) {
1707 bool HInstructionBuilder::ProcessDexInstruction(const Instruction& instruction, uint32_t dex_pc) {
1711 HIntConstant* constant = graph_->GetIntConstant(instruction.VRegB_11n(), dex_pc);
1718 HIntConstant* constant = graph_->GetIntConstant(instruction.VRegB_21s(), dex_pc);
1725 HIntConstant* constant = graph_->GetIntConstant(instruction.VRegB_31i(), dex_pc);
1732 HIntConstant* constant = graph_->GetIntConstant(instruction.VRegB_21h() << 16, dex_pc);
1743 HLongConstant* constant = graph_->GetLongConstant(value, dex_pc);
1754 HLongConstant* constant = graph_->GetLongConstant(value, dex_pc);
1761 HLongConstant* constant = graph_->GetLongConstant(instruction.VRegB_51l(), dex_pc);
1769 HLongConstant* constant = graph_->GetLongConstant(value, dex_pc);
1802 BuildReturn(instruction, Primitive::kPrimVoid, dex_pc);
1807 case Instruction::IF_##cond: If_22t<comparison>(instruction, dex_pc); break; \
1808 case Instruction::IF_##cond##Z: If_21t<comparison>(instruction, dex_pc); break
1820 AppendInstruction(new (arena_) HGoto(dex_pc));
1826 BuildReturn(instruction, return_type_, dex_pc);
1831 BuildReturn(instruction, return_type_, dex_pc);
1836 BuildReturn(instruction, return_type_, dex_pc);
1851 method_idx = LookupQuickenedInfo(dex_pc);
1858 if (!BuildInvoke(instruction, dex_pc, method_idx,
1876 method_idx = LookupQuickenedInfo(dex_pc);
1882 if (!BuildInvoke(instruction, dex_pc, method_idx,
1890 Unop_12x<HNeg>(instruction, Primitive::kPrimInt, dex_pc);
1895 Unop_12x<HNeg>(instruction, Primitive::kPrimLong, dex_pc);
1900 Unop_12x<HNeg>(instruction, Primitive::kPrimFloat, dex_pc);
1905 Unop_12x<HNeg>(instruction, Primitive::kPrimDouble, dex_pc);
1910 Unop_12x<HNot>(instruction, Primitive::kPrimInt, dex_pc);
1915 Unop_12x<HNot>(instruction, Primitive::kPrimLong, dex_pc);
1920 Conversion_12x(instruction, Primitive::kPrimInt, Primitive::kPrimLong, dex_pc);
1925 Conversion_12x(instruction, Primitive::kPrimInt, Primitive::kPrimFloat, dex_pc);
1930 Conversion_12x(instruction, Primitive::kPrimInt, Primitive::kPrimDouble, dex_pc);
1935 Conversion_12x(instruction, Primitive::kPrimLong, Primitive::kPrimInt, dex_pc);
1940 Conversion_12x(instruction, Primitive::kPrimLong, Primitive::kPrimFloat, dex_pc);
1945 Conversion_12x(instruction, Primitive::kPrimLong, Primitive::kPrimDouble, dex_pc);
1950 Conversion_12x(instruction, Primitive::kPrimFloat, Primitive::kPrimInt, dex_pc);
1955 Conversion_12x(instruction, Primitive::kPrimFloat, Primitive::kPrimLong, dex_pc);
1960 Conversion_12x(instruction, Primitive::kPrimFloat, Primitive::kPrimDouble, dex_pc);
1965 Conversion_12x(instruction, Primitive::kPrimDouble, Primitive::kPrimInt, dex_pc);
1970 Conversion_12x(instruction, Primitive::kPrimDouble, Primitive::kPrimLong, dex_pc);
1975 Conversion_12x(instruction, Primitive::kPrimDouble, Primitive::kPrimFloat, dex_pc);
1980 dex_pc);
1985 Conversion_12x(instruction, Primitive::kPrimInt, Primitive::kPrimShort, dex_pc);
1990 Conversion_12x(instruction, Primitive::kPrimInt, Primitive::kPrimChar, dex_pc);
1995 Binop_23x<HAdd>(instruction, Primitive::kPrimInt, dex_pc);
2000 Binop_23x<HAdd>(instruction, Primitive::kPrimLong, dex_pc);
2005 Binop_23x<HAdd>(instruction, Primitive::kPrimDouble, dex_pc);
2010 Binop_23x<HAdd>(instruction, Primitive::kPrimFloat, dex_pc);
2015 Binop_23x<HSub>(instruction, Primitive::kPrimInt, dex_pc);
2020 Binop_23x<HSub>(instruction, Primitive::kPrimLong, dex_pc);
2025 Binop_23x<HSub>(instruction, Primitive::kPrimFloat, dex_pc);
2030 Binop_23x<HSub>(instruction, Primitive::kPrimDouble, dex_pc);
2035 Binop_12x<HAdd>(instruction, Primitive::kPrimInt, dex_pc);
2040 Binop_23x<HMul>(instruction, Primitive::kPrimInt, dex_pc);
2045 Binop_23x<HMul>(instruction, Primitive::kPrimLong, dex_pc);
2050 Binop_23x<HMul>(instruction, Primitive::kPrimFloat, dex_pc);
2055 Binop_23x<HMul>(instruction, Primitive::kPrimDouble, dex_pc);
2061 dex_pc, Primitive::kPrimInt, false, true);
2067 dex_pc, Primitive::kPrimLong, false, true);
2072 Binop_23x<HDiv>(instruction, Primitive::kPrimFloat, dex_pc);
2077 Binop_23x<HDiv>(instruction, Primitive::kPrimDouble, dex_pc);
2083 dex_pc, Primitive::kPrimInt, false, false);
2089 dex_pc, Primitive::kPrimLong, false, false);
2094 Binop_23x<HRem>(instruction, Primitive::kPrimFloat, dex_pc);
2099 Binop_23x<HRem>(instruction, Primitive::kPrimDouble, dex_pc);
2104 Binop_23x<HAnd>(instruction, Primitive::kPrimInt, dex_pc);
2109 Binop_23x<HAnd>(instruction, Primitive::kPrimLong, dex_pc);
2114 Binop_23x_shift<HShl>(instruction, Primitive::kPrimInt, dex_pc);
2119 Binop_23x_shift<HShl>(instruction, Primitive::kPrimLong, dex_pc);
2124 Binop_23x_shift<HShr>(instruction, Primitive::kPrimInt, dex_pc);
2129 Binop_23x_shift<HShr>(instruction, Primitive::kPrimLong, dex_pc);
2134 Binop_23x_shift<HUShr>(instruction, Primitive::kPrimInt, dex_pc);
2139 Binop_23x_shift<HUShr>(instruction, Primitive::kPrimLong, dex_pc);
2144 Binop_23x<HOr>(instruction, Primitive::kPrimInt, dex_pc);
2149 Binop_23x<HOr>(instruction, Primitive::kPrimLong, dex_pc);
2154 Binop_23x<HXor>(instruction, Primitive::kPrimInt, dex_pc);
2159 Binop_23x<HXor>(instruction, Primitive::kPrimLong, dex_pc);
2164 Binop_12x<HAdd>(instruction, Primitive::kPrimLong, dex_pc);
2169 Binop_12x<HAdd>(instruction, Primitive::kPrimDouble, dex_pc);
2174 Binop_12x<HAdd>(instruction, Primitive::kPrimFloat, dex_pc);
2179 Binop_12x<HSub>(instruction, Primitive::kPrimInt, dex_pc);
2184 Binop_12x<HSub>(instruction, Primitive::kPrimLong, dex_pc);
2189 Binop_12x<HSub>(instruction, Primitive::kPrimFloat, dex_pc);
2194 Binop_12x<HSub>(instruction, Primitive::kPrimDouble, dex_pc);
2199 Binop_12x<HMul>(instruction, Primitive::kPrimInt, dex_pc);
2204 Binop_12x<HMul>(instruction, Primitive::kPrimLong, dex_pc);
2209 Binop_12x<HMul>(instruction, Primitive::kPrimFloat, dex_pc);
2214 Binop_12x<HMul>(instruction, Primitive::kPrimDouble, dex_pc);
2220 dex_pc, Primitive::kPrimInt, false, true);
2226 dex_pc, Primitive::kPrimLong, false, true);
2232 dex_pc, Primitive::kPrimInt, false, false);
2238 dex_pc, Primitive::kPrimLong, false, false);
2243 Binop_12x<HRem>(instruction, Primitive::kPrimFloat, dex_pc);
2248 Binop_12x<HRem>(instruction, Primitive::kPrimDouble, dex_pc);
2253 Binop_12x_shift<HShl>(instruction, Primitive::kPrimInt, dex_pc);
2258 Binop_12x_shift<HShl>(instruction, Primitive::kPrimLong, dex_pc);
2263 Binop_12x_shift<HShr>(instruction, Primitive::kPrimInt, dex_pc);
2268 Binop_12x_shift<HShr>(instruction, Primitive::kPrimLong, dex_pc);
2273 Binop_12x_shift<HUShr>(instruction, Primitive::kPrimInt, dex_pc);
2278 Binop_12x_shift<HUShr>(instruction, Primitive::kPrimLong, dex_pc);
2283 Binop_12x<HDiv>(instruction, Primitive::kPrimFloat, dex_pc);
2288 Binop_12x<HDiv>(instruction, Primitive::kPrimDouble, dex_pc);
2293 Binop_12x<HAnd>(instruction, Primitive::kPrimInt, dex_pc);
2298 Binop_12x<HAnd>(instruction, Primitive::kPrimLong, dex_pc);
2303 Binop_12x<HOr>(instruction, Primitive::kPrimInt, dex_pc);
2308 Binop_12x<HOr>(instruction, Primitive::kPrimLong, dex_pc);
2313 Binop_12x<HXor>(instruction, Primitive::kPrimInt, dex_pc);
2318 Binop_12x<HXor>(instruction, Primitive::kPrimLong, dex_pc);
2323 Binop_22s<HAdd>(instruction, false, dex_pc);
2328 Binop_22s<HAnd>(instruction, false, dex_pc);
2333 Binop_22s<HOr>(instruction, false, dex_pc);
2338 Binop_22s<HXor>(instruction, false, dex_pc);
2343 Binop_22s<HSub>(instruction, true, dex_pc);
2348 Binop_22s<HMul>(instruction, false, dex_pc);
2353 Binop_22b<HAdd>(instruction, false, dex_pc);
2358 Binop_22b<HAnd>(instruction, false, dex_pc);
2363 Binop_22b<HOr>(instruction, false, dex_pc);
2368 Binop_22b<HXor>(instruction, false, dex_pc);
2373 Binop_22b<HSub>(instruction, true, dex_pc);
2378 Binop_22b<HMul>(instruction, false, dex_pc);
2385 dex_pc, Primitive::kPrimInt, true, true);
2392 dex_pc, Primitive::kPrimInt, true, false);
2397 Binop_22b<HShl>(instruction, false, dex_pc);
2402 Binop_22b<HShr>(instruction, false, dex_pc);
2407 Binop_22b<HUShr>(instruction, false, dex_pc);
2412 if (!BuildNewInstance(instruction.VRegB_21c(), dex_pc)) {
2428 dex_pc,
2441 BuildFilledNewArray(dex_pc, type_index, number_of_vreg_arguments, false, args, 0);
2450 dex_pc, type_index, number_of_vreg_arguments, true, nullptr, register_index);
2455 BuildFillArrayData(instruction, dex_pc);
2469 Binop_23x_cmp(instruction, Primitive::kPrimLong, ComparisonBias::kNoBias, dex_pc);
2474 Binop_23x_cmp(instruction, Primitive::kPrimFloat, ComparisonBias::kGtBias, dex_pc);
2479 Binop_23x_cmp(instruction, Primitive::kPrimDouble, ComparisonBias::kGtBias, dex_pc);
2484 Binop_23x_cmp(instruction, Primitive::kPrimFloat, ComparisonBias::kLtBias, dex_pc);
2489 Binop_23x_cmp(instruction, Primitive::kPrimDouble, ComparisonBias::kLtBias, dex_pc);
2510 if (!BuildInstanceFieldAccess(instruction, dex_pc, false)) {
2530 if (!BuildInstanceFieldAccess(instruction, dex_pc, true)) {
2543 if (!BuildStaticFieldAccess(instruction, dex_pc, false)) {
2556 if (!BuildStaticFieldAccess(instruction, dex_pc, true)) {
2564 BuildArrayAccess(instruction, dex_pc, false, anticipated_type); \
2568 BuildArrayAccess(instruction, dex_pc, true, anticipated_type); \
2581 HInstruction* object = LoadNullCheckedLocal(instruction.VRegB_12x(), dex_pc);
2582 AppendInstruction(new (arena_) HArrayLength(object, dex_pc));
2590 new (arena_) HLoadString(graph_->GetCurrentMethod(), string_index, *dex_file_, dex_pc));
2598 new (arena_) HLoadString(graph_->GetCurrentMethod(), string_index, *dex_file_, dex_pc));
2620 dex_pc,
2628 AppendInstruction(new (arena_) HLoadException(dex_pc));
2630 AppendInstruction(new (arena_) HClearException(dex_pc));
2636 AppendInstruction(new (arena_) HThrow(exception, dex_pc));
2647 BuildTypeCheck(instruction, destination, reference, type_index, dex_pc);
2654 BuildTypeCheck(instruction, -1, reference, type_index, dex_pc);
2662 dex_pc));
2670 dex_pc));
2676 BuildSwitch(instruction, dex_pc);