[PATCH] D70091: WIP: BlockFolding not debug invariant (PR43964)

Bjorn Pettersson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 11 09:36:31 PST 2019


bjope created this revision.
Herald added subscribers: hiraditya, aprantl.
Herald added a project: LLVM.

Not ready for commit.

Showing some possible refactoring in ComputeCommonTailLength.

Also one way to get ProfitableToMerge to return true/false
independently of debug info and CFI directives.
Problem with the solution in this patch is that we might end up
splitting blocks with only non-instructions before the tail. So
we might get branches around such empty blocks remaining in the
code (so still not fully debug invariant).

Another alternative is to let I1 and I2 move backwards past
"non instructions" and include them in the tails. A problem with
such a solution is that BranchFolding does not really handle
directives as part of the tail in a good way. Looks like for
example CFI directives can get lost, with no good results.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D70091

Files:
  llvm/lib/CodeGen/BranchFolding.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D70091.228716.patch
Type: text/x-patch
Size: 8921 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191111/ad1b25b2/attachment.bin>


More information about the llvm-commits mailing list