[llvm-dev] Debug info interacting with optimization and code generation
Eric Christopher via llvm-dev
llvm-dev at lists.llvm.org
Sat Oct 8 10:42:40 PDT 2016
Completely agree. Any code generation changes due to debug info are a bug
and should be handled accordingly :)
On Fri, Oct 7, 2016 at 3:28 PM Xinliang David Li via llvm-dev <
llvm-dev at lists.llvm.org> wrote:
> 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.
> On Fri, Oct 7, 2016 at 3:25 PM, Adrian Prantl <aprantl at apple.com> wrote:
> > On Oct 7, 2016, at 1:27 PM, Dehao Chen via llvm-dev <
> llvm-dev at lists.llvm.org> wrote:
> > In theory, compiler should generate bit-identical code with and without
> debug info. I.e.
> > # clang -c -O2 -g a.cc -o a.g.o
> > # clang -c -O2 -g0 a.cc -o a.g0.o
> > # strip a.g.o a.g0.o
> > # diff a.g.o a.g0.o
> > 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?)
> > Unfortunately, LLVM does not guarantee codegen consistency. Recently,
> I've spent quite some time try to fix related issues (e.g.
> https://reviews.llvm.org/D25286 and https://reviews.llvm.org/D25098). 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.
> > 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:
> > * Is there anyone else who also cares about codegen consistency?
> 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.
> > * 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)
> I certainly don't mind getting CC'ed on any PRs that we find :-)
> -- adrian
> > * How to setup a regression test to ensure future changes does not break
> codegen consistency?
> > Any comments?
> > Thanks,
> > Dehao
> > _______________________________________________
> > LLVM Developers mailing list
> > llvm-dev at lists.llvm.org
> > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev