<html><head><style>body{font-family:Helvetica,Arial;font-size:13px}</style></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;"><br></div> <br><p style="color:#000;">On April 22, 2014 at 11:09:40 AM, Tim Northover (<a href="mailto:t.p.northover@gmail.com">t.p.northover@gmail.com</a>) wrote:</p> <div><blockquote type="cite" class="clean_bq" style="color: rgb(0, 0, 0); font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);"><span><div><div></div><div>> No, I'm saying that the default CPU in the JIT should always be the CPU<span class="Apple-converted-space"> </span><br>> we're actually running on. That's not insane, that's how any sensible JIT<span class="Apple-converted-space"> </span><br>> would work.<span class="Apple-converted-space"> </span><br><br>Possibly (though the lldb developers may quibble about their JIT not<span class="Apple-converted-space"> </span><br>being sensible).</div></div></span></blockquote></div><p>Sure, but lldb already manually sets the CPU.</p><p>The question here is what behavior to give to those who don't manually set the CPU.  I'm arguing that the API previously guaranteed that the JIT would target the CPU flavor that the process was running on, and that we should arrange for the JIT to continue to obey this in the case that the JIT's client doesn't manually set the CPU.</p><div><div><blockquote type="cite" class="clean_bq" style="color: rgb(0, 0, 0); font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);"><span><div><div><span class="Apple-converted-space"> </span>That wasn't the behaviour before though, it just<span class="Apple-converted-space"> </span><br>randomly picked Cyclone for the giggles.<span class="Apple-converted-space"> </span></div></div></span></blockquote></div><p>Right.</p><p>The expected behavior that a JIT client has is that by default, the JIT correctly targets the native CPU.  Previous to this change, if you were on Cyclone, the JIT was obeying that contract with its client.  It was doing so because of a hack rather than intelligence.  But it *was* doing the right thing from the standpoint of the client.</p><p>Hence, this change broke the JIT's behavior on Cyclone.  It probably also fixed behavior on other flavors.  But I hope we can all agree that breaking one platform to fix another isn't exactly the kind of engineering ethos we should strive for.  Instead, we should try to fix both Cycone and non-Cyclone by doing what I suggest inside the JIT's setup code.</p><p>In the future, if someone does break one platform to fix another - especially when it involves stable API, and where it's clear what the right fix is - then we should revert to avoid a situation where clients have to blacklist a series of LLVM revisions.</p><p>-Filip</p><p><br></p><div><blockquote type="cite" class="clean_bq" style="color: rgb(0, 0, 0); font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);"><span><div><div><br><br>Tim.<span class="Apple-converted-space"> </span><br></div></div></span></blockquote></div></div></body></html>