[all-commits] [llvm/llvm-project] 08badf: [Attributor][FIX] Visit same instructions with dif...

Martin Storsjö via All-commits all-commits at lists.llvm.org
Thu Aug 11 23:37:03 PDT 2022


  Branch: refs/heads/release/15.x
  Home:   https://github.com/llvm/llvm-project
  Commit: 08badf9106502e2b18460ad9a3ef0e7a7bf6a641
      https://github.com/llvm/llvm-project/commit/08badf9106502e2b18460ad9a3ef0e7a7bf6a641
  Author: Johannes Doerfert <johannes at jdoerfert.de>
  Date:   2022-08-12 (Fri, 12 Aug 2022)

  Changed paths:
    M llvm/lib/Transforms/IPO/AttributorAttributes.cpp
    M llvm/test/Transforms/Attributor/value-simplify-pointer-info.ll

  Log Message:
  -----------
  [Attributor][FIX] Visit same instructions with different scopes

If we collect potential values we need to visit a value even if we have
seen it before if the scope is different. The scope is part of the
result after all. Test included.

Fixes https://github.com/llvm/llvm-project/issues/56753

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

(cherry picked from commit b65471d7152d15790ae599326da86b7e6cfb4580)


  Commit: d3847c17ead1886ce16df890f891a2b9d10841ab
      https://github.com/llvm/llvm-project/commit/d3847c17ead1886ce16df890f891a2b9d10841ab
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2022-08-12 (Fri, 12 Aug 2022)

  Changed paths:
    M llvm/lib/Transforms/Utils/RelLookupTableConverter.cpp
    A llvm/test/Transforms/RelLookupTableConverter/X86/gnux32.ll

  Log Message:
  -----------
  [RelLookupTableConverter] Bail on invalid pointer size (x32)

The RelLookupTableConverter pass currently only supports 64-bit
pointers.  This is currently enforced using an isArch64Bit() check
on the target triple. However, we consider x32 to be a 64-bit target,
even though the pointers are 32-bit. (And independently of that
specific example, there may be address spaces with different pointer
sizes.)

As such, add an additional guard for the size of the pointers that
are actually part of the lookup table.

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

(cherry picked from commit 4ac00789e1b30145ec3cacc4b2a66cb755ff9e4a)


  Commit: ba988fd0f86ce706929f7f280bd922a19db980ca
      https://github.com/llvm/llvm-project/commit/ba988fd0f86ce706929f7f280bd922a19db980ca
  Author: Martin Storsjö <martin at martin.st>
  Date:   2022-08-12 (Fri, 12 Aug 2022)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/include/clang/Serialization/ASTReader.h
    M clang/lib/Frontend/FrontendAction.cpp
    M clang/lib/Serialization/ASTReader.cpp
    M clang/test/PCH/pch-dir.c

  Log Message:
  -----------
  [clang] Require strict matches for defines for PCH in GCC style directories

When clang includes a PCH, it tolerates some amount of differences
between the defines used when creating and when including the PCH
- this seems to be intentionally allowed in
c379c072405f39bca1d3552408fc0427328e8b6d (and later extended in
b63687519610a73dd565be1fec28332211b4df5b).

When using a PCH (or when picking a PCH out of a directory containing
multiple candidates) Clang used to accept the header if there were
defines on the command line when creating the PCH that are missing
when using the PCH, or vice versa, defines only set when using the
PCH.

The only cases where Clang explicitly rejected the use of a PCH
is if there was an explicit conflict between the options, e.g.
-DFOO=1 vs -DFOO=2, or -DFOO vs -UFOO.

The latter commit added a FIXME that we really should check whether
mismatched defines actually were used somewhere in the PCH, so that
the define would affect the outcome. This FIXME has stood unaddressed
since 2012.

This differs from GCC, which rejects PCH files if the defines differ
at all.

When explicitly including a single PCH file, the relaxed policy
of allowing minor differences is harmless for correct use cases
(but may fail to diagnose mismtaches), and potentially allow using
PCHs in wider cases (where the user intentionally know that the
differences in defines are harmless for the PCH).

However, for GCC style PCH directories, with a directory containing
multiple PCH variants and the compiler should pick the correct match
out of them, Clang's relaxed logic was problematic. The directory
could contain two otherwise identical PCHs, but one built with -DFOO
and one without. When attempting to include a PCH and iterating over
the candidates in the directory, Clang would essentially pick the
first one out of the two, even if there existed a better, exact
match in the directory.

Keep the relaxed checking when specificlly including one named
PCH file, but require strict matches when trying to pick the right
candidate out of a GCC style directory with alternatives.

This fixes https://github.com/lhmouse/mcfgthread/issues/63.

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

(cherry picked from commit c843c921a1a385bb805b2338d980436c94f83f19)


  Commit: d945a2c9efda8f0a2d8a03cf48d5b5dc4076769d
      https://github.com/llvm/llvm-project/commit/d945a2c9efda8f0a2d8a03cf48d5b5dc4076769d
  Author: Dinar Temirbulatov <dinar.temirbulatov at arm.com>
  Date:   2022-08-12 (Fri, 12 Aug 2022)

  Changed paths:
    M llvm/include/llvm/Analysis/TargetTransformInfo.h
    M llvm/include/llvm/Analysis/TargetTransformInfoImpl.h
    M llvm/lib/Analysis/TargetTransformInfo.cpp
    M llvm/lib/Target/AArch64/AArch64TargetTransformInfo.h
    M llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
    M llvm/test/Transforms/LoopVectorize/AArch64/sve-low-trip-count.ll

  Log Message:
  -----------
  [AArch64][LoopVectorize] Introduce trip count minimal value threshold to ignore tail-folding.

After D121595 was commited, I noticed regressions assosicated with small trip
count numbersvectorisation by tail folding with scalable vectors. As a solution
for those issues I propose to introduce the minimal trip count threshold value.

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

(cherry picked from commit cab6cd68340255be241b7cf169c67a1899ced115)


  Commit: 1fc6119ace14cd9baf00866f776cdd02d3af1308
      https://github.com/llvm/llvm-project/commit/1fc6119ace14cd9baf00866f776cdd02d3af1308
  Author: Aaron Ballman <aaron at aaronballman.com>
  Date:   2022-08-12 (Fri, 12 Aug 2022)

  Changed paths:
    M clang/lib/Sema/SemaDecl.cpp
    M clang/test/Sema/prototype-redecls.c

  Log Message:
  -----------
  Change prototype merging error into a warning for builtins

As was observed in https://reviews.llvm.org/D123627#3707635, it's
confusing that a user can write:
```
float rintf(void) {}
```
and get a warning, but writing:
```
float rintf() {}
```
gives an error. This patch changes the behavior so that both are
warnings, so that users who have functions which conflict with a
builtin identifier can still use that identifier as they wish.

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

(cherry picked from commit 4c02ab8c9742f6c32b17f49a306b3b072486f5c5)


  Commit: 062aab1979c8d664dd3607f3a0575dd7f3a306b2
      https://github.com/llvm/llvm-project/commit/062aab1979c8d664dd3607f3a0575dd7f3a306b2
  Author: Louis Dionne <ldionne.2 at gmail.com>
  Date:   2022-08-12 (Fri, 12 Aug 2022)

  Changed paths:
    M libcxx/include/module.modulemap.in

  Log Message:
  -----------
  [libc++] Add missing <stdbool.h> to the modulemap

It used to be defined by the compiler, but libc++ now provides it.

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

(cherry picked from commit 0a5c344a84a452452185f3a6bd7d7679a42abb42)


  Commit: c3edca9e58a44fecff2e76de9a12127633d8bc60
      https://github.com/llvm/llvm-project/commit/c3edca9e58a44fecff2e76de9a12127633d8bc60
  Author: Louis Dionne <ldionne.2 at gmail.com>
  Date:   2022-08-12 (Fri, 12 Aug 2022)

  Changed paths:
    M libcxx/test/support/test.support/test_proxy.pass.cpp

  Log Message:
  -----------
  [libc++][NFC] Fix signature of main in test

(cherry picked from commit 27442728cd2e28bfaf0f2d89ad6378b4377e9c66)


  Commit: f48896875e8210d0abe192e1060ee07cb5bfdc97
      https://github.com/llvm/llvm-project/commit/f48896875e8210d0abe192e1060ee07cb5bfdc97
  Author: Mark de Wever <koraq at xs4all.nl>
  Date:   2022-08-12 (Fri, 12 Aug 2022)

  Changed paths:
    M libcxx/docs/FeatureTestMacroTable.rst
    M libcxx/include/version
    M libcxx/test/std/language.support/support.limits/support.limits.general/algorithm.version.compile.pass.cpp
    M libcxx/test/std/language.support/support.limits/support.limits.general/functional.version.compile.pass.cpp
    M libcxx/test/std/language.support/support.limits/support.limits.general/iterator.version.compile.pass.cpp
    M libcxx/test/std/language.support/support.limits/support.limits.general/memory.version.compile.pass.cpp
    M libcxx/test/std/language.support/support.limits/support.limits.general/ranges.version.compile.pass.cpp
    M libcxx/test/std/language.support/support.limits/support.limits.general/version.version.compile.pass.cpp
    M libcxx/utils/generate_feature_test_macro_components.py

  Log Message:
  -----------
  [libc++][ranges] Sets ranges feature-test macro.

D131234 marked the ranges papers as complete, but it didn't set the
feature-test macro.

Reviewed By: ldionne, var-const, #libc

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

(cherry picked from commit 195287d90afb1b97a0fb869da501370e7c3e67c6)


  Commit: 23690efc2fb4d30269d0fc5e87137b58483d44a6
      https://github.com/llvm/llvm-project/commit/23690efc2fb4d30269d0fc5e87137b58483d44a6
  Author: Louis Dionne <ldionne.2 at gmail.com>
  Date:   2022-08-12 (Fri, 12 Aug 2022)

  Changed paths:
    M libcxx/include/__verbose_abort
    M libcxx/test/libcxx/assertions/customize_verbose_abort.backdeployment.pass.cpp
    M libcxx/test/libcxx/assertions/customize_verbose_abort.pass.cpp
    M libcxx/test/libcxx/assertions/debug_mode_compatibility.pass.cpp

  Log Message:
  -----------
  [libc++] Make __libcpp_verbose_abort [[noreturn]]

This will allow using it in functions that are [[noreturn]] themselves.

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

(cherry picked from commit f5738c51452f90d7f33963d1c0c6f8e7f3d801e3)


  Commit: a73632cff94bc8cc54fd22c00b8b3ee3dedf6d52
      https://github.com/llvm/llvm-project/commit/a73632cff94bc8cc54fd22c00b8b3ee3dedf6d52
  Author: Louis Dionne <ldionne.2 at gmail.com>
  Date:   2022-08-12 (Fri, 12 Aug 2022)

  Changed paths:
    M libcxx/include/__iterator/incrementable_traits.h
    M libcxx/include/__iterator/iterator_traits.h
    M libcxx/include/__memory/pointer_traits.h
    M libcxx/include/__ranges/size.h

  Log Message:
  -----------
  [libc++] Add missing includes of <cstddef>

(cherry picked from commit b1009bbd9e3d5acd85e92cb7f9a1109d2e72967c)


  Commit: 89863763f96d9ee0ea8121ddf78ef02c12274dcb
      https://github.com/llvm/llvm-project/commit/89863763f96d9ee0ea8121ddf78ef02c12274dcb
  Author: Martin Storsjö <martin at martin.st>
  Date:   2022-08-12 (Fri, 12 Aug 2022)

  Changed paths:
    R libcxx/test/libcxx/vendor/clang-cl/experimental-lib-exports.sh.cpp
    M libcxx/test/libcxx/vendor/clang-cl/static-lib-exports.sh.cpp
    R libcxx/test/libcxx/vendor/mingw/experimental-lib-exports.sh.cpp
    M libcxx/test/libcxx/vendor/mingw/static-lib-exports.sh.cpp

  Log Message:
  -----------
  [libcxx] [test] Merge the experimental-lib-exports testcases into static-lib-exports

Since bb939931a1adb9a47a2de13c359d6a72aeb277c8, the c++experimental
library is always built, so these tested files should always be built
(even if they aren't used in tests).

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

(cherry picked from commit b8717d19cfd49bfdbd462ea42cd94b94959e4feb)


  Commit: 871a78eeaedfa6a8e8616e017ff0626cb6d09b66
      https://github.com/llvm/llvm-project/commit/871a78eeaedfa6a8e8616e017ff0626cb6d09b66
  Author: Martin Storsjö <martin at martin.st>
  Date:   2022-08-12 (Fri, 12 Aug 2022)

  Changed paths:
    M lld/COFF/Driver.cpp
    M lld/COFF/MinGW.cpp
    M lld/COFF/MinGW.h
    M lld/COFF/Options.td
    M lld/MinGW/Driver.cpp
    M lld/MinGW/Options.td
    M lld/docs/ReleaseNotes.rst
    A lld/test/COFF/exclude-symbols.s
    M lld/test/MinGW/driver.test

  Log Message:
  -----------
  [LLD] [MinGW] Implement the --exclude-symbols option

This adds support for the existing GNU ld command line option, which
allows excluding individual symbols from autoexport (when linking a
DLL and no symbols are marked explicitly as dllexported).

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

(cherry picked from commit d1da6469f9ea9b078276ee2e098241f0440468be)


  Commit: 6ed14602c3d4b3c7e3de8eeae2a656ae9982e877
      https://github.com/llvm/llvm-project/commit/6ed14602c3d4b3c7e3de8eeae2a656ae9982e877
  Author: Fangrui Song <i at maskray.me>
  Date:   2022-08-12 (Fri, 12 Aug 2022)

  Changed paths:
    M lld/COFF/Driver.h

  Log Message:
  -----------
  [COFF] Change a llvm::StringSet<> to llvm::DenseSet<StringRef>. NFC

The former stores strings and is therefore more expensive.

(cherry picked from commit dfe2a3f3eb92b6a94453a74f3f0a4552f6965fcc)


  Commit: 3b0219ad84b8deb351f3b6978a2fa8029edb811d
      https://github.com/llvm/llvm-project/commit/3b0219ad84b8deb351f3b6978a2fa8029edb811d
  Author: Martin Storsjö <martin at martin.st>
  Date:   2022-08-12 (Fri, 12 Aug 2022)

  Changed paths:
    M lld/COFF/Driver.cpp
    M lld/COFF/Driver.h
    M lld/COFF/DriverUtils.cpp
    M lld/COFF/MinGW.cpp
    M lld/COFF/MinGW.h
    M lld/docs/ReleaseNotes.rst
    A lld/test/COFF/exclude-symbols-embedded.s

  Log Message:
  -----------
  [LLD] [COFF] Add support for a new, mingw specific embedded directive -exclude-symbols:

This is an entirely new embedded directive - extending the GNU ld
command line option --exclude-symbols to be usable in embedded
directives too.

(GNU ld.bfd also got support for the same new directive, currently in
the latest git version, after the 2.39 branch.)

This works as an inverse to the regular embedded dllexport directives,
for cases when autoexport of all eligible symbols is performed.

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

(cherry picked from commit 5d513ef6cf4646e64bbb1d5f8610afd530964588)


Compare: https://github.com/llvm/llvm-project/compare/0b12f7702411...3b0219ad84b8


More information about the All-commits mailing list