libredex/InstructionLowering.cpp
/*
 * Necessary condition for an instruction to be converted to /range form
 */
Necessary condition for an instruction to be converted to /range form
Necessary condition for an instruction to be converted to / range form
bool has_contiguous_srcs(const IRInstruction* insn) {
  if (insn->srcs_size() == 0) {
    return true;
  }
  auto last = insn->src(0);
  for (size_t i = 1; i < insn->srcs_size(); ++i) {
    if (insn->src(i) - last != 1) {
      return false;
    }
    last = insn->src(i);
  }
  return true;
}
bool has_contiguous_srcs ( const IRInstruction * insn ) { if ( insn -> srcs_size ( ) == 0 ) { return true ; } auto last = insn -> src ( 0 ) ; for ( size_t i = 1 ; i < insn -> srcs_size ( ) ; ++ i ) { if ( insn -> src ( i ) - last != 1 ) { return false ; } last = insn -> src ( i ) ; } return true ; }
Necessary condition for an instruction to be converted to /range form
Necessary condition for an instruction to be converted to / range form