This is an archive of the discontinued LLVM Phabricator instance.

[SimplifyCFG] Don't create PHI nodes for constant bundle operands
ClosedPublic

Authored by sanjoy on Oct 12 2016, 12:07 AM.

Details

Summary

Constant bundle operands may need to retain their constant-ness for
correctness. I'll admit that this is slightly odd, but it looks like
SimplifyCFG already does this for things like @llvm.frameaddress and
@llvm.stackmap, so I suppose adding one more case is not a big deal.

It is possible to add a mechanism to denote bundle operands that need to
remain constants, but that's probably too complicated for the time
being.

Diff Detail

Repository
rL LLVM

Event Timeline

sanjoy updated this revision to Diff 74334.Oct 12 2016, 12:07 AM
sanjoy retitled this revision from to [SimplifyCFG] Don't create PHI nodes for constant bundle operands.
sanjoy updated this object.
sanjoy added a reviewer: jmolloy.
sanjoy added a subscriber: llvm-commits.
jmolloy accepted this revision.Oct 12 2016, 12:50 AM
jmolloy edited edge metadata.

LGTM, with the extra comment added.

lib/Transforms/Utils/SimplifyCFG.cpp
1368 ↗(On Diff #74334)

Could you please add a comment here as to why - something like what you wrote in your phab commit message. Just so we know that it's deliberate and not a workaround for something else.

This revision is now accepted and ready to land.Oct 12 2016, 12:50 AM
This revision was automatically updated to reflect the committed changes.
sanjoy marked an inline comment as done.