diff options
author | Vikram S. Adve <vadve@cs.uiuc.edu> | 2003-05-27 00:06:48 +0000 |
---|---|---|
committer | Vikram S. Adve <vadve@cs.uiuc.edu> | 2003-05-27 00:06:48 +0000 |
commit | a22eace55bb17af2728ca494b6d4557bdad82a09 (patch) | |
tree | 10b0eff58074b793ed4f5417dd83189558542be1 /lib/Analysis/LiveVar/FunctionLiveVarInfo.cpp | |
parent | 5f2180c53330502eb2f0f5bf3f21a838ad800906 (diff) |
Renamed MachienOperand::opIsDef to MachineOperand::opIsDefOnly()
and related functions and flags. Fixed several bugs where only
"isDef" was being checked, not "isDefAndUse".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6342 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/LiveVar/FunctionLiveVarInfo.cpp')
-rw-r--r-- | lib/Analysis/LiveVar/FunctionLiveVarInfo.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/Analysis/LiveVar/FunctionLiveVarInfo.cpp b/lib/Analysis/LiveVar/FunctionLiveVarInfo.cpp index 371cecdd5d..63c20194df 100644 --- a/lib/Analysis/LiveVar/FunctionLiveVarInfo.cpp +++ b/lib/Analysis/LiveVar/FunctionLiveVarInfo.cpp @@ -213,13 +213,14 @@ FunctionLiveVarInfo::getLiveVarSetAfterMInst(const MachineInstr *MI, static void applyTranferFuncForMInst(ValueSet &LVS, const MachineInstr *MInst) { for (MachineInstr::const_val_op_iterator OpI = MInst->begin(), OpE = MInst->end(); OpI != OpE; ++OpI) { - if (OpI.isDef()) // kill only if this operand is a def - LVS.erase(*OpI); // this definition kills any uses + if (OpI.isDefOnly() || OpI.isDefAndUse()) // kill if this operand is a def + LVS.erase(*OpI); // this definition kills any uses } // do for implicit operands as well for (unsigned i=0; i < MInst->getNumImplicitRefs(); ++i) { - if (MInst->implicitRefIsDefined(i)) + if (MInst->getImplicitOp(i).opIsDefOnly() || + MInst->getImplicitOp(i).opIsDefAndUse()) LVS.erase(MInst->getImplicitRef(i)); } @@ -227,14 +228,14 @@ static void applyTranferFuncForMInst(ValueSet &LVS, const MachineInstr *MInst) { OpE = MInst->end(); OpI != OpE; ++OpI) { if (!isa<BasicBlock>(*OpI)) // don't process labels // add only if this operand is a use - if (!OpI.isDef() || OpI.isDefAndUse() ) + if (!OpI.isDefOnly() || OpI.isDefAndUse() ) LVS.insert(*OpI); // An operand is a use - so add to use set } // do for implicit operands as well for (unsigned i = 0, e = MInst->getNumImplicitRefs(); i != e; ++i) - if (!MInst->implicitRefIsDefined(i) || - MInst->implicitRefIsDefinedAndUsed(i)) + if (MInst->getImplicitOp(i).opIsUse() || + MInst->getImplicitOp(i).opIsDefAndUse()) LVS.insert(MInst->getImplicitRef(i)); } |