This is an archive of the discontinued LLVM Phabricator instance.

[BDCE] Remove dead uses of arguments
ClosedPublic

Authored by nikic on Jan 3 2019, 12:11 AM.

Details

Summary

Another followup to D55563.

In addition to finding dead uses of instructions, also find dead uses of function arguments, and replace them with zero as well.

I'm changing the way the known bits are computed here to remove the coupling between the transfer function and the algorithm. It previously relied on the first op being visited first and computing known bits -- unless the first op is not an instruction, in which case they're computed on the second op. I could have adjusted this to check for "instruction or argument", but I think it's better to avoid the repeated calculation with an explicit flag.

Diff Detail

Repository
rL LLVM

Event Timeline

nikic created this revision.Jan 3 2019, 12:11 AM
hfinkel accepted this revision.Jan 4 2019, 10:52 AM

LGTM

This revision is now accepted and ready to land.Jan 4 2019, 10:52 AM
This revision was automatically updated to reflect the committed changes.