aboutsummaryrefslogtreecommitdiffstats
path: root/lib/VMCore/Value.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
commit2ec15e6013814873be395bf5a8f72155a444164b (patch)
treeab9b1cf7ba93de491166ef4b814f9b673ad8f2ae /lib/VMCore/Value.cpp
parent690aac6dc7ed4cd87c485d01e88ccbde82daadf6 (diff)
downloadexternal_llvm-2ec15e6013814873be395bf5a8f72155a444164b.zip
external_llvm-2ec15e6013814873be395bf5a8f72155a444164b.tar.gz
external_llvm-2ec15e6013814873be395bf5a8f72155a444164b.tar.bz2
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76437 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/Value.cpp')
-rw-r--r--lib/VMCore/Value.cpp2
1 files changed, 0 insertions, 2 deletions
diff --git a/lib/VMCore/Value.cpp b/lib/VMCore/Value.cpp
index 279eabb..ab2e35c 100644
--- a/lib/VMCore/Value.cpp
+++ b/lib/VMCore/Value.cpp
@@ -363,8 +363,6 @@ Value *Value::getUnderlyingObject() {
unsigned MaxLookup = 6;
do {
if (GEPOperator *GEP = dyn_cast<GEPOperator>(V)) {
- if (!GEP->hasNoPointerOverflow())
- return V;
V = GEP->getPointerOperand();
} else if (Operator::getOpcode(V) == Instruction::BitCast) {
V = cast<Operator>(V)->getOperand(0);