summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/BasicAliasAnalysis.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2009-07-20 17:43:30 +0000
committerDan Gohman <gohman@apple.com>2009-07-20 17:43:30 +0000
commit33a3fd0b9c76d85c478de582d6a26d79c8ddefbb (patch)
tree55c923200c556084716a302394241343e81c9ed6 /llvm/lib/Analysis/BasicAliasAnalysis.cpp
parent4041dfc360403ede97e0949ddc19a453b2bf6b27 (diff)
downloadbcm5719-llvm-33a3fd0b9c76d85c478de582d6a26d79c8ddefbb.tar.gz
bcm5719-llvm-33a3fd0b9c76d85c478de582d6a26d79c8ddefbb.zip
Revert the addition of hasNoPointerOverflow to GEPOperator.
Getelementptrs that are defined to wrap are virtually useless to optimization, and getelementptrs that are undefined on any kind of overflow are too restrictive -- it's difficult to ensure that all intermediate addresses are within bounds. I'm going to take a different approach. Remove a few optimizations that depended on this flag. llvm-svn: 76437
Diffstat (limited to 'llvm/lib/Analysis/BasicAliasAnalysis.cpp')
-rw-r--r--llvm/lib/Analysis/BasicAliasAnalysis.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/llvm/lib/Analysis/BasicAliasAnalysis.cpp b/llvm/lib/Analysis/BasicAliasAnalysis.cpp
index dcb5903a14e..308c69a87ee 100644
--- a/llvm/lib/Analysis/BasicAliasAnalysis.cpp
+++ b/llvm/lib/Analysis/BasicAliasAnalysis.cpp
@@ -38,13 +38,8 @@ using namespace llvm;
// Useful predicates
//===----------------------------------------------------------------------===//
-static const User *isGEP(const Value *V) {
- if (const GEPOperator *GEP = dyn_cast<GEPOperator>(V))
- // For the purposes of BasicAliasAnalysis, if the GEP has overflow it
- // could do crazy things.
- if (GEP->hasNoPointerOverflow())
- return GEP;
- return 0;
+static const GEPOperator *isGEP(const Value *V) {
+ return dyn_cast<GEPOperator>(V);
}
static const Value *GetGEPOperands(const Value *V,
OpenPOWER on IntegriCloud