Page MenuHomePhabricator

[Utils] Extract EliminateUnreachableBlocks (NFC)

Authored by modocache on Mar 6 2019, 6:51 PM.



Extract the functionality of eliminating unreachable basic blocks
within a function, previously encapsulated within the
-unreachableblockelim pass, and make it available as a function within
BlockUtils.h. No functional change intended other than making the logic

Exposing this logic makes it easier to implement, which fixes coroutines bug

Diff Detail


Event Timeline

modocache created this revision.Mar 6 2019, 6:51 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 6 2019, 6:51 PM

Friendly ping! I thought this might be easier to review if I split it up from, which fixes a bug in coroutines and has already been accepted. This diff is an NFC but is necessary to land the bug fix.

davide requested changes to this revision.Mar 8 2019, 9:36 AM
davide added inline comments.
113–114 ↗(On Diff #189639)

Do you need KeepOneInputPHIs ?

This revision now requires changes to proceed.Mar 8 2019, 9:36 AM
modocache updated this revision to Diff 190080.Mar 11 2019, 6:53 AM

Oops! Thanks for pointing that out @davide -- I had meant to pass them through to the DeleteDeadBlocks but forgot. Should be good now!

modocache marked an inline comment as done.Mar 11 2019, 6:53 AM
davide accepted this revision.Mar 11 2019, 9:24 AM


This revision is now accepted and ready to land.Mar 11 2019, 9:24 AM
This revision was automatically updated to reflect the committed changes.