- Removed the CLI options
--alias-analysisand-P. PhASAR now only supports the default alias analysis pipeline from LLVM consisting of TBAA, ScopedNoAliasAA and BasicAA. - Default build mode is no longer
SHAREDbutSTATIC. To build in shared mode, use the cmake optionBUILD_SHARED_LIBSwhich we don't recommend anymore. Consider usingPHASAR_BUILD_DYNLIBinstead to build one big libphasar.so.
EdgeFunctionPtrTypeis no longer astd::shared_ptr. InsteadEdgeFunction<l_t>should be used directly.EdgeFunctionis now a value-type that encapsulates its memory management by itself.- Concrete
EdgeFunctiontypes no longer derive from any base-class. Instead they just need to implement the required API functions.EdgeFunctionimplementations should me move-constructible and can be implicitly cast toEdgeFunction. To verify that your type implements the edge function interface use theIsEdgeFunctiontype trait. The API functions have been changed as follows:- All API functions of
EdgeFunctionmust beconstqualified. EdgeFunctionPtrType composeWith(EdgeFunctionPtrType SecondFunction)andEdgeFunctionPtrType joinWith(EdgeFunctionPtrType OtherFunction)have been changed tostatic EdgeFunction<l_t> compose(EdgeFunctionRef<T> This, const EdgeFunction<l_t>& SecondFunction)andstatic EdgeFunction<l_t> join(EdgeFunctionRef<T> This, const EdgeFunction<l_t>& OtherFunction)respectively. Here, theThisparameter models the formershared_from_this().bool equal_to(EdgeFunctionPtrType Other)consthas been changed tobool operator==(const T &Other)const noexcept, whereTis your concrete edge function type.void print(llvm::raw_ostream &OS, bool IsForDebug)has been changed tofriend llvm::raw_ostream &operator<<(llvm::raw_ostream &OS, const T& EF).
- All API functions of
EdgeFunctionis tagged with[[clang::trivial_abi]]. Hence, you should not rely on any destruction order within a top-level statement that uses temporaryEdgeFunctionobjects.EdgeFunctionSingletonFactoryhas been removed. UseEdgeFunctionSingletonCacheinstead.TaintConfighas been renamed toLLVMTaintConfig. For generic code you may want to use the LLVM-independentTaintConfigBaseCRTP interface instead.- Renamed
phasar/PhasarLLVM/DataFlowSolver/to eitherphasar/DataFlow/orphasar/PhasarLLVM/DataFlow/depending on whether the components need LLVMCore. Analoguous changes inlib/andunittests/. An incomplete list of moved/renamed files:phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Solver/*=>phasar/DataFlow/IfdsIde/Solver/*phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IDETabulationProblem.h=>phasar/DataFlow/IfdsIde/IDETabulationProblem.hphasar/DB/LLVMProjectIRDB.h=>phasar/PhasarLLVM/DB/LLVMProjectIRDB.h- ...
- Renamed and split up some libraries:
phasar_phasarllvm_utils=>phasar_llvm_utilsphasar_typehierarchy=>phasar_llvm_typehierarchyphasar_ifdside=>phasar_llvm_ifdsidephasar_controlflowhas its LLVM dependent stuff moved tophasar_llvm_controlflowphasar_dbhas its LLVM dependent stuff moved tophasar_llvm_dbphasar_pointerhas its LLVM dependent stuff moved tophasar_llvm_pointer
- Renamed the phasar tool
phasar-llvmtophasar-cli LLVMPointsTo[.*]has been renamed toLLVMAlias[.*]- The ctor of
LLVMAliasSetnow takes theLLVMProjectIRDBas pointer instead of a reference to better document that it may capture the IRDB by reference. - The
PointsToInfointerface has been replaced by the CRTP interfaceAliasInfoBase. Introduced two type-erased implementations of that interface:AliasInfoandAliasInfoRef. In most cases you should replacePointsToInfo *andLLVMPointsToInfo *byAliasInfoRef, bzw.LLVMAliasInfoRef. - Introduced a new interface
PointsToInfoBaseand type-erased implementationsPointstoInfoandPointsToInfoRef. Don't confuse them with the oldPointsToInfo!!! (However, they have different APIs, so you should encounter compilation errors then)
- Removed virtual interfaces
CFG<N,F>andICFG<N,F>and replaced by CRTP interfacesCFGBaseandICFGBase. Use the concrete typesLLVMBasedICFGandLLVMBasedCFGinstead. In template code you can use the type traitsis_crtp_base_of_vandis_icfg_vto check for conformance to the interfaces. - The
LLVMBasedICFGnow takes the IRDB as pointer instead of a reference to better document that it may capture the IRDB by reference. - Renamed
ProjectIRDBtoLLVMProjectIRDBand added a generic CRTP interfaceProjectIRDBBasethat does not depend on LLVM - Changed the API of
LLVMProjectIRDB: The IRDB does no longer link multiple LLVM modules together, i.e. the ctor that reads a module from a file now takes a single filename instead of a vector. If you still want to link multiple LLVM modules together, use LLVM's Linker functionality instead.ProjecIRDB::getAllModules()has been removed andProjectIRDB::getWPAModule()has been renamed toLLVMProjectIRDB::getModule(). - The
LLVMProjectIRDBctor that takes a raw-pointer tollvm::Moduledoes no longer preprocess the module (i.e. attaching metadata IDs to it). You can still explicitly use theValueAnnotationPassto do so manually. - The type
WholeProgramAnalysishas been removed. UseAnalysisControllerinstead. - The IFDS and IDE TabulationProblems no longer take all of
LLVMProjectIRDB*,LLVMTypeHierarchy*,LLVMPointsToInfo*andLLVMBasedICFG*as an argument. Instead, they only get what they need. - The
IFDSSolverandIDESolvernow take an instance of theICFGBaseinterface as additional argument to their ctor (because the analysis problems now not necessarily store a reference to it anymore). - The
IDETabulationProblemis now a base class ofIFDSTabulationProblem(and not vice versa as it was previously). In their ctors they only take the bare minimum of arguments: The IRDB, the entrypoints and optionally the special zero-value. If the zero-value is not passed in the ctor (as it was previously), it has to be set from within the client analysis' ctor. You may use the new functioninitializeZeroValue(d_t)for this.