diff options
| author | Alkis Evlogimenos <alkis@evlogimenos.com> | 2003-12-14 13:24:17 +0000 |
|---|---|---|
| committer | Alkis Evlogimenos <alkis@evlogimenos.com> | 2003-12-14 13:24:17 +0000 |
| commit | aaba4639f8b4e4b516b5d0534e726fe596c21081 (patch) | |
| tree | 1b5d6e541d3ff5c644c4a2e7b5534e5137499573 /llvm/lib/CodeGen/RegAlloc/LiveRangeInfo.cpp | |
| parent | fbeb3b02c3d0012b3c56f166905cabd2e4b09706 (diff) | |
| download | bcm5719-llvm-aaba4639f8b4e4b516b5d0534e726fe596c21081.tar.gz bcm5719-llvm-aaba4639f8b4e4b516b5d0534e726fe596c21081.zip | |
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.
llvm-svn: 10461
Diffstat (limited to 'llvm/lib/CodeGen/RegAlloc/LiveRangeInfo.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/RegAlloc/LiveRangeInfo.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/RegAlloc/LiveRangeInfo.cpp b/llvm/lib/CodeGen/RegAlloc/LiveRangeInfo.cpp index 9fd04d2b0e4..380680448d3 100644 --- a/llvm/lib/CodeGen/RegAlloc/LiveRangeInfo.cpp +++ b/llvm/lib/CodeGen/RegAlloc/LiveRangeInfo.cpp @@ -184,7 +184,7 @@ void LiveRangeInfo::constructLiveRanges() { // for each operand that is defined by the instruction for (MachineInstr::val_op_iterator OpI = MInst->begin(), OpE = MInst->end(); OpI != OpE; ++OpI) - if (OpI.isDefOnly() || OpI.isDefAndUse()) { + if (OpI.isDef()) { const Value *Def = *OpI; bool isCC = (OpI.getMachineOperand().getType() == MachineOperand::MO_CCRegister); @@ -203,8 +203,7 @@ void LiveRangeInfo::constructLiveRanges() { // iterate over implicit MI operands and create a new LR // for each operand that is defined by the instruction for (unsigned i = 0; i < MInst->getNumImplicitRefs(); ++i) - if (MInst->getImplicitOp(i).opIsDefOnly() || - MInst->getImplicitOp(i).opIsDefAndUse()) { + if (MInst->getImplicitOp(i).isDef()) { const Value *Def = MInst->getImplicitRef(i); LiveRange* LR = createOrAddToLiveRange(Def, /*isCC*/ false); @@ -342,7 +341,7 @@ void LiveRangeInfo::coalesceLRs() // iterate over MI operands to find defs for(MachineInstr::const_val_op_iterator DefI = MI->begin(), DefE = MI->end(); DefI != DefE; ++DefI) { - if (DefI.isDefOnly() || DefI.isDefAndUse()) { // this operand is modified + if (DefI.isDef()) { // this operand is modified LiveRange *LROfDef = getLiveRangeForValue( *DefI ); RegClass *RCOfDef = LROfDef->getRegClass(); |

