[all-commits] [llvm/llvm-project] a9b575: [LoopRotate][coroutines] Avoid hoisting addresses ...

Alan Zhao via All-commits all-commits at lists.llvm.org
Tue Feb 20 11:14:22 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a9b5753220ef1f24b1b5bb44b5ca485a66c66349
      https://github.com/llvm/llvm-project/commit/a9b5753220ef1f24b1b5bb44b5ca485a66c66349
  Author: Alan Zhao <alanzhao1 at users.noreply.github.com>
  Date:   2024-02-20 (Tue, 20 Feb 2024)

  Changed paths:
    M llvm/lib/Transforms/Utils/LoopRotationUtils.cpp
    M llvm/test/Transforms/LoopRotate/coroutine.ll

  Log Message:
  -----------
  [LoopRotate][coroutines] Avoid hoisting addresses of thread-local variables outside loops in coroutines (#81937)

Because loops in coroutines may have a co_await statement that
reschedules the coroutine to another thread, we cannot cache addresses
of thread-local variables obtained inside a loop by moving the
computation of thoes addresses outside a loop.

Since LLVM doesn't have a model for coroutine memory accesses, this
patch fixes this bug by disabling this optimization for coroutines in
the same way as https://reviews.llvm.org/D135550 and
https://reviews.llvm.org/D151774.



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