Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[meta] Make llvm passes debug info invariant #37076

Open
vedantk opened this issue Jun 7, 2018 · 32 comments
Open

[meta] Make llvm passes debug info invariant #37076

vedantk opened this issue Jun 7, 2018 · 32 comments
Labels
bugzilla Issues migrated from bugzilla

Comments

@vedantk
Copy link
Collaborator

vedantk commented Jun 7, 2018

Bugzilla Link 37728
Version unspecified
OS All
Depends On #36588 #37063 llvm/llvm-bugzilla-archive#37727 #40314 #40456 #43204 #43767 #44225 #49035 #49044 #50454 #50525 #50539 #50540 #50911 #50912 #51880 #51881 #51882 #36654 #37061 #37062 llvm/llvm-bugzilla-archive#37726 #41483 #42636 #43103 #43309 #48790 #49326 #49924
CC @bjope,@dstenb,@dwblaikie,@fredriss,@gregbedwell,@jmorse,@jryans,@pogo59,@rgal,@wjristow,@yuanfang-chen

Extended Description

This is a meta bug for tracking work related to making llvm passes debug info invariant. That means that the output of llvm passes should be the same, modulo debug info metadata & intrinsics, regardless of whether the input IR contains debug info. The motivation for this is that enabling debug info should not degrade optimizations.

There are at least two different approaches for detecting debug invariance bugs:

  1. Compile a C program with/without -g, and check that the resulting text sections are identical.

  2. Compile some LLVM IR using opt, with/without -debugify-each enabled, and check that the stripped output is identical. The -debugify-each mode applies/removes synthetic debug info to a Module before/after each pass in opt's pipeline.

The second approach might be a bit more flexible, seeing as it's possible to generate LLVM IR from a C program, and to then run a custom pipeline over the IR using opt.

In addition to finding debug invariance bugs, we should think about setting up infrastructure to detect regressions, and about adding utilities to the codebase which might make it easier to write debug info invariant passes.

@gregbedwell
Copy link
Collaborator

  1. Compile a C program with/without -g, and check that the resulting text
    sections are identical.

For this approach we have:
https://llvm.org/devmtg/2015-04/slides/Verifying_code_gen_dash_g_final.pdf

We have this pipeline setup for some our Sony internal test-suites and it's generally very effective FWIW. We've not had the spare bandwidth to fix all of the existing bugs unfortunately, but we do tend to report/fix regressions as we spot them. Hopefully we'll be able to find some spare bandwidth to help with this effort :)

@pogo59
Copy link
Collaborator

pogo59 commented Jun 7, 2018

Added a couple older bugs to the list. Post-RA Scheduler will likely be
pretty unpleasant, but it clearly has an effect and showed up fairly
often in our dash-g-no-change pipeline.

@llvmbot
Copy link
Collaborator

llvmbot commented Oct 25, 2019

check_cfc test script
This is a shell script tool calling check_cfc.py to detect codegen difference with/without -g

Run as: ./check_cfc.sh 2>test_err.log

@llvmbot
Copy link
Collaborator

llvmbot commented Oct 25, 2019

check_cfc test result
After run check_cfc.sh with llvm_test_suite as test code,
Codegen differences found in test_err.log

@llvmbot
Copy link
Collaborator

llvmbot commented Oct 25, 2019

*** Bug llvm/llvm-bugzilla-archive#43757 has been marked as a duplicate of this bug. ***

@gregbedwell
Copy link
Collaborator

mentioned in issue #40314

@llvmbot
Copy link
Collaborator

llvmbot commented Nov 27, 2021

mentioned in issue #40456

@llvmbot
Copy link
Collaborator

llvmbot commented Nov 27, 2021

mentioned in issue #41483

@mikaelholmen
Copy link
Collaborator

mentioned in issue #42636

@llvmbot
Copy link
Collaborator

llvmbot commented Nov 27, 2021

mentioned in issue llvm/llvm-bugzilla-archive#43757

@llvmbot
Copy link
Collaborator

llvmbot commented Nov 27, 2021

mentioned in issue #43103

@llvmbot
Copy link
Collaborator

llvmbot commented Nov 27, 2021

mentioned in issue #43204

@bjope
Copy link
Collaborator

bjope commented Nov 27, 2021

mentioned in issue #43309

@llvmbot
Copy link
Collaborator

llvmbot commented Nov 27, 2021

mentioned in issue #43767

@dstenb
Copy link
Mannequin

dstenb mannequin commented Nov 27, 2021

mentioned in issue #44225

@llvmbot
Copy link
Collaborator

llvmbot commented Nov 27, 2021

mentioned in issue #48790

@llvmbot
Copy link
Collaborator

llvmbot commented Nov 27, 2021

mentioned in issue #49035

@rgal
Copy link
Collaborator

rgal commented Nov 27, 2021

mentioned in issue #49044

@mikaelholmen
Copy link
Collaborator

mentioned in issue #49326

@theo-lw
Copy link
Contributor

theo-lw commented Nov 27, 2021

mentioned in issue #49924

@theo-lw
Copy link
Contributor

theo-lw commented Nov 27, 2021

mentioned in issue #50454

@theo-lw
Copy link
Contributor

theo-lw commented Nov 27, 2021

mentioned in issue #50525

@theo-lw
Copy link
Contributor

theo-lw commented Nov 27, 2021

mentioned in issue #50539

@theo-lw
Copy link
Contributor

theo-lw commented Nov 27, 2021

mentioned in issue #50540

@theo-lw
Copy link
Contributor

theo-lw commented Nov 27, 2021

mentioned in issue #50911

@theo-lw
Copy link
Contributor

theo-lw commented Nov 27, 2021

mentioned in issue #50912

@pogo59
Copy link
Collaborator

pogo59 commented Nov 27, 2021

mentioned in issue llvm/llvm-bugzilla-archive#51571

@theo-lw
Copy link
Contributor

theo-lw commented Nov 27, 2021

mentioned in issue #51880

@theo-lw
Copy link
Contributor

theo-lw commented Nov 27, 2021

mentioned in issue #51881

@theo-lw
Copy link
Contributor

theo-lw commented Nov 27, 2021

mentioned in issue #51882

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 10, 2021
@dwblaikie
Copy link
Collaborator

#52711 is another instance (maybe we want to move the meta bug into a project or something else that acts as a better grouping over here in github issues, compared to what we were doing with bugzilla)

@theo-lw
Copy link
Contributor

theo-lw commented Feb 4, 2022

Hello, I think it would be good to do some cleanup on these bug reports. I think a number of open bugs can be closed because they seemed to have been fixed.

Ones that have been fixed (I think): #36588 #37063 #40314 #40456

Also, if you are able to reproduce the other bug reports, should they be tagged "Confirmed"?

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla
Projects
None yet
Development

No branches or pull requests

9 participants