This is an archive of the discontinued LLVM Phabricator instance.

[IROutliner] Avoid reusing PHINodes that have already been matched when merging outlined functions' phi node blocks
ClosedPublic

Authored by AndrewLitteken on Mar 9 2022, 10:58 AM.

Details

Summary

https://godbolt.org/z/63r5hzKsT

When there are two external phi nodes for two different outlined regions, when compressing the created phi nodes between the two regions, the matching for the second phi node in the second region matches the first phi node created for the first region rather than the second phi node created for the first region. This adds an extra output path where there should not be one.

The fix is the ignore phi nodes that have already been matched for each region.

Diff Detail

Event Timeline

AndrewLitteken created this revision.Mar 9 2022, 10:58 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 9 2022, 10:58 AM
AndrewLitteken requested review of this revision.Mar 9 2022, 10:58 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 9 2022, 10:58 AM
This revision is now accepted and ready to land.Mar 9 2022, 11:21 AM
This revision was landed with ongoing or failed builds.Mar 14 2022, 10:00 AM
This revision was automatically updated to reflect the committed changes.