//It means, that there is no entry in this block. Don't add it
public void addBlock(Set<CFANode> nodes, CFANode blockHead) {
    Set<ReferencedVariable> referencedVariables = collectReferencedVariables(nodes);
    Set<CFANode> callNodes = collectCallNodes(nodes);
    Set<CFANode> returnNodes = collectReturnNodes(nodes);
    Set<FunctionEntryNode> innerFunctionCalls = collectInnerFunctionCalls(nodes);
    if (callNodes.isEmpty()) {
     /* What shall we do with function, which is not called from anywhere?
      * There are problems with them at partitioning building stage
      */
      return;
    }
    CFANode registerNode = null;
    for (CFANode node : callNodes) {
      registerNode = node;
      if (node instanceof FunctionEntryNode) {
        break;
      }
    }
    if (registerNode == null) {
      //It means, that there is no entry in this block. Don't add it
      return;
    }
    referencedVariablesMap.put(registerNode, referencedVariables);
    callNodesMap.put(registerNode, callNodes);
    returnNodesMap.put(registerNode, returnNodes);
    innerFunctionCallsMap.put(registerNode, innerFunctionCalls);
    blockNodesMap.put(registerNode, nodes);
  }
}
if (registerNode == null) {
//It means, that there is no entry in this block. Don't add it
return;
}
return;
}
CFANode registerNode = null;
for (CFANode node : callNodes) {
registerNode = node;
if (node instanceof FunctionEntryNode) {
break;
}
}
if (registerNode == null) {
//It means, that there is no entry in this block. Don't add it
return;
}
referencedVariablesMap.put(registerNode, referencedVariables);
callNodesMap.put(registerNode, callNodes);
returnNodesMap.put(registerNode, returnNodes);
innerFunctionCallsMap.put(registerNode, innerFunctionCalls);
blockNodesMap.put(registerNode, nodes);
}
public void addBlock(Set<CFANode> nodes, CFANode blockHead) {
Set<ReferencedVariable> referencedVariables = collectReferencedVariables(nodes);
Set<CFANode> callNodes = collectCallNodes(nodes);
Set<CFANode> returnNodes = collectReturnNodes(nodes);
Set<FunctionEntryNode> innerFunctionCalls = collectInnerFunctionCalls(nodes);
if (callNodes.isEmpty()) {
/* What shall we do with function, which is not called from anywhere?
* There are problems with them at partitioning building stage
*/
return;
}
CFANode registerNode = null;
for (CFANode node : callNodes) {
registerNode = node;
if (node instanceof FunctionEntryNode) {
break;
}
}
if (registerNode == null) {
//It means, that there is no entry in this block. Don't add it
return;
}
referencedVariablesMap.put(registerNode, referencedVariables);
callNodesMap.put(registerNode, callNodes);
returnNodesMap.put(registerNode, returnNodes);
innerFunctionCallsMap.put(registerNode, innerFunctionCalls);
blockNodesMap.put(registerNode, nodes);
}