Skip to content

Commit

Permalink
fix global handling in type state analysis
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Mory committed Aug 2, 2023
1 parent f1c5865 commit ac973ce
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,11 @@ IDETypeStateAnalysis::getRetFlowFunction(
RelAllocas.insert(Allocas.begin(), Allocas.end());
}
Res.insert(RelAllocas.begin(), RelAllocas.end());
if (llvm::isa<llvm::Constant>(Source)) {
const auto &SourceAndAliases =
Analysis->getWMAliasesAndAllocas(Source);
Res.insert(SourceAndAliases.begin(), SourceAndAliases.end());
};
return Res;
}
return {Source};
Expand Down Expand Up @@ -414,6 +419,8 @@ IDETypeStateAnalysis::getCallToRetFlowFunction(
return killManyFlows<d_t>(getWMAliasesAndAllocas(Arg.get()));
}
}
return killFlowIf<d_t>(
[](d_t Source) { return llvm::isa<llvm::Constant>(Source); });
}
}
return Identity<IDETypeStateAnalysis::d_t>::getInstance();
Expand Down

0 comments on commit ac973ce

Please sign in to comment.