<div dir="ltr">Hi all,<div><br></div><div>I'm playing around with flow-sensitive AA, and it does a hefty amount of work in its <i>runOnModule</i>(...) method.  So I need a reliable way of relating the <i>Value</i> parameters supplied to the alias-query methods, back to the corresponding objects (Instructions, etc.) available when the <i>runOnModule</i>(...) method ran.  I *really* don't want to redo the analysis for a given IR instruction if I don't need to.</div><div><div><br></div><div>But I'm not finding much info as to whether or not I can count on my <i>runOnModule(...)</i> and my <i>alias</i>(...) methods being shown the same set of Instruction and Function objects as each other, in cases where the IR hasn't been modified.</div><div><br class="">It seems like LLVM IR basic blocks and instructions are only meant to be identified in one way: by the memory address of whatever <i>BasicBlock</i> or <i>Instruction</i> object is currently models it.  I.e., I haven't come across any other canonical way people use to refer to a given BB or instruction in the IR, assuming the IR hasn't been modified by any pass in the mean time.<br></div></div><div><br></div><div>The documentation for <i>WeakVH</i> sounds like it may be designed to force the kind of consistency I'm looking for, but I couldn't quite be sure.</div><div><br></div><div>I imagine I could dream up a stable naming scheme for each BB and instruction in a given function.  But if no one else has found a need to do that, it seems fishy that I would.</div><div><br></div><div>Thanks, Christian</div></div>