forked from OSchip/llvm-project
R600: Short circuit alloca check if address space isn't private.
Skip calling GetUnderlyingObject in cases where it obviously isn't from an alloca. This should only be a compile time improvement. llvm-svn: 213229
This commit is contained in:
parent
de409fd798
commit
5e2b0f51e7
|
@ -101,7 +101,7 @@ void AMDGPUTTI::getUnrollingPreferences(Loop *L,
|
|||
for (BasicBlock::const_iterator I = BB->begin(), E = BB->end();
|
||||
I != E; ++I) {
|
||||
const GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(I);
|
||||
if (!GEP)
|
||||
if (!GEP || GEP->getAddressSpace() != AMDGPUAS::PRIVATE_ADDRESS)
|
||||
continue;
|
||||
const Value *Ptr = GEP->getPointerOperand();
|
||||
const AllocaInst *Alloca = dyn_cast<AllocaInst>(GetUnderlyingObject(Ptr));
|
||||
|
|
Loading…
Reference in New Issue