mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-20 16:17:38 +00:00
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
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user