<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>On Dec 16, 2007, at 3:41 PM, lists wrote:</div><blockquote type="cite"><br>i can visit every instruction in each function, identify the<br>appropriate CallInst, get the CallSite of the instruction and extract<br>the appropriate (Value) argument with getArgument(X). Unfortunately I<br>can't figure out how to get from the Value of the argument to its<br>definition/assignment site.<br></blockquote></div><br><div>The Value* <i>is</i> the definition.  Instruction inherits from Value.  If your argument was defined by an instruction (it could also be an argument of the parent function, or a global, or a constant), then the Value* you have is polymorphically an Instruction*.  You can use the dyn_cast<...> facilities to test this at runtime.</div><div><br class="webkit-block-placeholder"></div><div>--Owen</div></body></html>