[all-commits] [llvm/llvm-project] ae7bf2: CoroFrame: Put escaped variables with multiple lif...

Matthias Braun via All-commits all-commits at lists.llvm.org
Wed Jan 4 07:30:48 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ae7bf2b80b9bc6ff1adca0beed03f545fd40a35b
      https://github.com/llvm/llvm-project/commit/ae7bf2b80b9bc6ff1adca0beed03f545fd40a35b
  Author: Matthias Braun <matze at braunis.de>
  Date:   2023-01-04 (Wed, 04 Jan 2023)

  Changed paths:
    M llvm/lib/Transforms/Coroutines/CoroFrame.cpp
    A llvm/test/Transforms/Coroutines/coro-alloca-loop-carried-address.ll

  Log Message:
  -----------
  CoroFrame: Put escaped variables with multiple lifetimes on coroutine frame

The llvm.lifetime.start intrinsic guarantees that the address for a
given alloca is always the same. So variables with escaped addresses
reaching reaching a lifetime start/end block before and after a suspend
must be placed onto the coroutine frame even if the variable itself
is not alive across the suspend point.

This computes a new `LoopKill` flag in the suspend crossing data flow
anaysis to catch the case where a lifetime marker can reach itself
via suspend-crossing path.

This fixes https://llvm.org/PR52501

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




More information about the All-commits mailing list