<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Mar 3, 2014 at 6:11 PM, Adrian Prantl <span dir="ltr"><<a href="mailto:aprantl@apple.com" target="_blank">aprantl@apple.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I see. Shouldn’t it be a call to std::stable_sort(), then?</blockquote></div><br>Well, the whole point is that it *isn't* a call to stable_sort because the order of equal ranges shouldn't matter.</div>

<div class="gmail_extra"><br></div><div class="gmail_extra">In practice, we have messed up and made the order matter in several significant cases.</div><div class="gmail_extra"><br></div><div class="gmail_extra">Right now, the order only matters in that it impacts the name de-duplication and the order of use-def chains created by SROA (much like serializing and deserializing through bitcode does), but I used this to debug a bunch of other more serious issues.</div>
<div class="gmail_extra"><br></div><div class="gmail_extra">Even in a no-asserts build, the resulting binary isn't perfectly stable because we have some passes that are sensitive to incoming use-def ordering sadly. =/</div>

</div>