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 | 6bbfe341ddf755d8fb48ecd2d516cd0bdafbd42f (patch) | |
tree | 2c9bf85d25f27f4e5a8aed14283f3b02c1785dc9 /llvm/lib/Analysis/LiveVar/BBLiveVar.cpp | |
parent | 7366fa1aa6d69a63e016abe7baec035690797f5a (diff) | |
download | bcm5719-llvm-6bbfe341ddf755d8fb48ecd2d516cd0bdafbd42f.tar.gz bcm5719-llvm-6bbfe341ddf755d8fb48ecd2d516cd0bdafbd42f.zip |
Renamed MachienOperand::opIsDef to MachineOperand::opIsDefOnly()
and related functions and flags. Fixed several bugs where only
"isDef" was being checked, not "isDefAndUse".
llvm-svn: 6342
Diffstat (limited to 'llvm/lib/Analysis/LiveVar/BBLiveVar.cpp')
-rw-r--r-- | llvm/lib/Analysis/LiveVar/BBLiveVar.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Analysis/LiveVar/BBLiveVar.cpp b/llvm/lib/Analysis/LiveVar/BBLiveVar.cpp index 81d3b529f32..3968430ca5d 100644 --- a/llvm/lib/Analysis/LiveVar/BBLiveVar.cpp +++ b/llvm/lib/Analysis/LiveVar/BBLiveVar.cpp @@ -64,12 +64,12 @@ void BBLiveVar::calcDefUseSets() { // iterate over MI operands to find defs for (MachineInstr::const_val_op_iterator OpI = MI->begin(), OpE = MI->end(); OpI != OpE; ++OpI) - if (OpI.isDef()) // add to Defs only if this operand is a def + if (OpI.isDefOnly() || OpI.isDefAndUse()) // add to Defs if this operand is a def addDef(*OpI); // do for implicit operands as well for (unsigned i = 0; i < MI->getNumImplicitRefs(); ++i) - if (MI->implicitRefIsDefined(i)) + if (MI->getImplicitOp(i).opIsDefOnly() || MI->getImplicitOp(i).opIsDefAndUse()) addDef(MI->getImplicitRef(i)); // iterate over MI operands to find uses @@ -80,7 +80,7 @@ void BBLiveVar::calcDefUseSets() { if (isa<BasicBlock>(Op)) continue; // don't process labels - if (!OpI.isDef() || OpI.isDefAndUse()) { + if (OpI.isUseOnly() || OpI.isDefAndUse()) { // add to Uses only if this operand is a use // // *** WARNING: The following code for handling dummy PHI machine @@ -116,7 +116,7 @@ void BBLiveVar::calcDefUseSets() { if (Op->getType() == Type::LabelTy) // don't process labels continue; - if (!MI->implicitRefIsDefined(i) || MI->implicitRefIsDefinedAndUsed(i) ) + if (MI->getImplicitOp(i).opIsUse() || MI->getImplicitOp(i).opIsDefAndUse()) addUse(Op); } } // for all machine instructions |