[all-commits] [llvm/llvm-project] 58e482: [X86] Avoid generating nested CALLSEQ for TLS poin...
Fabian Ritter via All-commits
all-commits at lists.llvm.org
Thu Oct 10 03:16:22 PDT 2024
Branch: refs/heads/users/ritter-x2a/avoid-nested-callseqs-for-tls-args
Home: https://github.com/llvm/llvm-project
Commit: 58e48285971bedaa3d2cb878ddd290569b936e10
https://github.com/llvm/llvm-project/commit/58e48285971bedaa3d2cb878ddd290569b936e10
Author: Fabian Ritter <fabian.ritter at amd.com>
Date: 2024-10-10 (Thu, 10 Oct 2024)
Changed paths:
M llvm/include/llvm/CodeGen/MachineFrameInfo.h
M llvm/lib/CodeGen/FinalizeISel.cpp
M llvm/lib/Target/X86/X86ISelLowering.cpp
A llvm/test/CodeGen/X86/tls-function-argument.ll
Log Message:
-----------
[X86] Avoid generating nested CALLSEQ for TLS pointer function arguments
When a pointer to thread-local storage is passed in a function call,
ISel first lowers the call and wraps the resulting code in CALLSEQ
markers. Afterwards, to compute the pointer to TLS, a call to retrieve
the TLS base address is generated and then wrapped in a set of CALLSEQ
markers. If the latter call is inserted into the call sequence of the
former call, this leads to nested call frames, which are illegal and
lead to errors in the machine verifier.
This patch avoids surrounding the call to compute the TLS base address
in CALLSEQ markers if it is already surrounded by such markers. It
relies on zero-sized call frames being represented in the call frame
size info stored in the MachineBBs.
Fixes #45574 and #98042.
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