Avoid double negatives
authorChris Lattner <sabre@nondot.org>
Sat, 28 Jun 2003 21:58:28 +0000 (21:58 +0000)
committerChris Lattner <sabre@nondot.org>
Sat, 28 Jun 2003 21:58:28 +0000 (21:58 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6945 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/DataStructure/DataStructure.cpp
lib/Analysis/DataStructure/DataStructureAA.cpp

index 2f64eb074cea2644255981455c768724ce61d459..33c36c38e7069177d0e834e9b5ca38716d546795 100644 (file)
@@ -751,7 +751,7 @@ void DSGraph::mergeInGraph(DSCallSite &CS, const DSGraph &Graph,
 //
 static void markIncompleteNode(DSNode *N) {
   // Stop recursion if no node, or if node already marked...
-  if (N == 0 || (N->isIncomplete())) return;
+  if (N == 0 || N->isIncomplete()) return;
 
   // Actually mark the node
   N->setIncompleteMarker();
@@ -917,7 +917,7 @@ void DSGraph::removeTriviallyDeadNodes() {
 
   for (unsigned i = 0; i != Nodes.size(); ++i) {
     DSNode *Node = Nodes[i];
-    if (!Node->isIncomplete() && !Node->isModified() && !Node->isRead()) {
+    if (Node->isComplete() && !Node->isModified() && !Node->isRead()) {
       // This is a useless node if it has no mod/ref info (checked above),
       // outgoing edges (which it cannot, as it is not modified in this
       // context), and it has no incoming edges.  If it is a global node it may
index 3c89e6d26700cbfc321bf892f89f3831439bb4e0..f39e2ad9b6bf3b65aa5f0d30a99857998be9ad14 100644 (file)
@@ -90,7 +90,7 @@ AliasAnalysis::AliasResult DSAA::alias(const Value *V1, unsigned V1Size,
         unsigned O1 = I->second.getOffset(), O2 = J->second.getOffset();
         
         // We can only make a judgement of one of the nodes is complete...
-        if (!N1->isIncomplete() || !N2->isIncomplete()) {
+        if (N1->isComplete() || N2->isComplete()) {
           if (N1 != N2)
             return NoAlias;   // Completely different nodes.