[all-commits] [llvm/llvm-project] 9bd66b: [PassManager][Coroutine] Run passes under -O0 cond...

aeubanks via All-commits all-commits at lists.llvm.org
Wed Mar 23 11:03:50 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9bd66b312c3e0e539ac6c85c1bacd17bdc731614
      https://github.com/llvm/llvm-project/commit/9bd66b312c3e0e539ac6c85c1bacd17bdc731614
  Author: Arthur Eubanks <aeubanks at google.com>
  Date:   2022-03-23 (Wed, 23 Mar 2022)

  Changed paths:
    M clang/test/CodeGen/lto-newpm-pipeline.c
    A llvm/include/llvm/Transforms/Coroutines/CoroConditionalWrapper.h
    M llvm/lib/Passes/PassBuilderPipelines.cpp
    M llvm/lib/Transforms/Coroutines/CMakeLists.txt
    A llvm/lib/Transforms/Coroutines/CoroConditionalWrapper.cpp
    M llvm/lib/Transforms/Coroutines/CoroInternal.h
    M llvm/lib/Transforms/Coroutines/Coroutines.cpp
    M llvm/test/Other/new-pm-O0-defaults.ll
    A llvm/test/Transforms/Coroutines/coro-internal-O0.ll
    M llvm/test/Transforms/Coroutines/coro-retcon-once-private.ll
    M llvm/test/Transforms/Coroutines/smoketest.ll
    M llvm/utils/gn/secondary/llvm/lib/Transforms/Coroutines/BUILD.gn

  Log Message:
  -----------
  [PassManager][Coroutine] Run passes under -O0 conditionally and run GlobalDCE

CoroSplit lowers various coroutine intrinsics. It's a CGSCC pass and
CGSCC passes don't run on unreachable functions. Normally GlobalDCE will
come along and delete unreachable functions, but we don't run GlobalDCE
under -O0, so an unreachable function with coroutine intrinsics may
never have CoroSplit run on it.

This patch adds GlobalDCE when coroutines intrinsics are present. It
also now runs all coroutine passes conditional when coroutine intrinsics
are present. This should also solve the -O0 regression reported in
D105877 due to LazyCallGraph construction.

Fixes https://github.com/llvm/llvm-project/issues/54117

Reviewed By: ChuanqiXu

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




More information about the All-commits mailing list