summaryrefslogtreecommitdiffstats
path: root/polly/lib/Support/ScopHelper.cpp
diff options
context:
space:
mode:
authorMichael Kruse <llvm@meinersbur.de>2016-01-27 17:09:17 +0000
committerMichael Kruse <llvm@meinersbur.de>2016-01-27 17:09:17 +0000
commit70131d341620cb60cb1c516fefd3eb655241b173 (patch)
treedd643c8d1c0e38cb1d8b5214da65475d97513957 /polly/lib/Support/ScopHelper.cpp
parentcddde58f1c5d6956f669f690fb65920314f4e727 (diff)
downloadbcm5719-llvm-70131d341620cb60cb1c516fefd3eb655241b173.tar.gz
bcm5719-llvm-70131d341620cb60cb1c516fefd3eb655241b173.zip
Introduce MemAccInst helper class; NFC
MemAccInst wraps the common members of LoadInst and StoreInst. Also use of this class in: - ScopInfo::buildMemoryAccess - BlockGenerator::generateLocationAccessed - ScopInfo::addArrayAccess - Scop::buildAliasGroups - Replace every use of polly::getPointerOperand Reviewers: jdoerfert, grosser Differential Revision: http://reviews.llvm.org/D16530 llvm-svn: 258947
Diffstat (limited to 'polly/lib/Support/ScopHelper.cpp')
-rw-r--r--polly/lib/Support/ScopHelper.cpp11
1 files changed, 0 insertions, 11 deletions
diff --git a/polly/lib/Support/ScopHelper.cpp b/polly/lib/Support/ScopHelper.cpp
index 777eb9b518a..9bdfbc3e530 100644
--- a/polly/lib/Support/ScopHelper.cpp
+++ b/polly/lib/Support/ScopHelper.cpp
@@ -30,17 +30,6 @@ using namespace polly;
#define DEBUG_TYPE "polly-scop-helper"
-Value *polly::getPointerOperand(Instruction &Inst) {
- if (LoadInst *load = dyn_cast<LoadInst>(&Inst))
- return load->getPointerOperand();
- else if (StoreInst *store = dyn_cast<StoreInst>(&Inst))
- return store->getPointerOperand();
- else if (GetElementPtrInst *gep = dyn_cast<GetElementPtrInst>(&Inst))
- return gep->getPointerOperand();
-
- return 0;
-}
-
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