Skip to content

Commit 563b5c2

Browse files
committed
avoid unnecessary table copies
1 parent 273bde6 commit 563b5c2

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Solver/IDESolver.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -892,8 +892,8 @@ class IDESolver
892892
for (n_t n : Values) {
893893
for (n_t SP : ICF->getStartPointsOf(ICF->getFunctionOf(n))) {
894894
using TableCell = typename Table<d_t, d_t, EdgeFunctionPtrType>::Cell;
895-
Table<d_t, d_t, EdgeFunctionPtrType> LookupByTarget;
896-
LookupByTarget = JumpFn->lookupByTarget(n);
895+
Table<d_t, d_t, EdgeFunctionPtrType> &LookupByTarget =
896+
JumpFn->lookupByTarget(n);
897897
for (const TableCell &SourceValTargetValAndFunction :
898898
LookupByTarget.cellSet()) {
899899
d_t dPrime = SourceValTargetValAndFunction.getRowKey();

include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Solver/JumpFunctions.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ template <typename AnalysisDomainTy, typename Container> class JumpFunctions {
169169
* The return value is a set of records of the form
170170
* (sourceVal,targetVal,edgeFunction).
171171
*/
172-
Table<d_t, d_t, EdgeFunctionPtrType> lookupByTarget(n_t Target) {
172+
Table<d_t, d_t, EdgeFunctionPtrType> &lookupByTarget(n_t Target) {
173173
return NonEmptyLookupByTargetNode[Target];
174174
}
175175

0 commit comments

Comments
 (0)