1//===- ScalarReplAggregates.cpp - Scalar Replacement of Aggregates --------===// 2// 3// The LLVM Compiler Infrastructure 4// 5// This file is distributed under the University of Illinois Open Source 6// License. See LICENSE.TXT for details. 7// 8//===----------------------------------------------------------------------===// --- 1214 unchanged lines hidden (view full) --- 1223 // At this point, we know that the end result will be SROA'd and promoted, so 1224 // we can insert ugly code if required so long as sroa+mem2reg will clean it 1225 // up. 1226 for (Value::use_iterator UI = AI->use_begin(), E = AI->use_end(); 1227 UI != E; ) { 1228 User *U = *UI++; 1229 if (GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(U)) 1230 CleanupGEP(GEPI); |
1231 else { 1232 Instruction *I = cast<Instruction>(U); |
1233 SmallVector<DbgInfoIntrinsic *, 2> DbgInUses; 1234 if (!isa<StoreInst>(I) && OnlyUsedByDbgInfoIntrinsics(I, &DbgInUses)) { 1235 // Safe to remove debug info uses. 1236 while (!DbgInUses.empty()) { 1237 DbgInfoIntrinsic *DI = DbgInUses.back(); DbgInUses.pop_back(); 1238 DI->eraseFromParent(); 1239 } 1240 I->eraseFromParent(); --- 581 unchanged lines hidden --- |