File tree Expand file tree Collapse file tree
DataFlowSolver/IfdsIde/Problems Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1414#include < set>
1515#include < utility>
1616
17+ #include " llvm/ADT/STLExtras.h"
1718#include " llvm/Support/ErrorHandling.h"
1819
1920#include " phasar/Controller/AnalysisController.h"
Original file line number Diff line number Diff line change @@ -854,16 +854,20 @@ LLVMBasedICFG::buildCRuntimeGlobalCtorsDtorsModel(llvm::Module &M) {
854854 break ;
855855 case 2 :
856856 if (UEntry->getName () != " main" ) {
857- std::cerr << " ERROR: The only entrypoint, where parameters are "
858- " supported, is main\n " ;
857+ std::cerr
858+ << " WARNING: The only entrypoint, where parameters are "
859+ " supported, is 'main'.\n Automated global support for library "
860+ " analysis (entry-points=__ALL__) is not yet supported.\n " ;
859861 break ;
860862 }
861863
862864 IRB.CreateCall (UEntry, {GlobModel->getArg (0 ), GlobModel->getArg (1 )});
863865 break ;
864866 default :
865- std::cerr << " ERROR: Entrypoints with parameters are not supported, "
866- " except for argc and argv in main\n " ;
867+ std::cerr
868+ << " WARNING: Entrypoints with parameters are not supported, "
869+ " except for argc and argv in main.\n Automated global support for "
870+ " library analysis (entry-points=__ALL__) is not yet supported.\n " ;
867871 break ;
868872 }
869873
Original file line number Diff line number Diff line change @@ -257,9 +257,20 @@ IDELinearConstantAnalysis::initialSeeds() {
257257 // The analysis' entry points
258258 std::set<const llvm::Function *> EntryPointFuns;
259259
260- // Otherwise, consider the user-defined entry point(s)
261- for (const auto &EntryPoint : EntryPoints) {
262- EntryPointFuns.insert (IRDB->getFunctionDefinition (EntryPoint));
260+ // Consider the user-defined entry point(s)
261+ if (EntryPoints.size () == 1U &&
262+ EntryPoints.find (" __ALL__" ) != EntryPoints.end ()) {
263+ // Consider all available function definitions as entry points
264+ for (const auto *Fun : IRDB->getAllFunctions ()) {
265+ if (!Fun->isDeclaration ()) {
266+ EntryPointFuns.insert (Fun);
267+ }
268+ }
269+ } else {
270+ // Consider the user specified entry points
271+ for (const auto &EntryPoint : EntryPoints) {
272+ EntryPointFuns.insert (IRDB->getFunctionDefinition (EntryPoint));
273+ }
263274 }
264275
265276 // std::set initial seeds at the required entry points and generate global
You can’t perform that action at this time.
0 commit comments