Page MenuHomePhabricator

Functions with differing phis should not be merged.
ClosedPublic

Authored by rudkx on May 20 2016, 1:01 AM.

Details

Summary

Check that the incoming blocks of phi nodes are identical, and block function merging if they are not.

rdar://problem/26255167

Diff Detail

Event Timeline

rudkx updated this revision to Diff 57900.May 20 2016, 1:01 AM
rudkx retitled this revision from to Functions with differing phis should not be merged..
rudkx updated this object.
rudkx added reviewers: aschwaighofer, nlewycky.
rudkx added a subscriber: llvm-commits.
qcolombet added inline comments.
test/Transforms/MergeFunc/phi-check-blocks.ll
2

Instead of relying on the debug output I guess it would be possible to check that we still have both functions.
I.e., I would:

  • Get rid of the REQUIRES line
  • Use FileCheck instead of grep
rudkx added inline comments.May 20 2016, 11:15 AM
test/Transforms/MergeFunc/phi-check-blocks.ll
2

I had originally written the test that way but then noticed that some of the other tests were doing this.

I'll go ahead and change it back.

rudkx updated this revision to Diff 57957.May 20 2016, 11:17 AM
rudkx edited edge metadata.

Update the test to ensure both functions exist rather that grepping the output of -stats.

qcolombet accepted this revision.May 20 2016, 11:27 AM
qcolombet added a reviewer: qcolombet.

Hi Mark,

Yeah, we used to be less strict about the use of FileCheck :).
Thanks for the updated diff.

LGTM.

Cheers,
-Quentin

This revision is now accepted and ready to land.May 20 2016, 11:27 AM
This revision was automatically updated to reflect the committed changes.