<div dir="ltr">On Thu, Sep 5, 2013 at 3:56 PM, Michele Scandale <span dir="ltr"><<a href="mailto:michele.scandale@gmail.com" target="_blank">michele.scandale@gmail.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto"><div>Il giorno 05/set/2013, alle ore 21:37, Eli Friedman <<a href="mailto:eli.friedman@gmail.com" target="_blank">eli.friedman@gmail.com</a>> ha scritto:</div>
<div class="im"><div><br></div><blockquote type="cite"><div><div dir="ltr">On Thu, Sep 5, 2013 at 2:22 AM, Michele Scandale <span dir="ltr"><<a href="mailto:michele.scandale@gmail.com" target="_blank">michele.scandale@gmail.com</a>></span> wrote:<br>
<div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div>On 09/05/2013 09:27 AM, David Chisnall wrote:<br>
> On 4 Sep 2013, at 20:59, Eli Friedman <<a href="mailto:eli.friedman@gmail.com" target="_blank">eli.friedman@gmail.com</a>> wrote:<br>
><br>
>> Or it could have been a ptrtoint+inttoptr pair originally, which would get turned into a bitcast by instcombine.<br>
>><br>
>> I don't see what's wrong with the choice of turning such a bitcast back into a ptrtoint+inttoptr pair.<br>
><br>
> Yes, that's probably the best approach.<br>
><br>
> David<br>
><br>
<br>
</div></div>Fine. Just a question: what integer size should I use? The target data layout<br>
information should not be available during the parsing of a Module, so I do not<br>
know what integer to use for the ptrtoint. Is it safe to assume that the maximum<br>
size is 64 bit?<br><br></blockquote><div><br></div><div>(BTW, the .ll parser doesn't need to auto-upgrade, only the .bc parser.)</div><div><br></div></div></div></div></div></blockquote><div><br></div></div>Why not? The auto upgrade mechanism isn't responsible for backward compatibility? Parsing an old file with a bitcast between pointer with different address space wild generate a parsing error (due to the additional check added in CastInst::castIsValid static method). Maybe I haven't understood correctly the auto upgrade mechanism.</div>
</blockquote><div><br></div><div>We don't promise backward compatibility for .ll files, only .bc files.</div><div><br></div><div>-Eli</div></div></div></div>