[all-commits] [llvm/llvm-project] c0748f: [clang-tools-extra] [clangd] Respect llvm_shlib_di...

Sam McCall via All-commits all-commits at lists.llvm.org
Sun Oct 9 23:50:25 PDT 2022


  Branch: refs/heads/release/15.x
  Home:   https://github.com/llvm/llvm-project
  Commit: c0748fe6dec5927bb343c2bb25741fc5d0d280a2
      https://github.com/llvm/llvm-project/commit/c0748fe6dec5927bb343c2bb25741fc5d0d280a2
  Author: Michał Górny <mgorny at gentoo.org>
  Date:   2022-10-10 (Mon, 10 Oct 2022)

  Changed paths:
    M clang-tools-extra/clangd/test/lit.site.cfg.py.in

  Log Message:
  -----------
  [clang-tools-extra] [clangd] Respect llvm_shlib_dir in tests

Add llvm_shlib_dir to variables used in clangd test suite, consistently
to how it is used in the test suites of clang, clang-tools-extra
and a few other components.  This is necessary to ensure that
the correct shared libraries are used when building clang standalone --
otherwise, use_clang() sets LD_LIBRARY_PATH to the directory containing
the earlier system installation of clang rather than the just-built
library.

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

(cherry picked from commit 77945a344c3dee3f9735744c8d4151ef2cec6a8d)


  Commit: 61fa70903191f2350dc20dee2c9f45a8fbdf28af
      https://github.com/llvm/llvm-project/commit/61fa70903191f2350dc20dee2c9f45a8fbdf28af
  Author: Florian Hahn <flo at fhahn.com>
  Date:   2022-10-10 (Mon, 10 Oct 2022)

  Changed paths:
    M llvm/lib/Transforms/Utils/LoopVersioning.cpp
    A llvm/test/Transforms/LoopLoadElim/versioning-scev-invalidation.ll

  Log Message:
  -----------
  [LoopVersioning] Invalidate SCEV for phi if new values are added.

After 20d798bd47ec5191d, SCEV looks through PHIs with a single incoming
value. This means adding a new incoming value may change the SCEV for a
phi. Add missing invalidation when an existing PHI is reused during
LoopVersioning. New incoming values will be added later from the
versioned loop.

Similar issues have been fixed by also adding missing invalidation.

Fixes #57825.

Note that the test case unfortunately requires running loop-vectorize
followed by loop-load-elimination, which does the actual versioning. I
don't think it is possible to reproduce the failure without that
combination.

(cherry picked from commit 623c4a7a55f716b96070a5c2f83fe0096cb38d38)


  Commit: 73ea64f30411bcb9a2f32649a49d4c23780ee045
      https://github.com/llvm/llvm-project/commit/73ea64f30411bcb9a2f32649a49d4c23780ee045
  Author: Sam McCall <sam.mccall at gmail.com>
  Date:   2022-10-10 (Mon, 10 Oct 2022)

  Changed paths:
    M clang-tools-extra/clangd/Headers.cpp
    M clang-tools-extra/clangd/Headers.h
    M clang-tools-extra/clangd/index/CanonicalIncludes.cpp
    M clang-tools-extra/clangd/unittests/HeadersTests.cpp

  Log Message:
  -----------
  [clangd] Avoid scanning up to end of file on each comment!

Assigning char* (pointing at comment start) to StringRef was causing us
to scan the rest of the source file looking for the null terminator.

This seems to be eating about 8% of our *total* CPU!

While fixing this, factor out the common bits from the two places we're
parsing IWYU pragmas.

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

(cherry picked from commit 5d2d527c32da2081b814ef8b446bc3e037f74b0a)


  Commit: bd5722b87b5aa1b8286762af7f29b6aae669dee1
      https://github.com/llvm/llvm-project/commit/bd5722b87b5aa1b8286762af7f29b6aae669dee1
  Author: Freddy Ye <freddy.ye at intel.com>
  Date:   2022-10-10 (Mon, 10 Oct 2022)

  Changed paths:
    M llvm/lib/Support/X86TargetParser.cpp
    M llvm/lib/Target/X86/X86.td

  Log Message:
  -----------
  [X86] Remove AVX512VP2INTERSECT from Sapphire Rapids.

For more details, please refer to the latest ISE document: https://www.intel.com/content/www/us/en/develop/download/intel-architecture-instruction-set-extensions-programming-reference.html

Reviewed By: pengfei

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

(cherry picked from commit 566c277c64f8f76d8911aa5fd931903a357ed7be)


  Commit: 359ef0c932404d31347ce25895fdcadee1004381
      https://github.com/llvm/llvm-project/commit/359ef0c932404d31347ce25895fdcadee1004381
  Author: Sam McCall <sam.mccall at gmail.com>
  Date:   2022-10-10 (Mon, 10 Oct 2022)

  Changed paths:
    M clang-tools-extra/clangd/InlayHints.cpp
    M clang-tools-extra/clangd/unittests/InlayHintTests.cpp

  Log Message:
  -----------
  [clangd] Improve inlay hints of things expanded from macros

When we aim a hint at some expanded tokens, we're only willing to attach it
to spelled tokens that exactly corresponde.

e.g.
int zoom(int x, int y, int z);
int dummy = zoom(NUMBERS);

Here we want to place a hint "x:" on the expanded "1", but we shouldn't
be willing to place it on NUMBERS, because it doesn't *exactly*
correspond (it has more tokens).

Fortunately we don't even have to implement this algorithm from scratch,
TokenBuffer has it.

Fixes https://github.com/clangd/clangd/issues/1289
Fixes https://github.com/clangd/clangd/issues/1118
Fixes https://github.com/clangd/clangd/issues/1018

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

(cherry picked from commit 924974a3a13b03090d04860f209ce11b3d9d00a6)


  Commit: 27e075fcfad137b43367734052c63abe12555403
      https://github.com/llvm/llvm-project/commit/27e075fcfad137b43367734052c63abe12555403
  Author: Sam McCall <sam.mccall at gmail.com>
  Date:   2022-10-10 (Mon, 10 Oct 2022)

  Changed paths:
    M clang/lib/Tooling/Syntax/Tokens.cpp
    M clang/unittests/Tooling/Syntax/TokensTest.cpp

  Log Message:
  -----------
  [Syntax] Fix macro-arg handling in TokenBuffer::spelledForExpanded

A few cases were not handled correctly. Notably:
  #define ID(X) X
  #define HIDE a ID(b)
  HIDE
spelledForExpanded() would claim HIDE is an equivalent range of the 'b' it
contains, despite the fact that HIDE also covers 'a'.

While trying to fix this bug, I found findCommonRangeForMacroArgs hard
to understand (both the implementation and how it's used in spelledForExpanded).
It relies on details of the SourceLocation graph that are IMO fairly obscure.
So I've added/revised quite a lot of comments and made some naming tweaks.

Fixes https://github.com/clangd/clangd/issues/1289

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

(cherry picked from commit 67268ee11c220b1dfdf84afb10a12371c5ae6400)


Compare: https://github.com/llvm/llvm-project/compare/4bd3f3759259...27e075fcfad1


More information about the All-commits mailing list