Displaying 4 results from an estimated 4 matches for "deadinsts".
2014 Oct 18
2
[LLVMdev] Dereferencing NULL pointer in IndVarSimplify.cpp?
Hi,
Here is the code in IndVarSimplify.cpp.
SmallVector<WeakVH, 16> DeadInsts;
while (!DeadInsts.empty())
if (Instruction *Inst =
dyn_cast_or_null<Instruction>(&*DeadInsts.pop_back_val()))
RecursivelyDeleteTriviallyDeadInstructions(Inst, TLI);
Since DeadInsts.pop_back_val() is WeakVH which could hold a NULL
pointer, the expression, &*De...
2005 Jul 28
2
[LLVMdev] help with pointer-to-array conversion
...td::cerr << "Block After: " << *GEPI->getParent();
> }
> }
605c621,622
< void IndVarSimplify::runOnLoop(Loop *L) {
---
> void IndVarSimplify::runOnLoop(LoopInfo *LI, Loop *L) {
>
617c634
< EliminatePointerRecurrence(PN, Preheader, DeadInsts);
---
> EliminatePointerRecurrence(LI, L, PN, Preheader, DeadInsts);
626c643
< runOnLoop(*I);
---
> runOnLoop(LI,*I);
652,653c669,670
< if (SCEVAddRecExpr *AR = dyn_cast<SCEVAddRecExpr>(SCEV))
< if (AR->getNumOperands() == 2 &&
isa<...
2005 Jul 29
0
[LLVMdev] patch for pointer-to-array conversion
...change it into an integer recurrence, permitting
-/// analysis by the SCEV routines.
-void IndVarSimplify::EliminatePointerRecurrence(PHINode *PN,
- BasicBlock *Preheader,
- std::set<Instruction*>
&DeadInsts) {
- assert(PN->getNumIncomingValues() == 2 && "Noncanonicalized loop!");
- unsigned PreheaderIdx = PN->getBasicBlockIndex(Preheader);
- unsigned BackedgeIdx = PreheaderIdx^1;
- if (GetElementPtrInst *GEPI =
- dyn_cast<GetElementPtrInst>(PN->getIncomingValu...
2005 Jul 28
0
[LLVMdev] help with pointer-to-array conversion
...; << *GEPI->getParent();
>> }
>> }
> 605c621,622
> < void IndVarSimplify::runOnLoop(Loop *L) {
> ---
>> void IndVarSimplify::runOnLoop(LoopInfo *LI, Loop *L) {
>>
> 617c634
> < EliminatePointerRecurrence(PN, Preheader, DeadInsts);
> ---
>> EliminatePointerRecurrence(LI, L, PN, Preheader, DeadInsts);
> 626c643
> < runOnLoop(*I);
> ---
>> runOnLoop(LI,*I);
> 652,653c669,670
> < if (SCEVAddRecExpr *AR = dyn_cast<SCEVAddRecExpr>(SCEV))
> < if (AR-&...