[all-commits] [llvm/llvm-project] ae3854: [NewPM] Provide method to run all pipeline callbac...

aeubanks via All-commits all-commits at lists.llvm.org
Wed Nov 4 22:27:39 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: ae38540042668675dd16c642d850115f217ea59f
      https://github.com/llvm/llvm-project/commit/ae38540042668675dd16c642d850115f217ea59f
  Author: Arthur Eubanks <aeubanks at google.com>
  Date:   2020-11-04 (Wed, 04 Nov 2020)

  Changed paths:
    M clang/lib/CodeGen/BackendUtil.cpp
    A clang/test/CodeGen/bpf-O0.c
    M llvm/include/llvm/Passes/PassBuilder.h
    M llvm/lib/Passes/PassBuilder.cpp
    M llvm/test/CodeGen/BPF/optnone-2.ll
    A llvm/test/Other/new-pm-O0-ep-callbacks.ll

  Log Message:
  -----------
  [NewPM] Provide method to run all pipeline callbacks, used for -O0

    Some targets may add required passes via
    TargetMachine::registerPassBuilderCallbacks(). We need to run those even
    under -O0. As an example, BPFTargetMachine adds
    BPFAbstractMemberAccessPass, a required pass.

    This also allows us to clean up BackendUtil.cpp (and out-of-tree Rust
    usage of the NPM) by allowing us to share added passes like coroutines
    and sanitizers between -O0 and other optimization levels.

    Tests are a continuation of those added in
    https://reviews.llvm.org/D89083.

    In order to prevent TargetMachines from adding unnecessary optimization
    passes at -O0, TargetMachine::registerPassBuilderCallbacks() will be
    changed to take an OptimizationLevel, but that will be done separately.

Reviewed By: asbirlea

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




More information about the All-commits mailing list