This is an archive of the discontinued LLVM Phabricator instance.

[ConstantFoldTerminator] Preserve make.implicit metadata when converting SwitchInst to BranchInst
ClosedPublic

Authored by chenli on Aug 7 2015, 11:09 AM.

Details

Summary

llvm::ConstantFoldTerminator function can convert SwitchInst with single case (and default) to a conditional BranchInst. This patch adds support to preserve make.implicit metadata on this conversion.

Diff Detail

Event Timeline

chenli updated this revision to Diff 31531.Aug 7 2015, 11:09 AM
chenli retitled this revision from to [ConstantFoldTerminator] Preserve make.implicit metadata when converting SwitchInst to BranchInst.
chenli updated this object.
chenli added reviewers: sanjoy, weimingz.
chenli added subscribers: llvm-commits, mcrosier.
weimingz added inline comments.Aug 7 2015, 11:30 AM
lib/Transforms/Utils/Local.cpp
232

LGTM.
just nitpick: the comment needs period.

chenli updated this revision to Diff 31534.Aug 7 2015, 11:36 AM

Add full stop to the end of the comment.

chenli accepted this revision.Aug 7 2015, 11:37 AM
chenli added a reviewer: chenli.
chenli marked an inline comment as done.
This revision is now accepted and ready to land.Aug 7 2015, 11:37 AM
chenli closed this revision.Aug 7 2015, 12:30 PM