[llvm-commits] [llvm] r67194 - in /llvm/trunk/lib/Transforms: Scalar/ScalarReplAggregates.cpp Utils/Local.cpp

Duncan Sands baldrick at free.fr
Wed Mar 18 03:28:08 PDT 2009


Hi,

>      else if (Instruction *I = dyn_cast<Instruction>(U)) {
>        SmallVector<DbgInfoIntrinsic *, 2> DbgInUses;
> -      if (OnlyUsedByDbgInfoIntrinsics(I, &DbgInUses)) {
> +      if (!I->use_empty() && OnlyUsedByDbgInfoIntrinsics(I, &DbgInUses)) {
>          // Safe to remove debug info uses.
>          while (!DbgInUses.empty()) {
>            DbgInfoIntrinsic *DI = DbgInUses.back(); DbgInUses.pop_back();

why is it safe to delete the instruction itself (done just below)?
Does being used by debug intrinsics imply that the instruction cannot
write memory?

Ciao,

Duncan.



More information about the llvm-commits mailing list