[all-commits] [llvm/llvm-project] 6950db: The wrong placement of add pass with optimizations...

Sriraman Tallam via All-commits all-commits at lists.llvm.org
Mon Sep 21 10:02:50 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 6950db36d33d85d18e3241ab6c87494c05ebe0fb
      https://github.com/llvm/llvm-project/commit/6950db36d33d85d18e3241ab6c87494c05ebe0fb
  Author: Sriraman Tallam <tmsriram at google.com>
  Date:   2020-09-21 (Mon, 21 Sep 2020)

  Changed paths:
    M clang/lib/CodeGen/BackendUtil.cpp
    M clang/test/CodeGen/unique-internal-linkage-names.cpp

  Log Message:
  -----------
  The wrong placement of add pass with optimizations led to -funique-internal-linkage-names being disabled.

Fixed the placement of the MPM.addpass for UniqueInternalLinkageNames to make
it work correctly with -O2 and new pass manager. Updated the tests to
explicitly check O0 and O2.

Previously, the addPass was placed before BackendUtil.cpp#L1373 which is wrong
as MPM gets assigned at this point and any additions to the pass vector before
this is wrong. This change just moves it after MPM is assigned and places it at
a point where O0 and O0+ can share it.

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




More information about the All-commits mailing list