Lib/Liveness/LiveSet.cpp
/**
 * Find possible register in each register file
 */
Find possible register in each register file
Find possible register in each register file
RegId LiveSets::choose_register(std::vector<bool> &possible, bool check_limit) {
  assert(!possible.empty());
  RegId chosenA = -1;
  for (int j = 0; j < (int) possible.size(); j++)
    if (possible[j]) { chosenA = j; break; }
  if (check_limit && chosenA < 0) {
    error("LiveSets::choose_register(): register allocation failed, insufficient capacity", true);
  }
  return chosenA;
}
RegId LiveSets :: choose_register ( std :: vector < bool > & possible , bool check_limit ) { assert ( ! possible . empty ( ) ) ; RegId chosenA = -1 ; for ( int j = 0 ; j < ( int ) possible . size ( ) ; j ++ ) if ( possible [ j ] ) { chosenA = j ; break ; } if ( check_limit && chosenA < 0 ) { error ( " " , true ) ; } return chosenA ; }
Find possible register in each register file
Find possible register in each register file