[all-commits] [llvm/llvm-project] 0412f7: [TailDuplicator] Do not restrict the computed goto...
DianQK via All-commits
all-commits at lists.llvm.org
Tue Mar 11 14:03:27 PDT 2025
Branch: refs/heads/release/20.x
Home: https://github.com/llvm/llvm-project
Commit: 0412f708c380d8fefc2136bbcfbcb5d551fe5730
https://github.com/llvm/llvm-project/commit/0412f708c380d8fefc2136bbcfbcb5d551fe5730
Author: DianQK <dianqk at dianqk.net>
Date: 2025-03-11 (Tue, 11 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.
(cherry picked from commit dd21aacd76e36d4db157a5d7a7b5370d456426e6)
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