[all-commits] [llvm/llvm-project] 9f5a2b: [Coroutine] Properly determine whether an alloca s...

Xun Li via All-commits all-commits at lists.llvm.org
Thu Oct 29 23:56:23 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 9f5a2beadce411c14f6d1b1fb634d2fdc71ca6a7
      https://github.com/llvm/llvm-project/commit/9f5a2beadce411c14f6d1b1fb634d2fdc71ca6a7
  Author: Xun Li <xun at fb.com>
  Date:   2020-10-29 (Thu, 29 Oct 2020)

  Changed paths:
    M llvm/lib/Transforms/Coroutines/CoroFrame.cpp
    A llvm/test/Transforms/Coroutines/coro-alloca-01.ll
    A llvm/test/Transforms/Coroutines/coro-alloca-02.ll
    A llvm/test/Transforms/Coroutines/coro-alloca-03.ll
    A llvm/test/Transforms/Coroutines/coro-alloca-04.ll
    M llvm/test/Transforms/Coroutines/coro-debug-frame-variable.ll

  Log Message:
  -----------
  [Coroutine] Properly determine whether an alloca should live on the frame

The existing logic in determining whether an alloca should live on the frame only looks explicit def-use relationships. However a value defined by an alloca may be implicitly needed across suspension points, either because an alias has across-suspension-point def-use relationship, or escaped by store/call/memory intrinsics. To properly handle all these cases, we have to properly visit the alloca pointer up-front. Thie patch extends the exisiting alloca use visitor to determine whether an alloca should live on the frame.

Differential Revision: https://reviews.llvm.org/D89768




More information about the All-commits mailing list