Skip to content

Commit 1c35c90

Browse files
author
Martin Mory
committed
incorporated @vulder feedback
1 parent a6e2354 commit 1c35c90

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/LLVMFlowFunctions.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,8 @@ class MapFactsToCallee : public FlowFunction<const llvm::Value *, Container> {
182182
}
183183
container_type Res;
184184
// Pass global variables as is, if desired
185+
// Globals could also be actual arguments, then the formal argument needs to
186+
// be generated below.
185187
// Need llvm::Constant here to cover also ConstantExpr and ConstantAggregate
186188
if (PropagateGlobals && llvm::isa<llvm::Constant>(Source)) {
187189
Res.insert(Source);
@@ -259,11 +261,11 @@ class MapFactsToCaller : public FlowFunction<const llvm::Value *, Container> {
259261
const llvm::Function *CalleeFun;
260262
const llvm::ReturnInst *ExitInst;
261263
bool PropagateGlobals;
264+
const bool PropagateZeroToCaller;
262265
std::vector<const llvm::Value *> Actuals;
263266
std::vector<const llvm::Value *> Formals;
264267
std::function<bool(const llvm::Value *)> ParamPredicate;
265268
std::function<bool(const llvm::Function *)> ReturnPredicate;
266-
const bool PropagateZeroToCaller;
267269

268270
public:
269271
MapFactsToCaller(
@@ -277,9 +279,9 @@ class MapFactsToCaller : public FlowFunction<const llvm::Value *, Container> {
277279
: CallSite(CallSite), CalleeFun(CalleeFun),
278280
ExitInst(llvm::dyn_cast<llvm::ReturnInst>(ExitInst)),
279281
PropagateGlobals(PropagateGlobals),
282+
PropagateZeroToCaller(PropagateZeroToCaller),
280283
ParamPredicate(std::move(ParamPredicate)),
281-
ReturnPredicate(std::move(ReturnPredicate)),
282-
PropagateZeroToCaller(PropagateZeroToCaller) {
284+
ReturnPredicate(std::move(ReturnPredicate)) {
283285
assert(ExitInst && "Should not be null");
284286
// Set up the actual parameters
285287
for (const auto &Actual : CallSite->args()) {

0 commit comments

Comments
 (0)