Page MenuHomePhabricator

[IROutliner] Accommodate PHINodes with entry outside region for numbering
ClosedPublic

Authored by AndrewLitteken on May 2 2022, 9:03 AM.

Details

Summary

When a PHINode has an incoming block from outside the region, it must be handled specially when assigning a global value number to each incoming value. A PHINode has multiple predecessors, and we must handle this case rather than only the single predecessor case.

Diff Detail

Event Timeline

AndrewLitteken created this revision.May 2 2022, 9:03 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 2 2022, 9:03 AM
AndrewLitteken requested review of this revision.May 2 2022, 9:03 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 2 2022, 9:03 AM

Updating case when there are no predecessors to the outlined region form outside the region.

paquette added inline comments.May 4 2022, 1:11 PM
llvm/lib/Transforms/IPO/IROutliner.cpp
394

Can we add an assert that we don't have multiple predecessors?

1223

Probably can have a more useful message here; e.g.

"Expected to find a predecessor not in the region?" or something?

paquette accepted this revision.May 6 2022, 4:15 PM
This revision is now accepted and ready to land.May 6 2022, 4:15 PM
This revision was landed with ongoing or failed builds.May 7 2022, 3:12 PM
This revision was automatically updated to reflect the committed changes.