forked from OSchip/llvm-project
parent
5e2b0f51e7
commit
ac6e39cf3b
llvm/lib/Target/R600
|
@ -95,14 +95,12 @@ bool AMDGPUTTI::hasBranchDivergence() const { return true; }
|
||||||
|
|
||||||
void AMDGPUTTI::getUnrollingPreferences(Loop *L,
|
void AMDGPUTTI::getUnrollingPreferences(Loop *L,
|
||||||
UnrollingPreferences &UP) const {
|
UnrollingPreferences &UP) const {
|
||||||
for (Loop::block_iterator BI = L->block_begin(), BE = L->block_end();
|
for (const BasicBlock *BB : L->getBlocks()) {
|
||||||
BI != BE; ++BI) {
|
for (const Instruction &I : *BB) {
|
||||||
BasicBlock *BB = *BI;
|
const GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(&I);
|
||||||
for (BasicBlock::const_iterator I = BB->begin(), E = BB->end();
|
|
||||||
I != E; ++I) {
|
|
||||||
const GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(I);
|
|
||||||
if (!GEP || GEP->getAddressSpace() != AMDGPUAS::PRIVATE_ADDRESS)
|
if (!GEP || GEP->getAddressSpace() != AMDGPUAS::PRIVATE_ADDRESS)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
const Value *Ptr = GEP->getPointerOperand();
|
const Value *Ptr = GEP->getPointerOperand();
|
||||||
const AllocaInst *Alloca = dyn_cast<AllocaInst>(GetUnderlyingObject(Ptr));
|
const AllocaInst *Alloca = dyn_cast<AllocaInst>(GetUnderlyingObject(Ptr));
|
||||||
if (Alloca) {
|
if (Alloca) {
|
||||||
|
|
Loading…
Reference in New Issue