This is an archive of the discontinued LLVM Phabricator instance.

[llvm-reduce] Skip dso_local reduction step that results in invalid IR
AbandonedPublic

Authored by arichardson on Apr 6 2021, 4:05 AM.

Details

Summary

Trying to call setDSOLocal(false) on a GlobalValue that is implicitly
dso_local results in the following module verifier error:

  • WARNING | reduction resulted in invalid module, skipping GlobalValue with local linkage or non-default visibility must be dso_local!

Since this will never result in a valid test case reduction, skip it to avoid
unncessary work and lots of WARNING messages.

Diff Detail

Event Timeline

arichardson requested review of this revision.Apr 6 2021, 4:05 AM
arichardson created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptApr 6 2021, 4:05 AM
fhahn added a comment.Apr 6 2021, 4:07 AM

Could you add a test for this?

Could you add a test for this?

Should I add a new test or is modifying the test from D98673 sufficient?

fhahn added a comment.Apr 6 2021, 5:07 AM

Could you add a test for this?

Should I add a new test or is modifying the test from D98673 sufficient?

I'd go with whatever is easiest.

aeubanks added inline comments.Apr 6 2021, 9:07 AM
llvm/tools/llvm-reduce/deltas/ReduceGlobalValues.cpp
40

This should also check GV.isImplicitDSOLocal