This is an archive of the discontinued LLVM Phabricator instance.

[SplitEdge] Add new parameter to SplitEdge to name the newly created basic block
ClosedPublic

Authored by sidbav on Jan 6 2021, 7:01 AM.

Details

Summary

Currently SplitEdge does not support passing in parameter which allows you to name the newly created BasicBlock.

This patch updates the function such that the name of the block can be passed in, if users of this utility decide to do so.

Diff Detail

Event Timeline

sidbav created this revision.Jan 6 2021, 7:01 AM
sidbav requested review of this revision.Jan 6 2021, 7:01 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 6 2021, 7:01 AM
Whitney added inline comments.Jan 6 2021, 7:03 AM
llvm/lib/Transforms/Utils/BasicBlockUtils.cpp
504

how about the critical edge case? can we pass BBName there too?

sidbav updated this revision to Diff 314910.Jan 6 2021, 8:39 AM

Pass in the BBName Parameter to the critical edge case as well.

sidbav marked an inline comment as done.Jan 6 2021, 8:39 AM
sidbav updated this revision to Diff 314912.Jan 6 2021, 8:58 AM

Made a small error in the previous diff, updated the minor typo.

asbirlea accepted this revision.Jan 6 2021, 6:21 PM

lgtm.

This revision is now accepted and ready to land.Jan 6 2021, 6:21 PM