This is an archive of the discontinued LLVM Phabricator instance.

[DSE] Make isRemovable() for calls more robust (NFCI)
ClosedPublic

Authored by nikic on Dec 17 2021, 11:46 AM.

Details

Summary

We can only drop calls if they have an analyzable write, the return value is not used, they don't throw and they don't diverge. The last two conditions were previously not checked, because all the libcalls with analyzable writes already happened to satisfy those conditions anyway. This may not be true for generalizations (with D115904 in mind).

No test changes because the necessary attributes are already inferred for supported libcalls.

Diff Detail

Event Timeline

nikic created this revision.Dec 17 2021, 11:46 AM
nikic requested review of this revision.Dec 17 2021, 11:46 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 17 2021, 11:46 AM
reames accepted this revision.Dec 17 2021, 11:49 AM
This revision is now accepted and ready to land.Dec 17 2021, 11:49 AM
This revision was landed with ongoing or failed builds.Dec 17 2021, 11:53 AM
This revision was automatically updated to reflect the committed changes.