34#include "llvm/Analysis/LoopInfo.h"
36#include "llvm/Transforms/Utils/Mem2Reg.h"
37#include "llvm/Passes/PassBuilder.h"
42using namespace SVFUtil;
54 for (Module::const_iterator
F =
M.begin(),
E =
M.end();
F !=
E; ++
F)
58 if (func->isDeclaration())
continue;
62 llvm::LoopInfoBase<llvm::BasicBlock, llvm::Loop>
loopInfo;
110 for (
const auto &
ins: *
BB)
119 for (
const auto &node:
nodes)
#define DBOUT(TYPE, X)
LLVM debug macros, define type of your DBUG model of each pass.
void addNodeToSVFLoop(const ICFGNode *node, const SVFLoop *loop)
Insert (node, loop) to icfgNodeToSVFLoopVec.
virtual void build(ICFG *icfg)
Start from here.
virtual void buildLLVMLoops(SVFModule *mod, ICFG *icfg)
Build llvm loops based on LoopInfo analysis.
virtual void buildSVFLoops(ICFG *icfg, std::vector< const Loop * > &llvmLoops)
Build SVF loops based on llvm loops.
static LLVMModuleSet * getLLVMModuleSet()
DominatorTree & getDomTree(const Function *fun)
ICFGNode * getICFGNode(const Instruction *inst)
Get a basic block ICFGNode.
SVFFunction * getSVFFunction(const Function *fun) const
const std::vector< std::reference_wrapper< Module > > & getLLVMModules() const
static const Option< u32_t > LoopBound
static SVFIR * getPAG(bool buildFromFile=false)
Singleton design here to make sure we only have one instance during any analysis.
bool isIntrinsicInst(const Instruction *inst)
Return true if it is an intrinsic instruction.
bool isExtCall(const SVFFunction *fun)
std::ostream & outs()
Overwrite llvm::outs()
llvm::BasicBlock BasicBlock
llvm::Instruction Instruction
llvm::IRBuilder IRBuilder
iter_range< typename GenericGraphTraits< GraphType >::nodes_iterator > nodes(const GraphType &G)
llvm::Loop Loop
LLVM Loop.