Propagate the information from another node to this node. To be used to propagate information from a node to its exit nodes. Returns true, if new variables were added and thus the current node has to be traversed again.
| 72 | /// Returns true, if new variables were added and thus the current node has |
| 73 | /// to be traversed again. |
| 74 | bool propagateFrom(NodeInfo const& _entryNode) |
| 75 | { |
| 76 | size_t previousUnassignedVariablesAtEntry = unassignedVariablesAtEntry.size(); |
| 77 | size_t previousUninitializedVariableAccesses = uninitializedVariableAccesses.size(); |
| 78 | unassignedVariablesAtEntry += _entryNode.unassignedVariablesAtExit; |
| 79 | uninitializedVariableAccesses += _entryNode.uninitializedVariableAccesses; |
| 80 | return |
| 81 | unassignedVariablesAtEntry.size() > previousUnassignedVariablesAtEntry || |
| 82 | uninitializedVariableAccesses.size() > previousUninitializedVariableAccesses |
| 83 | ; |
| 84 | } |
| 85 | }; |
| 86 | std::map<CFGNode const*, NodeInfo> nodeInfos; |
| 87 | std::set<CFGNode const*> nodesToTraverse; |
no test coverage detected