This is an archive of the discontinued LLVM Phabricator instance.

[UnifyFunctionExitNodes] Remove unused getters, NFC
ClosedPublic

Authored by dstenb on Sep 3 2020, 2:18 AM.

Details

Summary

The get{Return,Unwind,Unreachable}Block functions in
UnifyFunctionExitNodes have not been used for many years,
so just remove them.

Diff Detail

Event Timeline

dstenb created this revision.Sep 3 2020, 2:18 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 3 2020, 2:18 AM
dstenb requested review of this revision.Sep 3 2020, 2:18 AM
bjope accepted this revision.Sep 4 2020, 9:17 AM

Just hoping that those unused functions aren't used by some OOT project. But considering that the API is totally untested (and the unwind part isn't even visible any longer) I think this cleanup is motivated.

LGTM - but please fixup the stale comments first!

llvm/include/llvm/Transforms/Utils/UnifyFunctionExitNodes.h
9–10

Stale comments, starting at "Additionally...".

9–10

Looks like this pass doesn't care about unwind? So this should probably say unreachable instead?

llvm/lib/Transforms/Utils/UnifyFunctionExitNodes.cpp
8–9

Maybe we could say "... at most one return instruction, and at most one unreachable instruction in them."

8–10

Stale comments, starting at "Additionally...".

This revision is now accepted and ready to land.Sep 4 2020, 9:17 AM
This revision was landed with ongoing or failed builds.Sep 8 2020, 11:42 AM
This revision was automatically updated to reflect the committed changes.
dstenb marked 2 inline comments as done.
dstenb marked 2 inline comments as done.Sep 8 2020, 11:44 AM

Thanks, and sorry for overlooking the comments!