This is an archive of the discontinued LLVM Phabricator instance.

[BBUtils][NFC] Delete SplitBlockAndInsertIfThen with DT.
ClosedPublic

Authored by caojoshua on Apr 27 2023, 11:51 PM.

Details

Summary

The method is marked for deprecation. Delete the method and move all of
its consumers to use the DomTreeUpdater version.

Diff Detail

Event Timeline

caojoshua created this revision.Apr 27 2023, 11:51 PM
Herald added a project: Restricted Project. · View Herald Transcript
Herald added subscribers: hoy, Enna1, kosarev and 5 others. · View Herald Transcript
caojoshua retitled this revision from [BBUtils] Delete SplitBlockAndInsertIfThen with DT. to [BBUtils][NFC] Delete SplitBlockAndInsertIfThen with DT..

Add [NFC] to commit message

caojoshua retitled this revision from [BBUtils][NFC] Delete SplitBlockAndInsertIfThen with DT. to [BBUtils] Delete SplitBlockAndInsertIfThen with DT..Apr 27 2023, 11:53 PM
caojoshua added reviewers: nikic, vporpo, fhahn.
caojoshua retitled this revision from [BBUtils] Delete SplitBlockAndInsertIfThen with DT. to [BBUtils][NFC] Delete SplitBlockAndInsertIfThen with DT..

Add [NFC] to commit message

caojoshua published this revision for review.Apr 27 2023, 11:55 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 27 2023, 11:55 PM
fhahn added inline comments.May 9 2023, 4:42 AM
llvm/include/llvm/Transforms/Utils/BasicBlockUtils.h
419

Sounds like this needs updating, maybe something like Updates the dominator tree via DTU and LI if given.

llvm/lib/Target/AMDGPU/AMDGPUAtomicOptimizer.cpp
107–108

nit: might be clearer to move this to the DomTreeUpdater initialization so it is clear that DT isn't used elsewhere?

108

nit: can just be DomTreeUpdater DTU(DT, DomTreeUpdater::UpdateStrategy::Lazy);? Same at other places.

Address comments, all stylistic / comments

caojoshua marked 3 inline comments as done.May 10 2023, 12:56 AM
foad accepted this revision.May 23 2023, 1:38 AM

Looks fine to me.

I have a slight preference for landing this in two stages, first convert all users and then delete the old method, but I won't insist.

llvm/lib/Transforms/Utils/LibCallsShrinkWrap.cpp
504

What's the reason for removing this extra verification?

This revision is now accepted and ready to land.May 23 2023, 1:38 AM
caojoshua updated this revision to Diff 524990.May 23 2023, 9:01 PM

Add back DT verification in LibCallsShrinkWrap

caojoshua marked an inline comment as done.May 23 2023, 9:02 PM
caojoshua added inline comments.
llvm/lib/Transforms/Utils/LibCallsShrinkWrap.cpp
504

No good reason. Added it back.

This revision was landed with ongoing or failed builds.May 23 2023, 9:10 PM
This revision was automatically updated to reflect the committed changes.
caojoshua marked an inline comment as done.