#include <BreakConstantExpr.h>
Definition at line 30 of file BreakConstantExpr.h.
◆ BreakConstantGEPs()
SVF::BreakConstantGEPs::BreakConstantGEPs |
( |
| ) |
|
|
inline |
◆ getPassName()
llvm::StringRef SVF::BreakConstantGEPs::getPassName |
( |
| ) |
const |
|
inline |
◆ runOnModule()
bool BreakConstantGEPs::runOnModule |
( |
Module & |
M | ) |
|
|
virtual |
Definition at line 186 of file BreakConstantExpr.cpp.
188 bool modified =
false;
189 for (Module::iterator
F = module.begin(), E = module.end();
F != E; ++
F)
192 std::vector<Instruction* > Worklist;
198 for (Function::iterator BB = (*F).begin(); BB != (*F).end(); ++BB)
200 for (BasicBlock::iterator i = BB->begin(); i != BB->end(); ++i)
211 Worklist.push_back (I);
220 if (Worklist.size()) modified =
true;
227 while (Worklist.size())
238 if (
PHINode * PHI = SVFUtil::dyn_cast<PHINode>(I))
254 for (
u32_t i2 =
index; i2 < PHI->getNumIncomingValues(); ++i2)
256 if ((PHI->getIncomingBlock (i2)) == PHI->getIncomingBlock (
index))
257 PHI->setIncomingValue (i2, NewInst);
259 Worklist.push_back (NewInst);
275 I->replaceUsesOfWith (CE, NewInst);
276 Worklist.push_back (NewInst);
static Instruction * convertExpression(ConstantExpr *CE, Instruction *InsertPt)
static ConstantExpr * hasConstantExpr(Value *V)
llvm::Instruction Instruction
llvm::ConstantExpr ConstantExpr
◆ ID
char BreakConstantGEPs::ID = 0 |
|
static |
The documentation for this class was generated from the following files: