liberty/lib/Orchestration/DSWPCritic.cpp
// remove removable edges directly from the PDG
remove removable edges directly from the PDG
remove removable edges directly from the PDG
PDG DSWPCritic::getOptimisticPdg(PDG &pdg) {
  std::vector<Value *> loopInternals;
  for (auto internalNode : pdg.internalNodePairs()) {
    loopInternals.push_back(internalNode.first);
  }
  std::unordered_set<DGEdge<Value> *> edgesToIgnore;
  for (auto edge : pdg.getEdges()) {
    if (edge->isRemovableDependence()) {
      edgesToIgnore.insert(edge);
    }
  }
  auto optimisticPDG =
      pdg.createSubgraphFromValues(loopInternals, false, edgesToIgnore);
  return *optimisticPDG;
}
PDG DSWPCritic :: getOptimisticPdg ( PDG & pdg ) { std :: vector < Value * > loopInternals ; for ( auto internalNode : pdg . internalNodePairs ( ) ) { loopInternals . push_back ( internalNode . first ) ; } std :: unordered_set < DGEdge < Value > * > edgesToIgnore ; for ( auto edge : pdg . getEdges ( ) ) { if ( edge -> isRemovableDependence ( ) ) { edgesToIgnore . insert ( edge ) ; } } auto optimisticPDG = pdg . createSubgraphFromValues ( loopInternals , false , edgesToIgnore ) ; return * optimisticPDG ; }
remove removable edges directly from the PDG
remove removable edges directly from the PDG
// go through the PDG and add all removable edges to this set