[llvm-commits] [llvm] r67202 - /llvm/trunk/lib/Transforms/Scalar/ScalarReplAggregates.cpp
Zhou Sheng
zhousheng00 at gmail.com
Wed Mar 18 05:48:56 PDT 2009
Author: sheng
Date: Wed Mar 18 07:48:48 2009
New Revision: 67202
URL: http://llvm.org/viewvc/llvm-project?rev=67202&view=rev
Log:
Explicitly check for StoreInst, do not lose the chance to delete
unused loads or bitcasts.
Modified:
llvm/trunk/lib/Transforms/Scalar/ScalarReplAggregates.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/ScalarReplAggregates.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/ScalarReplAggregates.cpp?rev=67202&r1=67201&r2=67202&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/ScalarReplAggregates.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/ScalarReplAggregates.cpp Wed Mar 18 07:48:48 2009
@@ -1223,7 +1223,7 @@
CleanupGEP(GEPI);
else if (Instruction *I = dyn_cast<Instruction>(U)) {
SmallVector<DbgInfoIntrinsic *, 2> DbgInUses;
- if (!I->use_empty() && OnlyUsedByDbgInfoIntrinsics(I, &DbgInUses)) {
+ if (!isa<StoreInst>(I) && OnlyUsedByDbgInfoIntrinsics(I, &DbgInUses)) {
// Safe to remove debug info uses.
while (!DbgInUses.empty()) {
DbgInfoIntrinsic *DI = DbgInUses.back(); DbgInUses.pop_back();
More information about the llvm-commits
mailing list