This is an archive of the discontinued LLVM Phabricator instance.

[IRMover] Do not drop names of struct types that are used
Needs ReviewPublic

Authored by jdoerfert on Mar 23 2022, 10:04 AM.
This revision needs review, but there are no reviewers specified.

Details

Reviewers
None
Summary

When we link bitcode via clang (-mlink-bitcode-file) we can end up
removing the name of a struct type that is present in the user code
and the linked in file. This occurred for OpenMP codes but turned out
to be really hard to reproduce. The necessary code change to avoid
dropping those names is simple though and hopefully uncontroversial.

Diff Detail

Unit TestsFailed

Event Timeline

jdoerfert created this revision.Mar 23 2022, 10:04 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 23 2022, 10:04 AM
jdoerfert requested review of this revision.Mar 23 2022, 10:04 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 23 2022, 10:04 AM
Herald added a subscriber: sstefan1. · View Herald Transcript

Macro testcase:

As mentioned in the commit message, I didn't manage to create one. Spend hours on it now. Any constructive input welcome.

jdoerfert updated this revision to Diff 417752.Mar 23 2022, 2:40 PM

Try a different strategy to avoid dropping used struct names