[llvm-commits] CVS: llvm/lib/Target/X86/InstSelectSimple.cpp

Chris Lattner lattner at cs.uiuc.edu
Wed Oct 15 11:49:09 PDT 2003


Changes in directory llvm/lib/Target/X86:

InstSelectSimple.cpp updated: 1.128 -> 1.129

---
Log message:

Decrease usage of use_size()


---
Diffs of the changes:  (+1 -1)

Index: llvm/lib/Target/X86/InstSelectSimple.cpp
diff -u llvm/lib/Target/X86/InstSelectSimple.cpp:1.128 llvm/lib/Target/X86/InstSelectSimple.cpp:1.129
--- llvm/lib/Target/X86/InstSelectSimple.cpp:1.128	Fri Oct 10 12:47:36 2003
+++ llvm/lib/Target/X86/InstSelectSimple.cpp	Wed Oct 15 11:48:28 2003
@@ -554,7 +554,7 @@
 //
 static SetCondInst *canFoldSetCCIntoBranch(Value *V) {
   if (SetCondInst *SCI = dyn_cast<SetCondInst>(V))
-    if (SCI->use_size() == 1 && isa<BranchInst>(SCI->use_back()) &&
+    if (SCI->hasOneUse() && isa<BranchInst>(SCI->use_back()) &&
         SCI->getParent() == cast<BranchInst>(SCI->use_back())->getParent()) {
       const Type *Ty = SCI->getOperand(0)->getType();
       if (Ty != Type::LongTy && Ty != Type::ULongTy)





More information about the llvm-commits mailing list