From 30b254e48be5813a904ee0db136964e2593196ea Mon Sep 17 00:00:00 2001 From: Andrew Lenharth Date: Tue, 7 Nov 2006 20:39:05 +0000 Subject: [PATCH] Optionally allow comparison operations from affect DSGraphs llvm-svn: 31511 --- llvm/lib/Analysis/DataStructure/Local.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/llvm/lib/Analysis/DataStructure/Local.cpp b/llvm/lib/Analysis/DataStructure/Local.cpp index 2542fd01962c..856ceb3c9a5f 100644 --- a/llvm/lib/Analysis/DataStructure/Local.cpp +++ b/llvm/lib/Analysis/DataStructure/Local.cpp @@ -40,6 +40,10 @@ static cl::opt TrackIntegersAsPointers("dsa-track-integers", cl::Hidden, cl::desc("If this is set, track integers as potential pointers")); +static cl::opt +IgnoreSetCC("dsa-ignore-setcc", cl::Hidden, + cl::desc("If this is set, do nothing at pointer comparisons")); + static cl::list AllocList("dsa-alloc-list", cl::value_desc("list"), @@ -336,7 +340,8 @@ void GraphBuilder::visitSelectInst(SelectInst &SI) { void GraphBuilder::visitSetCondInst(SetCondInst &SCI) { if (!isPointerType(SCI.getOperand(0)->getType()) || isa(SCI.getOperand(1))) return; // Only pointers - ScalarMap[SCI.getOperand(0)].mergeWith(getValueDest(*SCI.getOperand(1))); + if(!IgnoreSetCC) + ScalarMap[SCI.getOperand(0)].mergeWith(getValueDest(*SCI.getOperand(1))); }