[PATCH] D129370: [SimplifyCFG] Allow SimplifyCFG hoisting to skip over non-matching instructions

Momchil Velikov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 8 06:48:00 PDT 2022


chill created this revision.
Herald added a subscriber: hiraditya.
Herald added a project: All.
chill requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

SimplifyCFG does some common code hoisting, which is limited to hoisting a
sequence of identical instruction in identical order and stops at the first
non-identical instruction.

      

This patch allows hoisting instruction pairs over same-length sequences of
non-matching instructions. The linear asymptotic complexity of the algorithm
stays the same, there's an extra parameter `simplifycfg-hoist-common-skip-limit`
serving to limit compilation time and/or the size of the hoisted live ranges.

The patch improves SPECv6/525.x264_r by about 10%.


https://reviews.llvm.org/D129370

Files:
  llvm/lib/Transforms/Utils/SimplifyCFG.cpp
  llvm/test/Transforms/SimplifyCFG/hoist-common-skip.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D129370.443234.patch
Type: text/x-patch
Size: 16988 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220708/53d98023/attachment-0001.bin>


More information about the llvm-commits mailing list