Page MenuHomePhabricator

[IROutliner] handle functions that do not contain an exit path
ClosedPublic

Authored by AndrewLitteken on Mar 2 2022, 10:08 PM.

Details

Summary

As a result of adding multiblock outlining, it became possible to outline the entirety of basic block, and branches that only pointed to the basic blocks contained in the outlined section. This means that there are no exit paths, and no return statement. There was a previous assertion from the older version of the outliner that explicitly made sure there was a return statement. This removes that assertion.

It does not break any of the tests for the outliner. I will test it on the test suite to make sure.

Diff Detail

Event Timeline

AndrewLitteken created this revision.Mar 2 2022, 10:08 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 2 2022, 10:08 PM
AndrewLitteken requested review of this revision.Mar 2 2022, 10:08 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 2 2022, 10:08 PM
paquette accepted this revision.Mar 3 2022, 9:14 AM

LGTM

I am a little worried about the code extractor's assumptions, at least wrt noreturn functions (should the code extractor have a special case for noreturn?). But I think that should be handled in the code extractor, not here.

This revision is now accepted and ready to land.Mar 3 2022, 9:14 AM
This revision was landed with ongoing or failed builds.Mar 9 2022, 10:44 AM
This revision was automatically updated to reflect the committed changes.