<div dir="ltr">A good start is to start file upstream bugs found in SPEC and clang self build. Once those bugs are fixed, we need to set up bots to do 3-stage bootstrap of clang to ensure no regressions are introduced.<div><br></div><div>David</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Oct 7, 2016 at 3:25 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"><span class=""><br>
> On Oct 7, 2016, at 1:27 PM, Dehao Chen via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br>
><br>
> In theory, compiler should generate bit-identical code with and without debug info. I.e.<br>
> # clang -c -O2 -g a.cc -o a.g.o<br>
> # clang -c -O2 -g0 a.cc -o a.g0.o<br>
> # strip a.g.o a.g0.o<br>
> # diff a.g.o a.g0.o<br>
> The diff should find two binaries identical. For brevity, in the rest of the mail, I'll refer to this requirement as "codegen consistency" (any better name?)<br>
><br>
> Unfortunately, LLVM does not guarantee codegen consistency. Recently, I've spent quite some time try to fix related issues (e.g. <a href="https://reviews.llvm.org/D25286" rel="noreferrer" target="_blank">https://reviews.llvm.org/<wbr>D25286</a> and <a href="https://reviews.llvm.org/D25098" rel="noreferrer" target="_blank">https://reviews.llvm.org/<wbr>D25098</a>). The most recent issue I'm looking at is that during isel, the IROrder is used by both debug info and the actual codegen, which is relative harder to fix.<br>
><br>
> I initially thought that it's just a couple of careless bugs to fix. But looks like there are much more issues than I expected. So I'm calling the community for help:<br>
><br>
> * Is there anyone else who also cares about codegen consistency?<br>
<br>
</span>We have in the past always treated situations where the presence of debug info caused different code to be emitted as pretty serious bugs. Typically these bugs came from code that didn't properly skip over debug intrinsics when doing peephole-style transformations.<br>
<span class=""><br>
> * Any volunteers to help fix codegen consistency issues? (It is easy to find issues, just build speccpu with -g and -g0, then compare the "objdump -d" output)<br>
<br>
</span>I certainly don't mind getting CC'ed on any PRs that we find :-)<br>
<br>
-- adrian<br>
<span class=""><br>
> * How to setup a regression test to ensure future changes does not break codegen consistency?<br>
><br>
> Any comments?<br>
><br>
> Thanks,<br>
> Dehao<br>
</span>> ______________________________<wbr>_________________<br>
> LLVM Developers mailing list<br>
> <a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a><br>
> <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-dev</a><br>
<br>
</blockquote></div><br></div>