hphp/runtime/vm/jit/regionize-func.cpp
/**
 * Returns the sum of the weights of the arcs going from srcs to dst.
 */
Returns the sum of the weights of the arcs going from srcs to dst.
Returns the sum of the weights of the arcs going from srcs to dst .
static int64_t interRegionWeight(const TransIDVec& srcs,
                                 TransID           dst,
                                 const TransCFG&   cfg) {
  int64_t totalWeight = 0;
  for (auto src : srcs) {
    for (auto arc : cfg.outArcs(src)) {
      if (arc->dst() == dst) {
        totalWeight += arc->weight();
      }
    }
  }
  return totalWeight;
}
static int64_t interRegionWeight ( const TransIDVec & srcs , TransID dst , const TransCFG & cfg ) { int64_t totalWeight = 0 ; for ( auto src : srcs ) { for ( auto arc : cfg . outArcs ( src ) ) { if ( arc -> dst ( ) == dst ) { totalWeight += arc -> weight ( ) ; } } } return totalWeight ; }
Returns the sum of the weights of the arcs going from srcs to dst.
Returns the sum of the weights of the arcs going from srcs to dst .