[all-commits] [llvm/llvm-project] 8815ce: Remove "Rewrite Symbols" from codegen pipeline

aeubanks via All-commits all-commits at lists.llvm.org
Mon May 31 08:32:59 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 8815ce03e8575cb27e951b5f5a11384421730e20
      https://github.com/llvm/llvm-project/commit/8815ce03e8575cb27e951b5f5a11384421730e20
  Author: Arthur Eubanks <aeubanks at google.com>
  Date:   2021-05-31 (Mon, 31 May 2021)

  Changed paths:
    M llvm/lib/CodeGen/TargetPassConfig.cpp
    M llvm/lib/Target/ARM/ARMTargetMachine.cpp
    M llvm/lib/Target/ARM/CMakeLists.txt
    M llvm/test/CodeGen/AArch64/O0-pipeline.ll
    M llvm/test/CodeGen/AArch64/O3-pipeline.ll
    M llvm/test/CodeGen/AMDGPU/llc-pipeline.ll
    M llvm/test/CodeGen/ARM/O3-pipeline.ll
    M llvm/test/CodeGen/Generic/addr-label.ll
    M llvm/test/CodeGen/X86/O0-pipeline.ll
    M llvm/test/CodeGen/X86/opt-pipeline.ll
    M llvm/test/CodeGen/X86/select_meta.ll
    M llvm/test/Other/2010-05-06-Printer.ll
    M llvm/utils/gn/secondary/llvm/lib/Target/ARM/BUILD.gn

  Log Message:
  -----------
  Remove "Rewrite Symbols" from codegen pipeline

It breaks up the function pass manager in the codegen pipeline.

With empty parameters, it looks at the -mllvm flag -rewrite-map-file.
This is likely not in use.

Add a check that we only have one function pass manager in the codegen
pipeline.

Some tests relied on the fact that we had a module pass somewhere in the
codegen pipeline.

addr-label.ll crashes on ARM due to this change. This is because a
ARMConstantPoolConstant containing a BasicBlock to represent a
blockaddress may hold an invalid pointer to a BasicBlock if the
blockaddress is invalidated by its BasicBlock getting removed. In that
case all referencing blockaddresses are RAUW a constant int. Making
ARMConstantPoolConstant::CVal a WeakVH fixes the crash, but I'm not sure
that's the right fix. As a workaround, create a barrier right before
ISel so that IR optimizations can't happen while a
ARMConstantPoolConstant has been created.

Reviewed By: rnk, MaskRay, compnerd

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




More information about the All-commits mailing list