diff options
author | Johannes Doerfert <doerfert@cs.uni-saarland.de> | 2014-11-07 08:31:31 +0000 |
---|---|---|
committer | Johannes Doerfert <doerfert@cs.uni-saarland.de> | 2014-11-07 08:31:31 +0000 |
commit | 80ef110ccaab14f8bdadd01de989dea7139b956c (patch) | |
tree | 2efc5efb7922c4bfe8b80151168724f7f41a5bfd /polly/lib/Support/ScopHelper.cpp | |
parent | 1fb1a044e5cedc0ebda23ae0566565c336f9ceb5 (diff) | |
download | bcm5719-llvm-80ef110ccaab14f8bdadd01de989dea7139b956c.tar.gz bcm5719-llvm-80ef110ccaab14f8bdadd01de989dea7139b956c.zip |
[Refactor][NFC] Generalize the creation of ScopArrayInfo objects.
Differential Revision: http://reviews.llvm.org/D6031
llvm-svn: 221512
Diffstat (limited to 'polly/lib/Support/ScopHelper.cpp')
-rw-r--r-- | polly/lib/Support/ScopHelper.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/polly/lib/Support/ScopHelper.cpp b/polly/lib/Support/ScopHelper.cpp index 9541c8edffd..1b7b9a217d0 100644 --- a/polly/lib/Support/ScopHelper.cpp +++ b/polly/lib/Support/ScopHelper.cpp @@ -66,6 +66,12 @@ Value *polly::getPointerOperand(Instruction &Inst) { return 0; } +Type *polly::getAccessInstType(Instruction *AccInst) { + if (StoreInst *Store = dyn_cast<StoreInst>(AccInst)) + return Store->getValueOperand()->getType(); + return AccInst->getType(); +} + bool polly::hasInvokeEdge(const PHINode *PN) { for (unsigned i = 0, e = PN->getNumIncomingValues(); i < e; ++i) if (InvokeInst *II = dyn_cast<InvokeInst>(PN->getIncomingValue(i))) |