[all-commits] [llvm/llvm-project] ac1a1e: [ThinLTO][TypeProf] Import local-linkage global va...

darkbuck via All-commits all-commits at lists.llvm.org
Wed Jul 24 20:57:02 PDT 2024


  Branch: refs/heads/users/darkbuck/spr/simplifycfg-skip-threading-if-the-target-may-have-divergent-branches
  Home:   https://github.com/llvm/llvm-project
  Commit: ac1a1e5797388598201511d17f05aa088ef4a2e2
      https://github.com/llvm/llvm-project/commit/ac1a1e5797388598201511d17f05aa088ef4a2e2
  Author: Mingming Liu <mingmingl at google.com>
  Date:   2024-07-24 (Wed, 24 Jul 2024)

  Changed paths:
    M compiler-rt/test/profile/Linux/instrprof-vtable-value-prof.cpp
    M llvm/lib/Transforms/IPO/FunctionImport.cpp

  Log Message:
  -----------
  [ThinLTO][TypeProf] Import local-linkage global var for mod1:func_foo-> mod2:local-var edge (#100448)

VTable value profiling can create reference edges from `mod1:func_foo`
to `mod2:local-vtable`. Indirect call profiling can create reference
edges from `mod1:func_foo` to `mod2:local_func_bar`.

Given a ref chain `mod1:func_foo -> mod2:local-var`,`local-var` doesn't
get imported by default.

Compiler checks / requires the module of 'local-var' is the same as the
function that referenced it(`mod1:func_foo`). This is to prevent
mis-compilation when both `mod1` and `mod2` has `local-var` of the same
name, and cpp files are compiled without full path.

This patch allows the import when one of the following conditions
happen:
1) Introduce an option `import-assume-local-unique`. When the compiler
user can guarantee that all files are compiled with full paths, they can
set this option.
2) When there is one instance of value summary.

Test:
* A/B testing this option alone gives -0.16% statistically consistent
cpu cycle reduction on one search workload (no throughput increase)
* Testing it together with existing more-efficient ICP bumps the
throughput increase by a margin (0.05%~0.1%)
* No regressions observed.


  Commit: 8e43acbfedf53ded43ec693ddaaf518cb7416c1c
      https://github.com/llvm/llvm-project/commit/8e43acbfedf53ded43ec693ddaaf518cb7416c1c
  Author: Joseph Huber <huberjn at outlook.com>
  Date:   2024-07-24 (Wed, 24 Jul 2024)

  Changed paths:
    M libc/cmake/modules/LLVMLibCCompileOptionRules.cmake
    M libc/cmake/modules/LLVMLibCObjectRules.cmake

  Log Message:
  -----------
  [libc] Only add '-fno-builtin-*' on the entrypoints that use them (#100481)

Summary:
The GPU build needs to be able to inline stuff in LTO. Builtin
transformations cause problems on the functions that the optimizer does
heavy libcall recognition on. Previously we moved to using
`-fno-builtin-*` to allow us to only disable the problematic ones.
However, this still didn't allow inlining because each function had the
attribute that told the inliner not to inlining a nobuiltin function
into a non-nobuiltin function

This patch fixes that by only applying these attributes to the
entrypoints that define them. That is enough to prevent recursive calls
within the definitoins themselves.


  Commit: 7e7a9069d4240d2ae619cb50eba09f948c537ce3
      https://github.com/llvm/llvm-project/commit/7e7a9069d4240d2ae619cb50eba09f948c537ce3
  Author: Owen Pan <owenpiano at gmail.com>
  Date:   2024-07-24 (Wed, 24 Jul 2024)

  Changed paths:
    M clang/lib/Format/TokenAnnotator.cpp
    M clang/unittests/Format/TokenAnnotatorTest.cpp

  Log Message:
  -----------
  Revert "[clang-format] Fix a bug in annotating `*` in `#define`s (#99433)"

This reverts commit ce1a87437cc143889665c41046107e84cdf6246e.

Closes #100304.


  Commit: ccae7b461be339e717d02f99ac857cf0bc7d17fc
      https://github.com/llvm/llvm-project/commit/ccae7b461be339e717d02f99ac857cf0bc7d17fc
  Author: Gedare Bloom <gedare at rtems.org>
  Date:   2024-07-24 (Wed, 24 Jul 2024)

  Changed paths:
    M clang/lib/Format/ContinuationIndenter.cpp
    M clang/lib/Format/FormatToken.h
    M clang/lib/Format/TokenAnnotator.cpp
    M clang/unittests/Format/FormatTest.cpp
    M clang/unittests/Format/TokenAnnotatorTest.cpp

  Log Message:
  -----------
  [clang-format] Improve BlockIndent at ColumnLimit (#93140)

Fixes #55731

The reported formatting problems were related to ignoring deep nesting
of "simple" functions (causing #54808) and to allowing the trailing
annotation to become separated from the closing parens, which allowed a
break to occur between the closing parens and the trailing annotation.
The fix for the nesting of "simple" functions is to detect them more
carefully. "Simple" was defined in a comment as being a single
non-expression argument. I tried to stay as close to the original intent
of the implementation while fixing the various bad formatting reports.

In the process of fixing these bugs, some latent bugs were discovered
related to how JavaScript Template Strings are handled. Those are also
fixed here.

---------

Co-authored-by: Owen Pan <owenpiano at gmail.com>


  Commit: 670595327f4d96ec70974d1cbab8dca1036d1e10
      https://github.com/llvm/llvm-project/commit/670595327f4d96ec70974d1cbab8dca1036d1e10
  Author: Michael Liao <michael.hliao at gmail.com>
  Date:   2024-07-24 (Wed, 24 Jul 2024)

  Changed paths:
    M clang/lib/Format/ContinuationIndenter.cpp
    M clang/lib/Format/FormatToken.h
    M clang/lib/Format/TokenAnnotator.cpp
    M clang/unittests/Format/FormatTest.cpp
    M clang/unittests/Format/TokenAnnotatorTest.cpp
    M compiler-rt/test/profile/Linux/instrprof-vtable-value-prof.cpp
    M libc/cmake/modules/LLVMLibCCompileOptionRules.cmake
    M libc/cmake/modules/LLVMLibCObjectRules.cmake
    M llvm/lib/Transforms/IPO/FunctionImport.cpp

  Log Message:
  -----------
  rebase

Created using spr 1.3.4


Compare: https://github.com/llvm/llvm-project/compare/2307aac9b849...670595327f4d

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