-
Notifications
You must be signed in to change notification settings - Fork 142
Update to Newer LLVM Versions
This page is intended to give PhASAR's users an easier time to follow LLVM updates. We try to keep up to date with LLVM's most recent stable version. Users of PhASAR are therefore also required to update their code.
In the following, we report on the major changes that we had to make to PhASAR to keep it compatible with the most recent LLVM version. This information should provide useful insights to users that also need to update their code base. LLVM's changelog can be found here: https://releases.llvm.org/download.html---check out the release notes for the respective version.
This will be the next major LLVM update and has not been implemented yet. In the transition from 14 to 15, LLVM removes the default support for typed pointer-types and from there on only supports opaque pointers (see Opaque Pointers) by default. Non-opaque pointers are deprecated.
As a consequence, PhASAR analyses can no longer assume that we can invoke getElementType()
on a llvm::PointerType
and getPointerElementType()
from llvm::Type
.
Some analyses such as the IfdsFieldSensTaintAnalysis and a number of utilities (e.g. the DataFlowUtils) require pointer element types.
These require larger transition within PhASAR which probably will result in breaking changes.
There were no major changes
The most prominent API change involves the handling of call sites. Rather than analyzing call sites using the llvm::ImmutableCallSite
type in code similar to what follows:
const llvm::Instruction *I = /* some instruction */;
if (llvm::isa<llvm::CallInst>(I) || llvm::isa<llvm::InvokeInst>(I)) {
llvm::ImmutableCallSite CS(I);
// analyze CS
}
users now have to use the llvm::CallBase
type instead:
const llvm::Instruction *I = /* some instruction */;
if (const auto *CB = llvm::dyn_cast<llvm::CallBase>(I)) {
// analyze CB
}
Please check https://llvm.org/doxygen/classllvm_1_1CallBase.html for details on llvm::CallBase
.
- Home
- Reference Material
- Getting Started:
- Building PhASAR
- Using PhASAR with Docker
- A few uses of PhASAR
- Coding Conventions
- Contributing to PhASAR
- Errors and bug reporting
- Update to Newer LLVM Versions
- OS Support