Package com.google.havlak.shared.lsg

Examples of com.google.havlak.shared.lsg.SimpleLoop


      // Collapse/Unionize nodes in a SCC to a single node
      // For every SCC found, create a loop descriptor and link it in.
      //
      if ((nodePool.size() > 0) || (type[w] == BasicBlockClass.BB_SELF)) {
        SimpleLoop loop = lsg.createNewLoop();

        loop.setHeader(nodeW);
        loop.setIsReducible(type[w] != BasicBlockClass.BB_IRREDUCIBLE);

        // At this point, one can set attributes to the loop, such as:
        //
        // the bottom node:
        //    iter  = backPreds[w].begin();
        //    loop bottom is: nodes[iter].node);
        //
        // the number of backedges:
        //    backPreds[w].size()
        //
        // whether this loop is reducible:
        //    type[w] != BasicBlockClass.BB_IRREDUCIBLE
        //
        nodes[w].setLoop(loop);

        for (UnionFindNode node : nodePool) {
          // Add nodes to loop descriptor.
          header[node.getDfsNumber()] = w;
          node.union(nodes[w]);

          // Nested loops are not added, but linked together.
          if (node.getLoop() != null) {
            node.getLoop().setParent(loop);
          } else {
            loop.addNode(node.getBb());
          }
        }

        lsg.addLoop(loop);
      // nodePool.size
View Full Code Here

TOP

Related Classes of com.google.havlak.shared.lsg.SimpleLoop

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.