コード例 #1
0
  private void updateKillGenSet(String methodName, StoreStmt stmt, BlockDataFlowState bFlow) {
    if (stmt == null) return;

    BitSet gen = bFlow.getGen();

    gen.set(this.uniqueGlobals.get(methodName).indexOf(stmt.getVariable()));
  }
コード例 #2
0
  private void initialize(String methodName) {
    this.cfgBlocksToProcess.clear();
    HashSet<Name> temp = new HashSet<Name>();

    for (CFGBlock block : this.mMap.get(methodName).getCfgBlocks()) {
      List<LIRStatement> blockStmts = block.getStatements();
      for (int i = 0; i < blockStmts.size(); i++) {
        LIRStatement stmt = blockStmts.get(i);
        if (stmt.getClass().equals(QuadrupletStmt.class)) {
          QuadrupletStmt qStmt = (QuadrupletStmt) stmt;

          if (qStmt.getDestination().isGlobal()) temp.add(qStmt.getDestination());
        } else if (stmt.getClass().equals(StoreStmt.class)) {
          StoreStmt sStmt = (StoreStmt) stmt;
          temp.add(sStmt.getVariable());
        }
      }

      this.cfgBlocksToProcess.add(block);
    }

    this.uniqueGlobals.put(methodName, new ArrayList<Name>());
    this.uniqueGlobals.get(methodName).addAll(temp);
  }