<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Jan 26, 2015, at 11:32 AM, Chandler Carruth <<a href="mailto:chandlerc@google.com" class="">chandlerc@google.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="gmail_extra"><br class=""><div class="gmail_quote">On Mon, Jan 26, 2015 at 11:29 AM, Pete Cooper <span dir="ltr" class=""><<a href="mailto:peter_cooper@apple.com" target="_blank" class="">peter_cooper@apple.com</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">That would be nice. I expect (ha!) that we’d do this in IRGen. I might look in to this, although i’m not too familiar with clang.</div><div class=""><br class=""></div><div class="">If you’re interested, i’ve worked out why I see this benefit at all in this patch. I LTO my Debug LLVM. This results in -O0 on the bitcode produced by LLVM, but then the linker LTO’s with optimizations enabled. And because LTO doesn’t have LowerExpect in its pipeline, I see many cases of 'call i64 @llvm.expect.i64(i64 1, i64 1)’ in my IR.</div><div class=""><br class=""></div><div class="">So, getting the front-end to generate metadata would certainly fix this. As would calling LowerExpect in libLTO or in populateFunctionPassManager even when on -O0. Or we could just say that a Debug LTO build should live with this issue, although I’d prefer one of the other options to this one.</div></blockquote></div><br class="">First problem: why are we generating these at -O0 at all? We should just turn that part of Clang off.</div></div></div></blockquote>Sounds good. Please see <a href="http://reviews.llvm.org/D7183" class="">http://reviews.llvm.org/D7183</a><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class="gmail_extra"><br class=""></div><div class="gmail_extra">Second problem: ... nope, no second problem. ;]</div></div>
</div></blockquote></div><br class=""></body></html>