search for: liveoutsideofblock

Displaying 4 results from an estimated 4 matches for "liveoutsideofblock".

2005 May 11
3
[LLVMdev] Computing live values
Say I want to find all LLVM Value*-es that a live on exit from a basic block. What's the best way? - The 'LiveRange', 'LiveVariables' and 'LiveIntervals' classes seem to be tied to register allocation. - The ./lib/Target/SparcV9/LiveVar/FunctionLiveVarInfo.h file seem to provide what I need, but it's no a public header. - Volodya
2005 May 11
1
[LLVMdev] Computing live values
...seem to be tied >>> to register allocation. >>> - The ./lib/Target/SparcV9/LiveVar/FunctionLiveVarInfo.h file seem to provide >>> what I need, but it's no a public header. >> >> This is overkill. I would suggest something like this: >> >> bool LiveOutsideOfBlock(Instruction *I) { >> for (Value::use_iterator UI = I->use_begin(), E = I->use_end(); UI != E; ++UI) >> if (cast<Instruction>(*UI))->getParent() != I->getParent()) return true; >> return false; >> } > > Is this really going to work? What if...
2005 May 12
0
[LLVMdev] Computing live values
...llocation. >>>> - The ./lib/Target/SparcV9/LiveVar/FunctionLiveVarInfo.h file seem >>>> to provide >>>> what I need, but it's no a public header. >>> >>> This is overkill. I would suggest something like this: >>> >>> bool LiveOutsideOfBlock(Instruction *I) { >>> for (Value::use_iterator UI = I->use_begin(), E = I->use_end(); >>> UI != E; ++UI) >>> if (cast<Instruction>(*UI))->getParent() != I->getParent()) >>> return true; >>> return false; >>> } >...
2005 May 12
1
[LLVMdev] Computing live values
On Thursday 12 May 2005 04:56, Vikram Adve wrote: > > Good point. :) If PHI nodes matter (depends on your application), it > > would turn into something like this: > > > > bool LiveOutsideOfBlock(Instruction *I) { > > for (Value::use_iterator UI = I->use_begin(), E = I->use_end(); UI > > != E; ++UI) > > if (cast<Instruction>(*UI))->getParent() != I->getParent() || > > isa<PHINode>(*UI)) > > return true; >...