<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>On May 30, 2009, at 5:03 AM, Rotem Varon wrote:</div><blockquote type="cite"><div dir="ltr">Is it possible to determine the liveout of the operands (see example bellow) ?<br><br>        %5 = add i32 %4, %3    <br><br>For '%5': i can simply use " i->isUsedOutsideOfBlock() "<br>
For '%3' and '%4' : this is the question ...<br></div></blockquote><div><br></div><div>By definition, operands are live out if they're used in any block that's reachable from</div><div>the block containing the instruction.  Barring a few special cases we've already</div><div>covered, the easiest way I know to compute that in general is to first calculate the</div><div>set of reachable blocks, then iterate through the uses, checking whether that use</div><div>is in a reachable block (if the use is in a PHI node, only count it if the</div><div>corresponding incoming block is reachable).</div><div><br></div></div><div><blockquote type="cite"><div dir="ltr">From your answer, is it possible to determine <b>which</b> value is liveout ( in binary instruction)?<br></div></blockquote><div><br></div>All of these answers are things you would do for an individual LLVM "Value".  I don't</div><div>know what you mean by "which value" beyond that, and I don't know what you mean</div><div>by "in binary instruction".</div><div><br></div><div>John.</div></body></html>