mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-26 07:24:25 +00:00
*** empty log message ***
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
20
lib/Analysis/LiveVar/LiveVarSet.cpp
Normal file
20
lib/Analysis/LiveVar/LiveVarSet.cpp
Normal file
@ -0,0 +1,20 @@
|
||||
#include "llvm/Analysis/LiveVar/LiveVarSet.h"
|
||||
|
||||
|
||||
// This function applies an instruction to a live var set (accepts OutSet) and
|
||||
// makes necessary changes to it (produces InSet)
|
||||
|
||||
void LiveVarSet::applyTranferFuncForInst(const Instruction *const Inst)
|
||||
{
|
||||
|
||||
if( Inst->isDefinition() ) { // add to Defs iff this instr is a definition
|
||||
remove(Inst); // this definition kills any uses
|
||||
}
|
||||
Instruction::op_const_iterator OpI = Inst->op_begin(); // get operand iterat
|
||||
|
||||
for( ; OpI != Inst->op_end() ; OpI++) { // iterate over operands
|
||||
if ( ((*OpI)->getType())->isLabelType()) continue; // don't process labels
|
||||
add( *OpI ); // An operand is a use - so add to use set
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user