[PATCH] D155711: [SimplifyCFG] Hoist common instructions on Switch.
DianQK via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 27 07:15:41 PDT 2023
DianQK updated this revision to Diff 544763.
DianQK added a comment.
Add the `hoistCommonCodeFromSuccessors` method as a generic hoist common code implementation.
The existing test cases look like they all pass. More test cases for the switch statement may need to be added.
There may be some duplicate calculations that can be eliminated, such as `shouldHoistCommonInstructions`. But I think most of the code is done.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D155711/new/
https://reviews.llvm.org/D155711
Files:
llvm/lib/Transforms/Utils/SimplifyCFG.cpp
llvm/test/CodeGen/AArch64/patchable-function-entry-bti.ll
llvm/test/Transforms/SimplifyCFG/hoist-common-code-with-unreachable.ll
llvm/test/Transforms/SimplifyCFG/hoist-common-code.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D155711.544763.patch
Type: text/x-patch
Size: 28149 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230727/e9a609fe/attachment.bin>
More information about the llvm-commits
mailing list