mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-24 04:25:22 +00:00
Skip, for now, callsites where use of sret argument is not dominated by callsite.
llvm-svn: 47980
This commit is contained in:
parent
6bcc9808db
commit
63e7d0fe7d
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user