summaryrefslogtreecommitdiffstats
path: root/polly/lib/Support/ScopHelper.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'polly/lib/Support/ScopHelper.cpp')
-rw-r--r--polly/lib/Support/ScopHelper.cpp6
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)))
OpenPOWER on IntegriCloud