diff --git a/llvm/lib/Analysis/DataStructure/Local.cpp b/llvm/lib/Analysis/DataStructure/Local.cpp index a7b2579612df..79f392078a19 100644 --- a/llvm/lib/Analysis/DataStructure/Local.cpp +++ b/llvm/lib/Analysis/DataStructure/Local.cpp @@ -33,13 +33,18 @@ using namespace llvm; static RegisterAnalysis X("datastructure", "Local Data Structure Analysis"); +static cl::opt +TrackIntegersAsPointers("dsa-track-integers", + cl::desc("If this is set, track integers as potential pointers")); + + namespace llvm { namespace DS { // isPointerType - Return true if this type is big enough to hold a pointer. bool isPointerType(const Type *Ty) { if (isa(Ty)) return true; - else if (Ty->isPrimitiveType() && Ty->isInteger()) + else if (TrackIntegersAsPointers && Ty->isPrimitiveType() &&Ty->isInteger()) return Ty->getPrimitiveSize() >= PointerSize; return false; }