[all-commits] [llvm/llvm-project] 747e5c: X86: support Swift Async context

Tim Northover via All-commits all-commits at lists.llvm.org
Mon May 17 03:56:41 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 747e5cfb9f5d944b47fe014925b0d5dc2fda74d7
      https://github.com/llvm/llvm-project/commit/747e5cfb9f5d944b47fe014925b0d5dc2fda74d7
  Author: Tim Northover <t.p.northover at gmail.com>
  Date:   2021-05-17 (Mon, 17 May 2021)

  Changed paths:
    M llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp
    M llvm/lib/Target/X86/X86FastISel.cpp
    M llvm/lib/Target/X86/X86FrameLowering.cpp
    M llvm/lib/Target/X86/X86ISelLowering.cpp
    M llvm/lib/Target/X86/X86MachineFunctionInfo.h
    A llvm/test/CodeGen/X86/swift-async-reg.ll
    A llvm/test/CodeGen/X86/swift-async.ll

  Log Message:
  -----------
  X86: support Swift Async context

This adds support to the X86 backend for the newly committed swiftasync
function parameter. If such a (pointer) parameter is present it gets stored
into an augmented frame record (populated in IR, but generally containing
enhanced backtrace for coroutines using lots of tail calls back and forth).

The context frame is identical to AArch64 (primarily so that unwinders etc
don't get extra complexity). Specfically, the new frame record is [AsyncCtx,
%rbp, ReturnAddr], and its presence is signalled by bit 60 of the stored %rbp
being set to 1. %rbp still points to the frame pointer in memory for backwards
compatibility (only partial on x86, but OTOH the weird AsyncCtx before the rest
of the record is because of x86).




More information about the All-commits mailing list