[all-commits] [llvm/llvm-project] c8ecf1: [Coroutines] Offering llvm.coro.align intrinsic

Chuanqi Xu via All-commits all-commits at lists.llvm.org
Tue Jan 18 17:53:18 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c8ecf12bc3e439a7f6525a430db9ad5ac7a7e1c1
      https://github.com/llvm/llvm-project/commit/c8ecf12bc3e439a7f6525a430db9ad5ac7a7e1c1
  Author: Chuanqi Xu <yedeng.yd at linux.alibaba.com>
  Date:   2022-01-19 (Wed, 19 Jan 2022)

  Changed paths:
    M llvm/docs/Coroutines.rst
    M llvm/include/llvm/Analysis/TargetTransformInfoImpl.h
    M llvm/include/llvm/IR/Intrinsics.td
    M llvm/lib/Transforms/Coroutines/CoroInstr.h
    M llvm/lib/Transforms/Coroutines/CoroInternal.h
    M llvm/lib/Transforms/Coroutines/CoroSplit.cpp
    M llvm/lib/Transforms/Coroutines/Coroutines.cpp
    A llvm/test/Transforms/Coroutines/coro-align-01.ll
    A llvm/test/Transforms/Coroutines/coro-align-02.ll
    A llvm/test/Transforms/Coroutines/coro-align-03.ll
    A llvm/test/Transforms/Coroutines/coro-align-04.ll
    A llvm/test/Transforms/Coroutines/coro-align-05.ll

  Log Message:
  -----------
  [Coroutines] Offering llvm.coro.align intrinsic

It is a known problem that we can't align the switch-based coroutine
frame if the alignment exceeds std::max_align_t (which is 16 usually).

We could solve the problem on the middle-end by dynamically transforming
or in the frontend by emitting aligned allocation function.

If we need to solve it in the frontend, the middle end need to offer an
intrinsic to tell the alignment at least. This patch tries to offer such
an intrinsic called llvm.coro.align.

Reviewed By: https://reviews.llvm.org/D117542

Differential revision: https://reviews.llvm.org/D117542




More information about the All-commits mailing list