Lines Matching refs:mir
26 * instructions, where extended opcode at the MIR level are appended
801 // Beginning of extended MIR opcodes
914 const MIR::DecodedInstruction& d_insn) {
927 MIR* mir;
939 for (mir = bb->first_mir_insn; mir != NULL; mir = mir->next) {
940 uint64_t df_attributes = GetDataFlowAttributes(mir);
941 MIR::DecodedInstruction* d_insn = &mir->dalvikInsn;
980 HandleExtended(use_v, def_v, live_in_v, mir->dalvikInsn);
1017 void MIRGraph::AllocateSSAUseData(MIR *mir, int num_uses) {
1018 mir->ssa_rep->num_uses = num_uses;
1020 if (mir->ssa_rep->num_uses_allocated < num_uses) {
1021 mir->ssa_rep->uses = static_cast<int*>(arena_->Alloc(sizeof(int) * num_uses, kArenaAllocDFInfo));
1023 mir->ssa_rep->fp_use = static_cast<bool*>(arena_->Alloc(sizeof(bool) * num_uses, kArenaAllocDFInfo));
1027 void MIRGraph::AllocateSSADefData(MIR *mir, int num_defs) {
1028 mir->ssa_rep->num_defs = num_defs;
1030 if (mir->ssa_rep->num_defs_allocated < num_defs) {
1031 mir->ssa_rep->defs = static_cast<int*>(arena_->Alloc(sizeof(int) * num_defs,
1033 mir->ssa_rep->fp_def = static_cast<bool*>(arena_->Alloc(sizeof(bool) * num_defs,
1039 void MIRGraph::DataFlowSSAFormat35C(MIR* mir) {
1040 MIR::DecodedInstruction* d_insn = &mir->dalvikInsn;
1044 AllocateSSAUseData(mir, num_uses);
1047 HandleSSAUse(mir->ssa_rep->uses, d_insn->arg[i], i);
1052 void MIRGraph::DataFlowSSAFormat3RC(MIR* mir) {
1053 MIR::DecodedInstruction* d_insn = &mir->dalvikInsn;
1057 AllocateSSAUseData(mir, num_uses);
1060 HandleSSAUse(mir->ssa_rep->uses, d_insn->vC+i, i);
1064 void MIRGraph::DataFlowSSAFormatExtended(MIR* mir) {
1065 switch (static_cast<int>(mir->dalvikInsn.opcode)) {
1067 LOG(ERROR) << "Missing case for extended MIR: " << mir->dalvikInsn.opcode;
1074 MIR* mir;
1078 for (mir = bb->first_mir_insn; mir != NULL; mir = mir->next) {
1079 mir->ssa_rep =
1082 memset(mir->ssa_rep, 0, sizeof(*mir->ssa_rep));
1084 uint64_t df_attributes = GetDataFlowAttributes(mir);
1087 if (!MIR::DecodedInstruction::IsPseudoMirOp(mir->dalvikInsn.opcode)) {
1088 int flags = Instruction::FlagsOf(mir->dalvikInsn.opcode);
1090 if ((flags & Instruction::kInvoke) != 0 && (mir->optimization_flags & MIR_INLINED) == 0) {
1098 DataFlowSSAFormat35C(mir);
1103 DataFlowSSAFormat3RC(mir);
1108 DataFlowSSAFormatExtended(mir);
1133 AllocateSSAUseData(mir, num_uses);
1144 AllocateSSADefData(mir, num_defs);
1146 MIR::DecodedInstruction* d_insn = &mir->dalvikInsn;
1151 mir->ssa_rep->fp_use[num_uses] = df_attributes & DF_FP_A;
1152 HandleSSAUse(mir->ssa_rep->uses, d_insn->vA, num_uses++);
1154 mir->ssa_rep->fp_use[num_uses] = df_attributes & DF_FP_A;
1155 HandleSSAUse(mir->ssa_rep->uses, d_insn->vA+1, num_uses++);
1159 mir->ssa_rep->fp_use[num_uses] = df_attributes & DF_FP_B;
1160 HandleSSAUse(mir->ssa_rep->uses, d_insn->vB, num_uses++);
1162 mir->ssa_rep->fp_use[num_uses] = df_attributes & DF_FP_B;
1163 HandleSSAUse(mir->ssa_rep->uses, d_insn->vB+1, num_uses++);
1167 mir->ssa_rep->fp_use[num_uses] = df_attributes & DF_FP_C;
1168 HandleSSAUse(mir->ssa_rep->uses, d_insn->vC, num_uses++);
1170 mir->ssa_rep->fp_use[num_uses] = df_attributes & DF_FP_C;
1171 HandleSSAUse(mir->ssa_rep->uses, d_insn->vC+1, num_uses++);
1176 mir->ssa_rep->fp_def[0] = df_attributes & DF_FP_A;
1177 HandleSSADef(mir->ssa_rep->defs, d_insn->vA, 0);
1179 mir->ssa_rep->fp_def[1] = df_attributes & DF_FP_A;
1180 HandleSSADef(mir->ssa_rep->defs, d_insn->vA+1, 1);
1268 bool MIRGraph::InvokeUsesMethodStar(MIR* mir) {
1270 Instruction::Code opcode = mir->dalvikInsn.opcode;
1296 MethodReference target_method(cu_->dex_file, mir->dalvikInsn.vB);
1324 for (MIR* mir = bb->first_mir_insn; (mir != NULL); mir = mir->next) {
1325 if (mir->ssa_rep == NULL) {
1328 for (int i = 0; i < mir->ssa_rep->num_uses; i++) {
1329 int s_reg = mir->ssa_rep->uses[i];
1334 uint64_t df_attributes = GetDataFlowAttributes(mir);