This is an archive of the discontinued LLVM Phabricator instance.

[NFC][DebugInfo][RemoveDIs] Provide an iterator-taking split-block method
ClosedPublic

Authored by jmorse on Jun 9 2023, 8:24 AM.

Details

Summary

As per the stack of patches this is attached to, allow users of BasicBlock::splitBasicBlock to provide an iterator for a position, instead of just an instruction pointer. This is to fit with my proposal for how to get rid of debug intrinsics [0]. There are other call-sites that would need to change, but this is sufficient for a stage2clang self host and some other C++ projects to build identical binaries, in the context of the whole remove-DIs project.

This is technically NFC, but I'm not adding reviewers yet as we need to have a discussion about testing first, will put that on discourse.

[0] https://discourse.llvm.org/t/rfc-instruction-api-changes-needed-to-eliminate-debug-intrinsics-from-ir/68939

Diff Detail

Event Timeline

jmorse created this revision.Jun 9 2023, 8:24 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 9 2023, 8:24 AM
Herald added a subscriber: hiraditya. · View Herald Transcript
jmorse requested review of this revision.Jun 9 2023, 8:24 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 9 2023, 8:24 AM
Orlando accepted this revision.Sep 8 2023, 2:00 AM
Orlando added a subscriber: Orlando.

LGTM (with formatting nits)

llvm/include/llvm/Transforms/Utils/BasicBlockUtils.h
449

nit: clang-format

470

nit: clang-format

This revision is now accepted and ready to land.Sep 8 2023, 2:00 AM
This revision was landed with ongoing or failed builds.Sep 11 2023, 9:52 AM
This revision was automatically updated to reflect the committed changes.