diff options
author | Devang Patel <dpatel@apple.com> | 2008-03-05 23:39:23 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2008-03-05 23:39:23 +0000 |
commit | 26cabc447cd347b8b6f404ff67079fdcde623fa4 (patch) | |
tree | 27c30996ed1a67906c24dea5639022ee1e03bc83 /llvm/lib/Transforms/IPO/StructRetPromotion.cpp | |
parent | 82d506de291f17e307dee30bcd04d1d2436d613c (diff) | |
download | bcm5719-llvm-26cabc447cd347b8b6f404ff67079fdcde623fa4.tar.gz bcm5719-llvm-26cabc447cd347b8b6f404ff67079fdcde623fa4.zip |
Skip, for now, callsites where use of sret argument is not dominated by callsite.
llvm-svn: 47980
Diffstat (limited to 'llvm/lib/Transforms/IPO/StructRetPromotion.cpp')
-rw-r--r-- | llvm/lib/Transforms/IPO/StructRetPromotion.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/IPO/StructRetPromotion.cpp b/llvm/lib/Transforms/IPO/StructRetPromotion.cpp index 54a34e8803f..5275edaa169 100644 --- a/llvm/lib/Transforms/IPO/StructRetPromotion.cpp +++ b/llvm/lib/Transforms/IPO/StructRetPromotion.cpp @@ -171,6 +171,10 @@ bool SRETPromotion::isSafeToUpdateAllCallers(Function *F) { // If FirstArg user is a GEP whose all users are not LoadInst then // this function F is not suitable for sret promotion. else if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(ArgI)) { + // TODO : Use dom info and insert PHINodes to collect get results + // from multiple call sites for this GEP. + if (GEP->getParent() != Call->getParent()) + return false; for (Value::use_iterator GEPI = GEP->use_begin(), GEPE = GEP->use_end(); GEPI != GEPE; ++GEPI) if (!isa<LoadInst>(GEPI)) |