This is an archive of the discontinued LLVM Phabricator instance.

[Scalarizer] Remove unreachable blocks before scalarizing a function
AbandonedPublic

Authored by bjope on Apr 25 2018, 6:46 AM.

Details

Reviewers
None
Summary

When scalarizing PHI nodes we might try to examine/rewrite
InsertElement nodes in predecessors. If those predecessors
are unreachable from entry, then the IR in those blocks could
have unexpected properties resulting in infinite loops in
Scatterer::operator[]. So we better remove unreachable blocks
before scalarizing the function.

Diff Detail

Event Timeline

bjope created this revision.Apr 25 2018, 6:46 AM
bjope abandoned this revision.Aug 16 2018, 9:22 AM

I've got another solution for this problem for our out-of-tree-target. So I'll abandon this.