This is an archive of the discontinued LLVM Phabricator instance.

[NFC] Factor out predecessors collection into a separate method
ClosedPublic

Authored by mkazantsev on Aug 17 2018, 3:59 AM.

Diff Detail

Repository
rL LLVM

Event Timeline

reames accepted this revision.Aug 17 2018, 1:56 PM

LGTM. Don't see where you're going with this, but the patch is obvious correct and doesn't make anything particularly messy.

This revision is now accepted and ready to land.Aug 17 2018, 1:56 PM

I need it for https://reviews.llvm.org/D50891

Tracking down instructions that write memory is pretty much the same as with control flow. Thinking about it even more, we can generalize much more things there.

Another application of that is that we can cache this method (its users don't change control flow, so the set of predecessors should remain unchanged).

This revision was automatically updated to reflect the committed changes.