[all-commits] [llvm/llvm-project] dd21aa: [TailDuplicator] Do not restrict the computed goto...

DianQK via All-commits all-commits at lists.llvm.org
Mon Mar 10 04:34:29 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: dd21aacd76e36d4db157a5d7a7b5370d456426e6
      https://github.com/llvm/llvm-project/commit/dd21aacd76e36d4db157a5d7a7b5370d456426e6
  Author: DianQK <dianqk at dianqk.net>
  Date:   2025-03-10 (Mon, 10 Mar 2025)

  Changed paths:
    M llvm/include/llvm/CodeGen/MachineInstr.h
    M llvm/lib/CodeGen/TailDuplicator.cpp
    A llvm/test/CodeGen/X86/tail-dup-computed-goto.mir

  Log Message:
  -----------
  [TailDuplicator] Do not restrict the computed gotos (#114990)

Fixes #106846.

This is what I learned from GCC. I found that GCC does not duplicate the
BB that has indirect jumps with the jump table. I believe GCC has
provided a clear explanation here:

> Duplicate the blocks containing computed gotos. This basically
unfactors computed gotos that were factored early on in the compilation
process to speed up edge based data flow. We used to not unfactor them
again, which can seriously pessimize code with many computed jumps in
the source code, such as interpreters.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list