diff options
Diffstat (limited to 'lib/Target')
| -rw-r--r-- | lib/Target/CBackend/CBackend.cpp | 2 | ||||
| -rw-r--r-- | lib/Target/CBackend/Writer.cpp | 2 | ||||
| -rw-r--r-- | lib/Target/SparcV9/InstrSelection/InstrForest.cpp | 2 | ||||
| -rw-r--r-- | lib/Target/X86/InstSelectSimple.cpp | 2 | ||||
| -rw-r--r-- | lib/Target/X86/X86ISelSimple.cpp | 2 |
5 files changed, 5 insertions, 5 deletions
diff --git a/lib/Target/CBackend/CBackend.cpp b/lib/Target/CBackend/CBackend.cpp index a3607be..af33e4b 100644 --- a/lib/Target/CBackend/CBackend.cpp +++ b/lib/Target/CBackend/CBackend.cpp @@ -88,7 +88,7 @@ namespace { 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! diff --git a/lib/Target/CBackend/Writer.cpp b/lib/Target/CBackend/Writer.cpp index a3607be..af33e4b 100644 --- a/lib/Target/CBackend/Writer.cpp +++ b/lib/Target/CBackend/Writer.cpp @@ -88,7 +88,7 @@ namespace { 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! diff --git a/lib/Target/SparcV9/InstrSelection/InstrForest.cpp b/lib/Target/SparcV9/InstrSelection/InstrForest.cpp index f4736b5..496e279 100644 --- a/lib/Target/SparcV9/InstrSelection/InstrForest.cpp +++ b/lib/Target/SparcV9/InstrSelection/InstrForest.cpp @@ -297,7 +297,7 @@ InstrForest::buildTreeForInstruction(Instruction *instr) // is used directly, i.e., made a child of the instruction node. // InstrTreeNode* opTreeNode; - if (isa<Instruction>(operand) && operand->use_size() == 1 && + if (isa<Instruction>(operand) && operand->hasOneUse() && cast<Instruction>(operand)->getParent() == instr->getParent() && instr->getOpcode() != Instruction::PHINode && instr->getOpcode() != Instruction::Call) diff --git a/lib/Target/X86/InstSelectSimple.cpp b/lib/Target/X86/InstSelectSimple.cpp index 9e4e499..a6dc7c9 100644 --- a/lib/Target/X86/InstSelectSimple.cpp +++ b/lib/Target/X86/InstSelectSimple.cpp @@ -554,7 +554,7 @@ void ISel::SelectPHINodes() { // 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) diff --git a/lib/Target/X86/X86ISelSimple.cpp b/lib/Target/X86/X86ISelSimple.cpp index 9e4e499..a6dc7c9 100644 --- a/lib/Target/X86/X86ISelSimple.cpp +++ b/lib/Target/X86/X86ISelSimple.cpp @@ -554,7 +554,7 @@ void ISel::SelectPHINodes() { // 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) |
