This is an archive of the discontinued LLVM Phabricator instance.

StructurizeCFG: Simplify inserted PHI nodes
ClosedPublic

Authored by nhaehnle on Oct 16 2018, 2:03 AM.

Details

Summary

This improves subsequent divergence analysis in some cases.

Change-Id: I5e95e7ec7fd3fa80d414d1a53a02fea23e3d67d3

Diff Detail

Repository
rL LLVM

Event Timeline

nhaehnle created this revision.Oct 16 2018, 2:03 AM
arsenm added inline comments.Oct 16 2018, 10:39 AM
lib/Transforms/Scalar/StructurizeCFG.cpp
650–651 ↗(On Diff #169797)

.pop_back_val?

nhaehnle added inline comments.Oct 16 2018, 10:57 AM
lib/Transforms/Scalar/StructurizeCFG.cpp
650–651 ↗(On Diff #169797)

That's incorrect when i == InsertedPhis.size() - 1.

arsenm accepted this revision.Oct 16 2018, 2:34 PM

LGTM

This revision is now accepted and ready to land.Oct 16 2018, 2:34 PM
This revision was automatically updated to reflect the committed changes.