diff options
author | Sebastian Pop <spop@codeaurora.org> | 2013-11-13 22:37:58 +0000 |
---|---|---|
committer | Sebastian Pop <spop@codeaurora.org> | 2013-11-13 22:37:58 +0000 |
commit | 7ee147246ff65aa7c6c241e320e4e847bc2e3e73 (patch) | |
tree | eea0cd76e2deb135a52d37ae321b9fc8bd222869 /llvm/lib/Analysis/Delinearization.cpp | |
parent | 7244bee1a8379073cb249e5540d0cd3528cec65f (diff) | |
download | bcm5719-llvm-7ee147246ff65aa7c6c241e320e4e847bc2e3e73.tar.gz bcm5719-llvm-7ee147246ff65aa7c6c241e320e4e847bc2e3e73.zip |
add more comments around the delinearization of arrays
llvm-svn: 194612
Diffstat (limited to 'llvm/lib/Analysis/Delinearization.cpp')
-rw-r--r-- | llvm/lib/Analysis/Delinearization.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Analysis/Delinearization.cpp b/llvm/lib/Analysis/Delinearization.cpp index 6cc27b630cb..3ed0609cf38 100644 --- a/llvm/lib/Analysis/Delinearization.cpp +++ b/llvm/lib/Analysis/Delinearization.cpp @@ -83,6 +83,8 @@ void Delinearization::print(raw_ostream &O, const Module *) const { O << "Delinearization on function " << F->getName() << ":\n"; for (inst_iterator I = inst_begin(F), E = inst_end(F); I != E; ++I) { Instruction *Inst = &(*I); + + // Only analyze loads and stores. if (!isa<StoreInst>(Inst) && !isa<LoadInst>(Inst) && !isa<GetElementPtrInst>(Inst)) continue; @@ -93,6 +95,8 @@ void Delinearization::print(raw_ostream &O, const Module *) const { for (Loop *L = LI->getLoopFor(BB); L != NULL; L = L->getParentLoop()) { const SCEV *AccessFn = SE->getSCEVAtScope(getPointerOperand(*Inst), L); const SCEVAddRecExpr *AR = dyn_cast<SCEVAddRecExpr>(AccessFn); + + // Do not try to delinearize memory accesses that are not AddRecs. if (!AR) break; |