1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 11:42:57 +01:00

Use range for

llvm-svn: 213230
This commit is contained in:
Matt Arsenault 2014-07-17 06:19:06 +00:00
parent 54393bb30e
commit 45d9529fe9

View File

@ -95,14 +95,12 @@ bool AMDGPUTTI::hasBranchDivergence() const { return true; }
void AMDGPUTTI::getUnrollingPreferences(Loop *L,
UnrollingPreferences &UP) const {
for (Loop::block_iterator BI = L->block_begin(), BE = L->block_end();
BI != BE; ++BI) {
BasicBlock *BB = *BI;
for (BasicBlock::const_iterator I = BB->begin(), E = BB->end();
I != E; ++I) {
const GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(I);
for (const BasicBlock *BB : L->getBlocks()) {
for (const Instruction &I : *BB) {
const GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(&I);
if (!GEP || GEP->getAddressSpace() != AMDGPUAS::PRIVATE_ADDRESS)
continue;
const Value *Ptr = GEP->getPointerOperand();
const AllocaInst *Alloca = dyn_cast<AllocaInst>(GetUnderlyingObject(Ptr));
if (Alloca) {