<div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Mon, Sep 24, 2018 at 12:30 PM Sanjoy Das <<a href="mailto:sanjoy@playingwithpointers.com">sanjoy@playingwithpointers.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Mon, Sep 24, 2018 at 11:31 AM Sanjoy Das<br>
<<a href="mailto:sanjoy@playingwithpointers.com" target="_blank">sanjoy@playingwithpointers.com</a>> wrote:<br>
><br>
> Did you consider using the waymarking algorithm we already use for<br>
> going from Use->User to store the offset of an instruction in a basic<br>
> block?  We could steal the two bits needed from the bb parent pointer<br>
> in the instruction.<br>
<br>
Actually, now that I think of it, in llvm::Instruction we have 6 bits<br>
to play with so should be able to create a more efficient scheme than<br>
the one used in llvm::Use (well, we have 6 bits even in llvm::Use but<br>
efficiency is probably not as important there because Use lives in an<br>
array, not a linked list).<br></blockquote><div><br></div><div>I hadn't considered it, and it's an interesting idea. I'd rather not pursue it because I think stealing bits from ilist just for Instruction linked lists is going to be difficult. It also has runtime costs for linked list iteration, so it's not completely free. I'd rather get the speed win, spend the memory, and then try to win back the space if it seems like a priority.</div></div></div>