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.
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.
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;
ret void
}
-; FIXME: This should also be MustAlias as in the previous test.
define void @mustalias_overflow_in_32_with_var_index([1 x i8]* %ptr, i64 %n) {
; CHECK-LABEL: Function: mustalias_overflow_in_32_with_var_index
-; CHECK: NoAlias: i8* %gep.1, i8* %gep.2
+; CHECK: MustAlias: i8* %gep.1, i8* %gep.2
;
%gep.1 = getelementptr [1 x i8], [1 x i8]* %ptr, i64 %n, i64 4294967296
store i8 0, i8* %gep.1