<div dir="ltr">Hi Quentin, thanks for the tip.  I'll have a look.  Much appreciated.<div><br></div><div>- C</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jul 1, 2015 at 2:39 PM, Quentin Colombet <span dir="ltr"><<a href="mailto:qcolombet@apple.com" target="_blank">qcolombet@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div>Hi Christian,</div><div><br></div>I’m guessing you would want a mechanism similar to what we use for PGO (which I do not know how it works :)).<div><br></div><div>+ Justin who works on PGO.</div><div><br></div><div>Cheers,</div><div>-Quentin<br><div><br><div><blockquote type="cite"><div><div class="h5"><div>On Jun 24, 2015, at 6:05 PM, Christian Convey <<a href="mailto:christian.convey@gmail.com" target="_blank">christian.convey@gmail.com</a>> wrote:</div><br></div></div><div><div><div class="h5"><div dir="ltr">Hi all,<div><br></div><div>Does anyone know of a good solution to the following?  I'm trying to find a good way to stably associate distinct ID numbers with different BB in a module.  As long as the module's IR hasn't changed in any way whatsoever, I'd like to be guaranteed to always generate the same ID <--> BB mapping.  Or if the mapping is ambiguous, because two or more mappings between BB's and ID's are indistinguishable (isomorphic?), I'd like to be sure I at least can reliably re-obtain some mapping in that equivalence class.</div><div><br></div><div>This seems related to a <a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__llvm.org_bugs_show-5Fbug.cgi-3Fid-3D16043&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=Mfk2qtn1LTDThVkh6-oGglNfMADXfJdty4_bhmuhMHA&m=VyhVlhie270AiA60rcYOf3Vw5xKKZFKAgr5GK6hPXu0&s=Kv0Xo7jx0HJ8mumCx_vW368qV5lXoVdMAygrhChMMFU&e=" target="_blank">debate / bug-report</a> regarding the arbitrary nature of (pseudo?) labels in LLVM assembly.  E.g.,<i>"; label:3"</i>.  </div><div><br></div><div>It also looks like <i>llvm-diff</i> does something similar to what I want in its <i>FunctionDifferenceEngine</i> class.  But I think <i>llvm-diff</i> allows for the two IR's to differ, and uses approximate matching.  I don't need any graceful degradation when the IR has changed, but I need exact matching when the IR hasn't changed.</div><div><br></div><div>In the worst-case scenario, I could make a sweep through all of the module's BB's and just tag each BB with a distinct serial number in its metadata.  But I'd like to avoid this if possible, partly because I'd like there to be a chance of the BB <--> ID mapping remaining valid if I run Clang.</div><div><br></div><div>Thanks, Christian</div></div></div></div>
_______________________________________________<br>LLVM Developers mailing list<br><a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br><a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br></div></blockquote></div><br></div></div></div></blockquote></div><br></div>