mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-19 11:02:59 +02:00
--added support for implicit operands
llvm-svn: 832
This commit is contained in:
parent
183e59e94a
commit
b19c5a1332
@ -14,28 +14,35 @@ void LiveVarSet::applyTranferFuncForMInst(const MachineInstr *const MInst)
|
||||
|
||||
for( MachineInstr::val_op_const_iterator OpI(MInst); !OpI.done() ; OpI++) {
|
||||
|
||||
if( OpI.isDef() ) { // kill only if this operand is a def
|
||||
if( OpI.isDef() ) // kill only if this operand is a def
|
||||
remove(*OpI); // this definition kills any uses
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// do for implicit operands as well
|
||||
for( unsigned i=0; i < MInst->getNumImplicitRefs(); ++i) {
|
||||
if( MInst->implicitRefIsDefined(i) )
|
||||
remove( MInst->getImplicitRef(i) );
|
||||
}
|
||||
|
||||
|
||||
for( MachineInstr::val_op_const_iterator OpI(MInst); !OpI.done() ; OpI++) {
|
||||
|
||||
if ( ((*OpI)->getType())->isLabelType()) continue; // don't process labels
|
||||
|
||||
if( ! OpI.isDef() ) { // add only if this operand is a use
|
||||
|
||||
if( ! OpI.isDef() ) // add only if this operand is a use
|
||||
add( *OpI ); // An operand is a use - so add to use set
|
||||
}
|
||||
}
|
||||
|
||||
// do for implicit operands as well
|
||||
for( unsigned i=0; i < MInst->getNumImplicitRefs(); ++i) {
|
||||
if( ! MInst->implicitRefIsDefined(i) )
|
||||
add( MInst->getImplicitRef(i) );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#if 0
|
||||
void LiveVarSet::applyTranferFuncForInst(const Instruction *const Inst)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user