Optionally allow comparison operations from affect DSGraphs
authorAndrew Lenharth <andrewl@lenharth.org>
Tue, 7 Nov 2006 20:39:05 +0000 (20:39 +0000)
committerAndrew Lenharth <andrewl@lenharth.org>
Tue, 7 Nov 2006 20:39:05 +0000 (20:39 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31511 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/DataStructure/Local.cpp

index 2542fd01962c9c3f5f463ec22966ef8f16ba8e6b..856ceb3c9a5fb85cbd984f2eb7685d82f2d6a236 100644 (file)
@@ -40,6 +40,10 @@ static cl::opt<bool>
 TrackIntegersAsPointers("dsa-track-integers", cl::Hidden,
          cl::desc("If this is set, track integers as potential pointers"));
 
+static cl::opt<bool>
+IgnoreSetCC("dsa-ignore-setcc", cl::Hidden,
+         cl::desc("If this is set, do nothing at pointer comparisons"));
+
 static cl::list<std::string>
 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<ConstantPointerNull>(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)));
 }