[llvm-commits] CVS: llvm/lib/CWriter/Writer.cpp
Chris Lattner
lattner at cs.uiuc.edu
Wed Oct 15 11:49:01 PDT 2003
Changes in directory llvm/lib/CWriter:
Writer.cpp updated: 1.132 -> 1.133
---
Log message:
Decrease usage of use_size()
---
Diffs of the changes: (+1 -1)
Index: llvm/lib/CWriter/Writer.cpp
diff -u llvm/lib/CWriter/Writer.cpp:1.132 llvm/lib/CWriter/Writer.cpp:1.133
--- llvm/lib/CWriter/Writer.cpp:1.132 Mon Oct 13 15:32:04 2003
+++ llvm/lib/CWriter/Writer.cpp Wed Oct 15 11:48:26 2003
@@ -88,7 +88,7 @@
static bool isInlinableInst(const Instruction &I) {
// Must be an expression, must be used exactly once. If it is dead, we
// emit it inline where it would go.
- if (I.getType() == Type::VoidTy || I.use_size() != 1 ||
+ if (I.getType() == Type::VoidTy || !I.hasOneUse() ||
isa<TerminatorInst>(I) || isa<CallInst>(I) || isa<PHINode>(I) ||
isa<LoadInst>(I) || isa<VarArgInst>(I))
// Don't inline a load across a store or other bad things!
More information about the llvm-commits
mailing list