aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/SparcV9/LiveVar/BBLiveVar.cpp
diff options
context:
space:
mode:
authorAlkis Evlogimenos <alkis@evlogimenos.com>2003-12-14 13:24:17 +0000
committerAlkis Evlogimenos <alkis@evlogimenos.com>2003-12-14 13:24:17 +0000
commit4d7af65903cbc858464362e70a6adf499982ec8a (patch)
tree5f40fb851e4f08c9aa8ebe952bb876ccb02c2ffb /lib/Target/SparcV9/LiveVar/BBLiveVar.cpp
parent97323a47d88315b98e5ac38d64ba2a9e3f02b501 (diff)
Change interface of MachineOperand as follows:
a) remove opIsUse(), opIsDefOnly(), opIsDefAndUse() b) add isUse(), isDef() c) rename opHiBits32() to isHiBits32(), opLoBits32() to isLoBits32(), opHiBits64() to isHiBits64(), opLoBits64() to isLoBits64(). This results to much more readable code, for example compare "op.opIsDef() || op.opIsDefAndUse()" to "op.isDef()" a pattern used very often in the code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10461 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/SparcV9/LiveVar/BBLiveVar.cpp')
-rw-r--r--lib/Target/SparcV9/LiveVar/BBLiveVar.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/Target/SparcV9/LiveVar/BBLiveVar.cpp b/lib/Target/SparcV9/LiveVar/BBLiveVar.cpp
index 758f1b1539..270fbbd830 100644
--- a/lib/Target/SparcV9/LiveVar/BBLiveVar.cpp
+++ b/lib/Target/SparcV9/LiveVar/BBLiveVar.cpp
@@ -52,12 +52,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.isDefOnly() || OpI.isDefAndUse()) // add to Defs if this operand is a def
+ if (OpI.isDef()) // 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->getImplicitOp(i).opIsDefOnly() || MI->getImplicitOp(i).opIsDefAndUse())
+ if (MI->getImplicitOp(i).isDef())
addDef(MI->getImplicitRef(i));
// iterate over MI operands to find uses
@@ -68,8 +68,7 @@ void BBLiveVar::calcDefUseSets() {
if (isa<BasicBlock>(Op))
continue; // don't process labels
- if (OpI.isUseOnly() || OpI.isDefAndUse()) {
- // add to Uses only if this operand is a use
+ if (OpI.isUse()) { // add to Uses only if this operand is a use
//
// *** WARNING: The following code for handling dummy PHI machine
// instructions is untested. The previous code was broken and I
@@ -104,7 +103,7 @@ void BBLiveVar::calcDefUseSets() {
if (Op->getType() == Type::LabelTy) // don't process labels
continue;
- if (MI->getImplicitOp(i).opIsUse() || MI->getImplicitOp(i).opIsDefAndUse())
+ if (MI->getImplicitOp(i).isUse())
addUse(Op);
}
} // for all machine instructions