This is an archive of the discontinued LLVM Phabricator instance.

[SimplifyCFG] Expose sinking and hoisting helpers.
AbandonedPublic

Authored by fhahn on Apr 26 2021, 5:36 AM.

Details

Summary

This allows other code to run hoisting and sinking on
demand, to prevent regressions after by disabling hoisting &
sinking in early SimplifyCFG.

Diff Detail

Event Timeline

fhahn created this revision.Apr 26 2021, 5:36 AM
fhahn requested review of this revision.Apr 26 2021, 5:36 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 26 2021, 5:36 AM
RKSimon added inline comments.Apr 26 2021, 6:10 AM
llvm/include/llvm/Transforms/Utils/Local.h
186

Do we need DTU?

fhahn added inline comments.Apr 26 2021, 9:01 AM
llvm/include/llvm/Transforms/Utils/Local.h
186

Yes I think so. I think the function may have to update the DT, in case the terminators are hoisted (around llvm/lib/Transforms/Utils/SimplifyCFG.cpp:1617)

This revision is now accepted and ready to land.Apr 27 2021, 1:23 AM
RKSimon added inline comments.Apr 27 2021, 5:02 AM
llvm/include/llvm/Transforms/Utils/Local.h
186

OK, if you're intending to make use of it in an upcoming patch that's fine - I didn't see it being put to use in D101290 though.

fhahn abandoned this revision.Jun 24 2021, 7:32 AM

We eventually went with a different approach than D101290, so this refactoring is not needed any longer.