-
Notifications
You must be signed in to change notification settings - Fork 17.2k
[meta] Make llvm passes debug info invariant #37076
Copy link
Copy link
Open
Labels
bugzillaIssues migrated from bugzillaIssues migrated from bugzilladebuginfoenhancementImproving things as opposed to bug fixing, e.g. new or missing featureImproving things as opposed to bug fixing, e.g. new or missing featurellvm:transformsmetaissueIssue to collect references to a group of similar or related issues.Issue to collect references to a group of similar or related issues.
Metadata
Metadata
Assignees
Labels
bugzillaIssues migrated from bugzillaIssues migrated from bugzilladebuginfoenhancementImproving things as opposed to bug fixing, e.g. new or missing featureImproving things as opposed to bug fixing, e.g. new or missing featurellvm:transformsmetaissueIssue to collect references to a group of similar or related issues.Issue to collect references to a group of similar or related issues.
Type
Fields
Give feedbackNo fields configured for issues without a type.
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:
Compile a C program with/without -g, and check that the resulting text sections are identical.
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.