[all-commits] [llvm/llvm-project] c33203: [X86] Avoid generating nested CALLSEQ for TLS poin...

Fabian Ritter via All-commits all-commits at lists.llvm.org
Thu Sep 5 00:05:21 PDT 2024


  Branch: refs/heads/users/ritter-x2a/avoid-nested-callseqs-for-tls-args
  Home:   https://github.com/llvm/llvm-project
  Commit: c332034894c9fa3de26daedb28a977a3580dc4d8
      https://github.com/llvm/llvm-project/commit/c332034894c9fa3de26daedb28a977a3580dc4d8
  Author: Fabian Ritter <fabian.ritter at amd.com>
  Date:   2024-09-05 (Thu, 05 Sep 2024)

  Changed paths:
    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