[llvm-commits] CVS: llvm/lib/Analysis/IPA/Andersens.cpp GlobalsModRef.cpp

Reid Spencer reid at x10sys.com
Fri Dec 22 22:06:54 PST 2006



Changes in directory llvm/lib/Analysis/IPA:

Andersens.cpp updated: 1.41 -> 1.42
GlobalsModRef.cpp updated: 1.26 -> 1.27
---
Log message:

For PR950: http://llvm.org/PR950 :
This patch removes the SetCC instructions and replaces them with the ICmp
and FCmp instructions. The SetCondInst instruction has been removed and 
been replaced with ICmpInst and FCmpInst.


---
Diffs of the changes:  (+6 -3)

 Andersens.cpp     |    5 ++++-
 GlobalsModRef.cpp |    4 ++--
 2 files changed, 6 insertions(+), 3 deletions(-)


Index: llvm/lib/Analysis/IPA/Andersens.cpp
diff -u llvm/lib/Analysis/IPA/Andersens.cpp:1.41 llvm/lib/Analysis/IPA/Andersens.cpp:1.42
--- llvm/lib/Analysis/IPA/Andersens.cpp:1.41	Tue Dec 19 16:30:33 2006
+++ llvm/lib/Analysis/IPA/Andersens.cpp	Sat Dec 23 00:05:40 2006
@@ -325,7 +325,8 @@
     void visitGetElementPtrInst(GetElementPtrInst &GEP);
     void visitPHINode(PHINode &PN);
     void visitCastInst(CastInst &CI);
-    void visitSetCondInst(SetCondInst &SCI) {} // NOOP!
+    void visitICmpInst(ICmpInst &ICI) {} // NOOP!
+    void visitFCmpInst(FCmpInst &ICI) {} // NOOP!
     void visitSelectInst(SelectInst &SI);
     void visitVAArg(VAArgInst &I);
     void visitInstruction(Instruction &I);
@@ -778,6 +779,8 @@
   case Instruction::Shl:
   case Instruction::LShr:
   case Instruction::AShr:
+  case Instruction::ICmp:
+  case Instruction::FCmp:
     return;
   default:
     // Is this something we aren't handling yet?


Index: llvm/lib/Analysis/IPA/GlobalsModRef.cpp
diff -u llvm/lib/Analysis/IPA/GlobalsModRef.cpp:1.26 llvm/lib/Analysis/IPA/GlobalsModRef.cpp:1.27
--- llvm/lib/Analysis/IPA/GlobalsModRef.cpp:1.26	Tue Dec 19 16:30:33 2006
+++ llvm/lib/Analysis/IPA/GlobalsModRef.cpp	Sat Dec 23 00:05:40 2006
@@ -251,8 +251,8 @@
       } else {
         return true;
       }
-    } else if (SetCondInst *SCI = dyn_cast<SetCondInst>(*UI)) {
-      if (!isa<ConstantPointerNull>(SCI->getOperand(1)))
+    } else if (ICmpInst *ICI = dyn_cast<ICmpInst>(*UI)) {
+      if (!isa<ConstantPointerNull>(ICI->getOperand(1)))
         return true;  // Allow comparison against null.
     } else if (FreeInst *F = dyn_cast<FreeInst>(*UI)) {
       Writers.push_back(F->getParent()->getParent());






More information about the llvm-commits mailing list