From: Matt Arsenault Date: Thu, 17 Jul 2014 06:13:41 +0000 (+0000) Subject: R600: Short circuit alloca check if address space isn't private. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=df4663be6a9dd427ee0b73a1ea47d6791e5dfc53;p=oota-llvm.git 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@213229 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/R600/AMDGPUTargetTransformInfo.cpp b/lib/Target/R600/AMDGPUTargetTransformInfo.cpp index ea78f431588..f90b92f7c94 100644 --- a/lib/Target/R600/AMDGPUTargetTransformInfo.cpp +++ b/lib/Target/R600/AMDGPUTargetTransformInfo.cpp @@ -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(I); - if (!GEP) + if (!GEP || GEP->getAddressSpace() != AMDGPUAS::PRIVATE_ADDRESS) continue; const Value *Ptr = GEP->getPointerOperand(); const AllocaInst *Alloca = dyn_cast(GetUnderlyingObject(Ptr));