diff options
Diffstat (limited to 'llvm/lib/Analysis/BasicAliasAnalysis.cpp')
-rw-r--r-- | llvm/lib/Analysis/BasicAliasAnalysis.cpp | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/llvm/lib/Analysis/BasicAliasAnalysis.cpp b/llvm/lib/Analysis/BasicAliasAnalysis.cpp index 68f052f..6064bd6 100644 --- a/llvm/lib/Analysis/BasicAliasAnalysis.cpp +++ b/llvm/lib/Analysis/BasicAliasAnalysis.cpp @@ -68,15 +68,6 @@ using namespace llvm; static cl::opt<bool> EnableRecPhiAnalysis("basic-aa-recphi", cl::Hidden, cl::init(true)); -/// By default, even on 32-bit architectures we use 64-bit integers for -/// calculations. This will allow us to more-aggressively decompose indexing -/// expressions calculated using i64 values (e.g., long long in C) which is -/// common enough to worry about. -static cl::opt<bool> ForceAtLeast64Bits("basic-aa-force-at-least-64b", - cl::Hidden, cl::init(true)); -static cl::opt<bool> DoubleCalcBits("basic-aa-double-calc-bits", - cl::Hidden, cl::init(false)); - /// SearchLimitReached / SearchTimes shows how often the limit of /// to decompose GEPs is reached. It will affect the precision /// of basic alias analysis. @@ -459,14 +450,6 @@ static APInt adjustToPointerSize(const APInt &Offset, unsigned PointerSize) { return (Offset << ShiftBits).ashr(ShiftBits); } -static unsigned getMaxPointerSize(const DataLayout &DL) { - unsigned MaxPointerSize = DL.getMaxPointerSizeInBits(); - if (MaxPointerSize < 64 && ForceAtLeast64Bits) MaxPointerSize = 64; - if (DoubleCalcBits) MaxPointerSize *= 2; - - return MaxPointerSize; -} - namespace { // A linear transformation of a Value; this class represents // ZExt(SExt(V, SExtBits), ZExtBits) * Scale. @@ -547,7 +530,7 @@ BasicAAResult::DecomposeGEPExpression(const Value *V, const DataLayout &DL, SearchTimes++; const Instruction *CxtI = dyn_cast<Instruction>(V); - unsigned MaxPointerSize = getMaxPointerSize(DL); + unsigned MaxPointerSize = DL.getMaxPointerSizeInBits(); DecomposedGEP Decomposed; Decomposed.Offset = APInt(MaxPointerSize, 0); Decomposed.HasCompileTimeConstantScale = true; |