This is an archive of the discontinued LLVM Phabricator instance.

[mlir] Symbol DCE ignores unknown symbols
ClosedPublic

Authored by Mogball on Dec 20 2021, 8:48 AM.

Details

Summary

Instead of failing when it encounters a reference to an unknown symbol, Symbol DCE should ignore them. References to unknown symbols do not affect the overall function of Symbol DCE, so it should not need to fail when it encounters one.

In general, requiring that symbol references always be valid rather than only when necessary can be overly conservative.

Diff Detail

Event Timeline

Mogball created this revision.Dec 20 2021, 8:48 AM
Mogball requested review of this revision.Dec 20 2021, 8:48 AM

LGTM, but let's wait for River to double check this.

rriddle accepted this revision.Jan 4 2022, 12:36 PM
rriddle added inline comments.
mlir/lib/Transforms/SymbolDCE.cpp
126–130

nit: Try to avoid "floating" control flow statements.

This revision is now accepted and ready to land.Jan 4 2022, 12:36 PM

Ping @rriddle ?

Sorry, coming back from OOO.

This revision was automatically updated to reflect the committed changes.