This is an archive of the discontinued LLVM Phabricator instance.

[MBB] Let MachineBasicBlock::updateTerminator() return if it updates the terminator or not. NFC.
AbandonedPublic

Authored by haicheng on May 4 2016, 8:51 PM.

Details

Reviewers
mssimpso
mcrosier
Summary

Change all the return statements to return true/false.

Diff Detail

Repository
rL LLVM

Event Timeline

haicheng updated this revision to Diff 56238.May 4 2016, 8:51 PM
haicheng retitled this revision from to [MBB] Let MachineBasicBlock::updateTerminator() return if it updates the terminator or not. NFC..
haicheng updated this object.
haicheng added reviewers: mcrosier, gberry, mssimpso.
haicheng set the repository for this revision to rL LLVM.
haicheng added subscribers: hfinkel, iteratee, llvm-commits.
mcrosier edited edge metadata.May 5 2016, 6:03 AM

AFAICT, the return value is never used. What is the purpose of the change?

This comment was removed by haicheng.

AFAICT, the return value is never used. What is the purpose of the change?

This is part of my effort of enabling tail merging in mbp. I am going to use the return value to decide if I need to call the tail merging.

Hi,

If you start adding returns in a bunch of places, you should get rid of the useless else.

Cheers,
-Quentin

haicheng updated this revision to Diff 56366.May 5 2016, 4:18 PM
haicheng edited edge metadata.

Thank you, Quentin. I removed several elses.

gberry resigned from this revision.May 23 2016, 3:24 PM
gberry removed a reviewer: gberry.
mcrosier requested changes to this revision.May 25 2016, 3:12 PM
mcrosier edited edge metadata.

I committed rL270773 to reduce the indentation of this function, per the coding guidelines. You need to either rebase this patch on top of that commit or I might even suggest just integrating this change into the patch that enables tail merging in MBP.

This revision now requires changes to proceed.May 25 2016, 3:12 PM
haicheng abandoned this revision.May 25 2016, 3:25 PM

Now D20276 always call tail merging, this patch is not needed. If D20276 needs to check whether the fall through is changed in the future, I will just integrate this change into D20276.