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

[RemoveDIs] Load into new debug info format by default in llvm-reduce #86275

Closed
wants to merge 1 commit into from

Conversation

OCHyams
Copy link
Contributor

@OCHyams OCHyams commented Mar 22, 2024

Directly load all bitcode into the new debug info format in llvm-reduce. This means that new-mode bitcode no longer round-trips back to old-mode after parsing, and that old-mode bitcode gets auto-upgraded to new-mode debug info (which is the current in-memory default in LLVM).

@OCHyams OCHyams requested review from jryans and SLTozer March 22, 2024 12:32
@SLTozer
Copy link
Contributor

SLTozer commented Mar 22, 2024

Do we want this to happen in llvm-reduce? Until the old debug info format is removed, we would probably want llvm-reduce to maintain whatever format the file is in - otherwise if, for example, we encountered a bug that only occurred for bitcode/IR files that were written with the old format, we would be unable to use llvm-reduce to get a reduced reproducer from the input.

@jryans
Copy link
Member

jryans commented Mar 22, 2024

Hmm yeah, I think I agree with @SLTozer... Wouldn't we want this tool to preserve whatever the input has?

@OCHyams
Copy link
Contributor Author

OCHyams commented Mar 25, 2024

Yeah that makes sense, I'll look into that soon, thanks

@OCHyams OCHyams closed this Mar 25, 2024
@OCHyams OCHyams deleted the removedis-llvm-reduce branch March 25, 2024 09:22
SLTozer added a commit that referenced this pull request Apr 22, 2024
As the goal of LLVM reduce is to simplify the input file, it should not
modify the debug info format - doing so by default would make it
impossible to reduce an error that only occurs in the old format, for
example (as briefly discussed at
#86275). This patch uses the
new "preserve debug info format" flag in llvm-reduce to prevent the
input from being subtly transformed by llvm-reduce itself; this has no
effect on any tools used for the interestingness check (i.e. if `opt` is
invoked, it will still convert the reduced input to the new format by
default), but simply ensures that the reduced file is strictly reduced
rather than modified.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants