[PATCH] D148623: [MachineCSE] Extend the scope of multi block processing.

Serguei Katkov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 18 02:26:41 PDT 2023


skatkov created this revision.
skatkov added reviewers: efriedma, eli.friedman, craig.topper, danilaml, goldstein.w.n.
Herald added subscribers: pengfei, hiraditya.
Herald added a project: All.
skatkov requested review of this revision.
Herald added a project: LLVM.

At the moment CSE consider only one predecessor if it is alone.
This patch allows to search in any number of block if for each
of them there is only one predecessor.

The LookAheadLimit still controls the number of instruction
to proceed.

The motivation case is in llvm/test/CodeGen/X86/cse-two-preds.mir and https://godbolt.org/z/rEj9GPfnY


https://reviews.llvm.org/D148623

Files:
  llvm/lib/CodeGen/MachineCSE.cpp
  llvm/test/CodeGen/Thumb2/thumb2-cbnz.ll
  llvm/test/CodeGen/X86/2007-11-30-LoadFolding-Bug.ll
  llvm/test/CodeGen/X86/2008-04-17-CoalescerBug.ll
  llvm/test/CodeGen/X86/cse-two-preds.mir
  llvm/test/CodeGen/X86/ins_subreg_coalesce-3.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D148623.514575.patch
Type: text/x-patch
Size: 8047 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230418/7e5e2e39/attachment.bin>


More information about the llvm-commits mailing list