Only StoreInst/LoadInst are assigned numbers. Other types of instructions are not in LBI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358350
91177308-0d34-0410-b5e6-
96231b3b80d8
DIBuilder DIB(*AI->getModule(), /*AllowUnresolved*/ false);
ConvertDebugDeclareToDebugValue(DII, Info.OnlyStore, DIB);
DII->eraseFromParent();
- LBI.deleteValue(DII);
}
// Remove the (now dead) store and alloca.
Info.OnlyStore->eraseFromParent();
LBI.deleteValue(Info.OnlyStore);
AI->eraseFromParent();
- LBI.deleteValue(AI);
return true;
}
}
AI->eraseFromParent();
- LBI.deleteValue(AI);
// The alloca's debuginfo can be removed as well.
- for (DbgVariableIntrinsic *DII : Info.DbgDeclares) {
+ for (DbgVariableIntrinsic *DII : Info.DbgDeclares)
DII->eraseFromParent();
- LBI.deleteValue(DII);
- }
++NumLocalPromoted;
return true;