lldb.git
10 months agoRevert ""
Jan Kratochvil [Sun, 8 Nov 2020 20:34:45 +0000 (21:34 +0100)]
Revert ""

This reverts commit 82e523e2e256ac5715a26fd04e482ec2537df378.

10 months agoMerge branch 'fileattr-mainrename-addmainunit2-altlink-sharedstmt-dieref-dwz3-main2...
Jan Kratochvil [Sat, 7 Nov 2020 22:10:22 +0000 (23:10 +0100)]
Merge branch 'fileattr-mainrename-addmainunit2-altlink-sharedstmt-dieref-dwz3-main2-testdts' into fileattr-mainrename-addmainunit2-altlink-sharedstmt-dieref-dwz3-main2-testdts-testcategory

10 months agoMerge branch 'fileattr-mainrename-addmainunit2-altlink-sharedstmt-dieref-dwz3-main2...
Jan Kratochvil [Sat, 7 Nov 2020 22:10:22 +0000 (23:10 +0100)]
Merge branch 'fileattr-mainrename-addmainunit2-altlink-sharedstmt-dieref-dwz3-main2' into fileattr-mainrename-addmainunit2-altlink-sharedstmt-dieref-dwz3-main2-testdts

10 months agoMerge branch 'fileattr-mainrename-addmainunit2-altlink-sharedstmt-dieref-dwz3' into...
Jan Kratochvil [Sat, 7 Nov 2020 22:10:21 +0000 (23:10 +0100)]
Merge branch 'fileattr-mainrename-addmainunit2-altlink-sharedstmt-dieref-dwz3' into fileattr-mainrename-addmainunit2-altlink-sharedstmt-dieref-dwz3-main2

10 months agoMerge branch 'fileattr-mainrename-addmainunit2-altlink-sharedstmt-dieref' into fileat...
Jan Kratochvil [Sat, 7 Nov 2020 22:10:20 +0000 (23:10 +0100)]
Merge branch 'fileattr-mainrename-addmainunit2-altlink-sharedstmt-dieref' into fileattr-mainrename-addmainunit2-altlink-sharedstmt-dieref-dwz3

10 months agoMerge branch 'fileattr-mainrename-addmainunit2-altlink-sharedstmt' into fileattr...
Jan Kratochvil [Sat, 7 Nov 2020 22:10:20 +0000 (23:10 +0100)]
Merge branch 'fileattr-mainrename-addmainunit2-altlink-sharedstmt' into fileattr-mainrename-addmainunit2-altlink-sharedstmt-dieref

10 months agoMerge branch 'fileattr-mainrename-addmainunit2-altlink' into fileattr-mainrename...
Jan Kratochvil [Sat, 7 Nov 2020 22:10:19 +0000 (23:10 +0100)]
Merge branch 'fileattr-mainrename-addmainunit2-altlink' into fileattr-mainrename-addmainunit2-altlink-sharedstmt

10 months agoMerge branch 'fileattr-mainrename-addmainunit2' into fileattr-mainrename-addmainunit2...
Jan Kratochvil [Sat, 7 Nov 2020 22:10:18 +0000 (23:10 +0100)]
Merge branch 'fileattr-mainrename-addmainunit2' into fileattr-mainrename-addmainunit2-altlink

10 months agoMerge branch 'fileattr-mainrename' into fileattr-mainrename-addmainunit2
Jan Kratochvil [Sat, 7 Nov 2020 22:10:18 +0000 (23:10 +0100)]
Merge branch 'fileattr-mainrename' into fileattr-mainrename-addmainunit2

10 months agoMerge branch 'fileattr' into fileattr-mainrename
Jan Kratochvil [Sat, 7 Nov 2020 22:10:17 +0000 (23:10 +0100)]
Merge branch 'fileattr' into fileattr-mainrename

10 months agoMerge remote-tracking branch 'origin/master' into fileattr
Jan Kratochvil [Sat, 7 Nov 2020 22:10:16 +0000 (23:10 +0100)]
Merge remote-tracking branch 'origin/master' into fileattr

10 months agoMerge branch 'fileattr-mainrename-addmainunit2-altlink-sharedstmt-dieref-dwz3-main2...
Jan Kratochvil [Sat, 7 Nov 2020 22:06:33 +0000 (23:06 +0100)]
Merge branch 'fileattr-mainrename-addmainunit2-altlink-sharedstmt-dieref-dwz3-main2-testdts' into fileattr-mainrename-addmainunit2-altlink-sharedstmt-dieref-dwz3-main2-testdts-testcategory

10 months agoMerge branch 'fileattr-mainrename-addmainunit2-altlink-sharedstmt-dieref-dwz3-main2...
Jan Kratochvil [Sat, 7 Nov 2020 22:06:32 +0000 (23:06 +0100)]
Merge branch 'fileattr-mainrename-addmainunit2-altlink-sharedstmt-dieref-dwz3-main2' into fileattr-mainrename-addmainunit2-altlink-sharedstmt-dieref-dwz3-main2-testdts

10 months agoMerge branch 'fileattr-mainrename-addmainunit2-altlink-sharedstmt-dieref-dwz3' into...
Jan Kratochvil [Sat, 7 Nov 2020 22:06:28 +0000 (23:06 +0100)]
Merge branch 'fileattr-mainrename-addmainunit2-altlink-sharedstmt-dieref-dwz3' into fileattr-mainrename-addmainunit2-altlink-sharedstmt-dieref-dwz3-main2

10 months agoMerge branch 'fileattr-mainrename-addmainunit2-altlink-sharedstmt-dieref' into fileat...
Jan Kratochvil [Sat, 7 Nov 2020 22:06:02 +0000 (23:06 +0100)]
Merge branch 'fileattr-mainrename-addmainunit2-altlink-sharedstmt-dieref' into fileattr-mainrename-addmainunit2-altlink-sharedstmt-dieref-dwz3

10 months agoMerge branch 'fileattr-mainrename-addmainunit2-altlink-sharedstmt' into fileattr...
Jan Kratochvil [Sat, 7 Nov 2020 22:06:01 +0000 (23:06 +0100)]
Merge branch 'fileattr-mainrename-addmainunit2-altlink-sharedstmt' into fileattr-mainrename-addmainunit2-altlink-sharedstmt-dieref

10 months agoMerge branch 'fileattr-mainrename-addmainunit2-altlink' into fileattr-mainrename...
Jan Kratochvil [Sat, 7 Nov 2020 22:06:01 +0000 (23:06 +0100)]
Merge branch 'fileattr-mainrename-addmainunit2-altlink' into fileattr-mainrename-addmainunit2-altlink-sharedstmt

10 months agoMerge branch 'fileattr-mainrename-addmainunit2' into fileattr-mainrename-addmainunit2...
Jan Kratochvil [Sat, 7 Nov 2020 22:06:00 +0000 (23:06 +0100)]
Merge branch 'fileattr-mainrename-addmainunit2' into fileattr-mainrename-addmainunit2-altlink

10 months ago(no commit message)
Jan Kratochvil [Sat, 7 Nov 2020 22:05:53 +0000 (23:05 +0100)]

10 months agoMerge branch 'fileattr-mainrename-addmainunit2-altlink-sharedstmt-dieref-dwz3-main2...
Jan Kratochvil [Sat, 7 Nov 2020 21:58:10 +0000 (22:58 +0100)]
Merge branch 'fileattr-mainrename-addmainunit2-altlink-sharedstmt-dieref-dwz3-main2-testdts' into fileattr-mainrename-addmainunit2-altlink-sharedstmt-dieref-dwz3-main2-testdts-testcategory

10 months agoMerge branch 'fileattr-mainrename-addmainunit2-altlink-sharedstmt-dieref-dwz3-main2...
Jan Kratochvil [Sat, 7 Nov 2020 21:58:10 +0000 (22:58 +0100)]
Merge branch 'fileattr-mainrename-addmainunit2-altlink-sharedstmt-dieref-dwz3-main2' into fileattr-mainrename-addmainunit2-altlink-sharedstmt-dieref-dwz3-main2-testdts

10 months agoMerge branch 'fileattr-mainrename-addmainunit2-altlink-sharedstmt-dieref-dwz3' into...
Jan Kratochvil [Sat, 7 Nov 2020 21:58:09 +0000 (22:58 +0100)]
Merge branch 'fileattr-mainrename-addmainunit2-altlink-sharedstmt-dieref-dwz3' into fileattr-mainrename-addmainunit2-altlink-sharedstmt-dieref-dwz3-main2

10 months agoMerge branch 'fileattr-mainrename-addmainunit2-altlink-sharedstmt-dieref' into fileat...
Jan Kratochvil [Sat, 7 Nov 2020 21:58:08 +0000 (22:58 +0100)]
Merge branch 'fileattr-mainrename-addmainunit2-altlink-sharedstmt-dieref' into fileattr-mainrename-addmainunit2-altlink-sharedstmt-dieref-dwz3

10 months agoMerge branch 'fileattr-mainrename-addmainunit2-altlink-sharedstmt' into fileattr...
Jan Kratochvil [Sat, 7 Nov 2020 21:58:08 +0000 (22:58 +0100)]
Merge branch 'fileattr-mainrename-addmainunit2-altlink-sharedstmt' into fileattr-mainrename-addmainunit2-altlink-sharedstmt-dieref

10 months agoMerge branch 'mainrename-addmainunit2-debug-scoped-altlink-sharedstmt' into fileattr...
Jan Kratochvil [Sat, 7 Nov 2020 21:57:15 +0000 (22:57 +0100)]
Merge branch 'mainrename-addmainunit2-debug-scoped-altlink-sharedstmt' into fileattr-mainrename-addmainunit2-altlink-sharedstmt

10 months ago(no commit message)
Jan Kratochvil [Sat, 7 Nov 2020 21:56:22 +0000 (22:56 +0100)]

10 months agoMerge branch 'mainrename-addmainunit2-debug-scoped-altlink' into fileattr-mainrename...
Jan Kratochvil [Sat, 7 Nov 2020 21:56:02 +0000 (22:56 +0100)]
Merge branch 'mainrename-addmainunit2-debug-scoped-altlink' into fileattr-mainrename-addmainunit2-altlink

10 months agoMerge branch 'mainrename-addmainunit2' into fileattr-mainrename-addmainunit2
Jan Kratochvil [Sat, 7 Nov 2020 21:53:55 +0000 (22:53 +0100)]
Merge branch 'mainrename-addmainunit2' into fileattr-mainrename-addmainunit2

10 months agoMerge branch 'mainrename' into fileattr-mainrename
Jan Kratochvil [Sat, 7 Nov 2020 21:53:43 +0000 (22:53 +0100)]
Merge branch 'mainrename' into fileattr-mainrename

10 months ago(no commit message)
Jan Kratochvil [Sat, 7 Nov 2020 21:29:36 +0000 (22:29 +0100)]

10 months ago(no commit message)
Jan Kratochvil [Sat, 7 Nov 2020 21:29:01 +0000 (22:29 +0100)]

10 months ago[docs] Adding a Support Policy
Renato Golin [Wed, 4 Nov 2020 13:15:59 +0000 (13:15 +0000)]
[docs] Adding a Support Policy

As discussed in the mailing list [1-4], we need a separation of support
tiers when requiring support from the whole community versus a
sub-community. Essentially, if a sub-community is active enough and
takes maintenance into their own internal costs without affecting other
parts of the community's maintenance costs, then code that is not
immediately relevant to all parts (ie. not released, actively tested,
etc) can still find its way into the LLVM main repository without major
pain points.

The main benefit is to reduce the maintenance cost that those
sub-communities have outside of LLVM (for example, in duplicating common
code, applying the same patches on top of multiple user repositories or
downstream projects).

This document outlines the components and responsibilities of the
sub-communities with regards to maintenance costs and how they affect
the rest of the community.

It also adds an addendum on removal policies, which expand the existing
"new target removal" policy into something more generic, to encompass
any piece of code, scripts or documents in the repository.

[1] http://lists.llvm.org/pipermail/llvm-dev/2020-October/146249.html
[2] http://lists.llvm.org/pipermail/llvm-dev/2020-November/146335.html
[3] http://lists.llvm.org/pipermail/llvm-dev/2020-October/146138.html
[4] http://lists.llvm.org/pipermail/llvm-dev/2020-November/146298.html

10 months ago[RISCV] Use (not X) in instead of (xor X, -1) in isel patterns to improve readability...
Craig Topper [Sat, 7 Nov 2020 19:50:52 +0000 (11:50 -0800)]
[RISCV] Use (not X) in instead of (xor X, -1) in isel patterns to improve readability. NFC

10 months ago[gn build] Port d725f1ce531
LLVM GN Syncbot [Sat, 7 Nov 2020 19:18:18 +0000 (19:18 +0000)]
[gn build] Port d725f1ce531

10 months ago[clang-tidy] Use vfs::FileSystem when getting config
Nathan James [Sat, 7 Nov 2020 19:18:01 +0000 (19:18 +0000)]
[clang-tidy] Use vfs::FileSystem when getting config

The config providers that look for configuration files currently take a pointer to a FileSystem in the constructor.
For some reason this isn't actually used when trying to read those configuration files, Essentially it just follows the behaviour of the real filesystem.
Using clang-tidy standalone this doesn't cause any issue.
But if its used as a library and the user wishes to use say an `InMemoryFileSystem` it will try to read the files from the disc instead.

Reviewed By: aaron.ballman

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

10 months agoAdd missing dependency to TOSA library: fix build with -DBUILD_SHARED_LIBS=ON
Mehdi Amini [Sat, 7 Nov 2020 18:57:50 +0000 (18:57 +0000)]
Add missing dependency to TOSA library: fix build with -DBUILD_SHARED_LIBS=ON

10 months agoRefactor TOSA Dialect CMake to use add_mlir_dialect/add_mlir_interface (NFC)
Mehdi Amini [Sat, 7 Nov 2020 18:49:52 +0000 (18:49 +0000)]
Refactor TOSA Dialect CMake to use add_mlir_dialect/add_mlir_interface (NFC)

10 months ago[DWARFLinker] Convert analyzeContextInfo to a work list (NFC)
Jonas Devlieghere [Sat, 7 Nov 2020 18:45:17 +0000 (10:45 -0800)]
[DWARFLinker] Convert analyzeContextInfo to a work list (NFC)

Convert analyzeContextInfo to a work list using the same approach I used
to remove the recursion from lookForDIEsToKeep. This fixes the crash
reported in https://llvm.org/PR48029.

Tested using the reproducer attached to PR48029 as well as by comparing
the clang MD5 hashes before and after the change (with and without
gmodules).

Differential revision: https://reviews.llvm.org/D90873

10 months ago[lldb] [test] Use skipUnlessDarwin for tests specific to Darwin
Michał Górny [Sat, 7 Nov 2020 16:12:57 +0000 (17:12 +0100)]
[lldb] [test] Use skipUnlessDarwin for tests specific to Darwin

Use skipUnlessDarwin decorator for tests that are specific to Darwin,
instead of skipIf... for all other platforms.  This should make it clear
that these tests are not supposed to work elsewhere.  It will also make
these tests stop repeatedly popping up while I look for tests that could
be fixed on the platform in question.

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

10 months ago[lldb] [test] Un-skip one of TestRaise signals on fbsd
Michał Górny [Sat, 7 Nov 2020 17:24:32 +0000 (18:24 +0100)]
[lldb] [test] Un-skip one of TestRaise signals on fbsd

10 months agoNFC: (re-apply) Fix some post-review nits for the Tosa dialect.
Stella Laurenzo [Sat, 7 Nov 2020 17:37:18 +0000 (09:37 -0800)]
NFC: (re-apply) Fix some post-review nits for the Tosa dialect.

This reverts commit 330398052d049f90e6cfac80ab8b765b158a3e61.

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

10 months ago[BasicAA] Unify struct/other offset (NFC)
Nikita Popov [Sat, 7 Nov 2020 17:29:47 +0000 (18:29 +0100)]
[BasicAA] Unify struct/other offset (NFC)

The distinction between StructOffset and OtherOffset has been
originally introduced by 82069c44ca39df9d506e16bfb0ca2481866dd0bb,
which applied different reasoning to both offset kinds. However,
this distinction was not actually correct, and has been fixed by
c84e77aeaefccb8d0c4c508b8017dcad80607f53. Since then, we only ever
consider the sum StructOffset + OtherOffset, so we may as well
store it in that form directly.

10 months agoRevert "NFC: Fix some post-review nits for the Tosa dialect."
Stella Laurenzo [Sat, 7 Nov 2020 17:35:49 +0000 (09:35 -0800)]
Revert "NFC: Fix some post-review nits for the Tosa dialect."

* Introduced issue in debug builds.

This reverts commit b5fcd06105dec2a7b0e4114d6ad4524fc54498c5.

10 months ago[BasicAA] Use smul_ov helper (NFCI)
Nikita Popov [Sat, 7 Nov 2020 16:48:41 +0000 (17:48 +0100)]
[BasicAA] Use smul_ov helper (NFCI)

Instead of performing the multiplication in double the bit width
and using active bits to determine overflow, use the existing
smul_ov() APInt method to detect overflow.

The smul_ov() implementation is not particularly efficient, but
it's still better than doing this a wide, usually 128-bit, type.

10 months ago[mlir][Python] Adapt to include property change in pybind11 v2.6.
Stella Laurenzo [Sat, 7 Nov 2020 17:05:51 +0000 (09:05 -0800)]
[mlir][Python] Adapt to include property change in pybind11 v2.6.

Reviewed By: mehdi_amini

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

10 months agoNFC: Fix some post-review nits for the Tosa dialect.
Stella Laurenzo [Sat, 7 Nov 2020 16:54:31 +0000 (08:54 -0800)]
NFC: Fix some post-review nits for the Tosa dialect.

* Moved various loose functions to either the mlir::tosa namespace or made static
* Fixed an unused variable warning in TosaMakeBroadcastable.cpp.

10 months agoTOSA MLIR Dialect
Suraj Sudhir [Sat, 7 Nov 2020 16:35:27 +0000 (08:35 -0800)]
TOSA MLIR Dialect

This is the TOSA MLIR Dialect described in the following MLIR RFC: https://llvm.discourse.group/t/rfc-tosa-dialect-in-mlir/1971/24

Reviewed By: stellaraccident

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

10 months ago[clang] Fix length threshold for MicrosoftMangle md5 hash
Melanie Blower [Sat, 7 Nov 2020 15:40:24 +0000 (07:40 -0800)]
[clang] Fix length threshold for MicrosoftMangle md5 hash

Reviewers: rnk, dblaikie

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

10 months ago[clang] Improve Microsoft mangling lit test with dblaikie's suggestions
Melanie Blower [Sat, 7 Nov 2020 15:32:34 +0000 (07:32 -0800)]
[clang] Improve Microsoft mangling lit test with dblaikie's suggestions

10 months agoMerge branch 'mainrename-addmainunit2-debug-scoped-altlink-sharedstmt-dieref-dwz3...
Jan Kratochvil [Sat, 7 Nov 2020 15:18:52 +0000 (16:18 +0100)]
Merge branch 'mainrename-addmainunit2-debug-scoped-altlink-sharedstmt-dieref-dwz3-main2-testdts' into mainrename-addmainunit2-debug-scoped-altlink-sharedstmt-dieref-dwz3-main2-testdts-testcategory

10 months agoMerge branch 'mainrename-addmainunit2-debug-scoped-altlink-sharedstmt-dieref-dwz3...
Jan Kratochvil [Sat, 7 Nov 2020 15:18:51 +0000 (16:18 +0100)]
Merge branch 'mainrename-addmainunit2-debug-scoped-altlink-sharedstmt-dieref-dwz3-main2' into mainrename-addmainunit2-debug-scoped-altlink-sharedstmt-dieref-dwz3-main2-testdts

10 months agoMerge branch 'mainrename-addmainunit2-debug-scoped-altlink-sharedstmt-dieref-dwz3...
Jan Kratochvil [Sat, 7 Nov 2020 15:18:51 +0000 (16:18 +0100)]
Merge branch 'mainrename-addmainunit2-debug-scoped-altlink-sharedstmt-dieref-dwz3' into mainrename-addmainunit2-debug-scoped-altlink-sharedstmt-dieref-dwz3-main2

10 months agoMerge branch 'mainrename-addmainunit2-debug-scoped-altlink-sharedstmt-dieref' into...
Jan Kratochvil [Sat, 7 Nov 2020 15:18:50 +0000 (16:18 +0100)]
Merge branch 'mainrename-addmainunit2-debug-scoped-altlink-sharedstmt-dieref' into mainrename-addmainunit2-debug-scoped-altlink-sharedstmt-dieref-dwz3

10 months agoMerge branch 'mainrename-addmainunit2-debug-scoped-altlink-sharedstmt' into mainrenam...
Jan Kratochvil [Sat, 7 Nov 2020 15:18:49 +0000 (16:18 +0100)]
Merge branch 'mainrename-addmainunit2-debug-scoped-altlink-sharedstmt' into mainrename-addmainunit2-debug-scoped-altlink-sharedstmt-dieref

10 months agoMerge branch 'mainrename-addmainunit2-debug-scoped-altlink' into mainrename-addmainun...
Jan Kratochvil [Sat, 7 Nov 2020 15:18:49 +0000 (16:18 +0100)]
Merge branch 'mainrename-addmainunit2-debug-scoped-altlink' into mainrename-addmainunit2-debug-scoped-altlink-sharedstmt

10 months agoMerge branch 'mainrename-addmainunit2-debug-scoped' into mainrename-addmainunit2...
Jan Kratochvil [Sat, 7 Nov 2020 15:18:49 +0000 (16:18 +0100)]
Merge branch 'mainrename-addmainunit2-debug-scoped' into mainrename-addmainunit2-debug-scoped-altlink

10 months agoMerge branch 'mainrename-addmainunit2-debug' into mainrename-addmainunit2-debug-scoped
Jan Kratochvil [Sat, 7 Nov 2020 15:18:48 +0000 (16:18 +0100)]
Merge branch 'mainrename-addmainunit2-debug' into mainrename-addmainunit2-debug-scoped

10 months agoRevert ""
Jan Kratochvil [Sat, 7 Nov 2020 15:18:43 +0000 (16:18 +0100)]
Revert ""

This reverts commit 86e1c406e35852cc600e940f54bfb2ccd525abec.

10 months agoMerge branch 'mainrename-addmainunit2-debug-scoped-altlink-sharedstmt-dieref-dwz3...
Jan Kratochvil [Sat, 7 Nov 2020 15:14:13 +0000 (16:14 +0100)]
Merge branch 'mainrename-addmainunit2-debug-scoped-altlink-sharedstmt-dieref-dwz3-main2-testdts' into mainrename-addmainunit2-debug-scoped-altlink-sharedstmt-dieref-dwz3-main2-testdts-testcategory

10 months agoMerge branch 'mainrename-addmainunit2-debug-scoped-altlink-sharedstmt-dieref-dwz3...
Jan Kratochvil [Sat, 7 Nov 2020 15:14:13 +0000 (16:14 +0100)]
Merge branch 'mainrename-addmainunit2-debug-scoped-altlink-sharedstmt-dieref-dwz3-main2' into mainrename-addmainunit2-debug-scoped-altlink-sharedstmt-dieref-dwz3-main2-testdts

10 months agoMerge branch 'mainrename-addmainunit2-debug-scoped-altlink-sharedstmt-dieref-dwz3...
Jan Kratochvil [Sat, 7 Nov 2020 15:14:12 +0000 (16:14 +0100)]
Merge branch 'mainrename-addmainunit2-debug-scoped-altlink-sharedstmt-dieref-dwz3' into mainrename-addmainunit2-debug-scoped-altlink-sharedstmt-dieref-dwz3-main2

10 months agoMerge branch 'mainrename-addmainunit2-debug-scoped-altlink-sharedstmt-dieref' into...
Jan Kratochvil [Sat, 7 Nov 2020 15:14:11 +0000 (16:14 +0100)]
Merge branch 'mainrename-addmainunit2-debug-scoped-altlink-sharedstmt-dieref' into mainrename-addmainunit2-debug-scoped-altlink-sharedstmt-dieref-dwz3

10 months agoMerge branch 'mainrename-addmainunit2-debug-scoped-altlink-sharedstmt' into mainrenam...
Jan Kratochvil [Sat, 7 Nov 2020 15:14:11 +0000 (16:14 +0100)]
Merge branch 'mainrename-addmainunit2-debug-scoped-altlink-sharedstmt' into mainrename-addmainunit2-debug-scoped-altlink-sharedstmt-dieref

10 months agoMerge branch 'mainrename-addmainunit2-debug-scoped-altlink' into mainrename-addmainun...
Jan Kratochvil [Sat, 7 Nov 2020 15:14:10 +0000 (16:14 +0100)]
Merge branch 'mainrename-addmainunit2-debug-scoped-altlink' into mainrename-addmainunit2-debug-scoped-altlink-sharedstmt

10 months agoMerge branch 'mainrename-addmainunit2-debug-scoped' into mainrename-addmainunit2...
Jan Kratochvil [Sat, 7 Nov 2020 15:14:10 +0000 (16:14 +0100)]
Merge branch 'mainrename-addmainunit2-debug-scoped' into mainrename-addmainunit2-debug-scoped-altlink

10 months agoMerge branch 'mainrename-addmainunit2-debug' into mainrename-addmainunit2-debug-scoped
Jan Kratochvil [Sat, 7 Nov 2020 15:14:09 +0000 (16:14 +0100)]
Merge branch 'mainrename-addmainunit2-debug' into mainrename-addmainunit2-debug-scoped

10 months ago(no commit message)
Jan Kratochvil [Sat, 7 Nov 2020 15:14:06 +0000 (16:14 +0100)]

10 months ago(no commit message)
Jan Kratochvil [Sat, 7 Nov 2020 15:12:44 +0000 (16:12 +0100)]

10 months ago[CaptureTracking] Add statistics (NFC)
Nikita Popov [Sat, 7 Nov 2020 11:25:55 +0000 (12:25 +0100)]
[CaptureTracking] Add statistics (NFC)

Add basic statistics on the number of pointers that have been
determined to maybe capture / not capture.

10 months ago[CaptureTracking] Early abort on too many uses (NFCI)
Nikita Popov [Sat, 7 Nov 2020 10:47:31 +0000 (11:47 +0100)]
[CaptureTracking] Early abort on too many uses (NFCI)

If there are too many uses, we should directly return -- there's
no point in inspecting the remaining uses in the worklist, as we
have to conservatively assume a capture anyway. This also means
that tooManyUses() gets called exactly once, rather than
potentially many times.

This restores the behavior prior to e9832dfdf366ddffba68164adb6855d17c9f87c1,
where this was accidentally changed while moving the AddUses logic
into a closure, thus making the return a return from the closure
rather than the whole function.

10 months ago[CaptureTrackingTest] Add missing override marker (NFC)
Nikita Popov [Sat, 7 Nov 2020 10:44:02 +0000 (11:44 +0100)]
[CaptureTrackingTest] Add missing override marker (NFC)

10 months ago[CaptureTracking] Correctly handle multiple uses in one instruction
Nikita Popov [Sat, 7 Nov 2020 10:19:27 +0000 (11:19 +0100)]
[CaptureTracking] Correctly handle multiple uses in one instruction

If the same value is used multiple times in the same instruction,
CaptureTracking may end up reporting the wrong use as being captured,
and/or report the same use as being captured multiple times.

Make sure that all checks take the use operand number into account,
rather than performing unreliable comparisons against the used value.

I'm not sure whether this can cause any problems in practice, but
at least some capture trackers (ArgUsesTracker, AACaptureUseTracker)
do care about which call argument is captured.

10 months ago[MLIR][SPIRVToLLVM] Added module name conversion
George Mitenkov [Sat, 7 Nov 2020 09:27:03 +0000 (12:27 +0300)]
[MLIR][SPIRVToLLVM] Added module name conversion

Since SPIR-V module has an optional name, this patch
makes a change to pass it to `ModuleOp` during conversion.

Reviewed By: ftynse

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

10 months ago[CaptureTracking] Avoid duplicate shouldExplode() check (NFCI)
Nikita Popov [Sat, 7 Nov 2020 09:13:49 +0000 (10:13 +0100)]
[CaptureTracking] Avoid duplicate shouldExplode() check (NFCI)

We check shouldExplore() before adding uses to the worklist, so
uses that should not be explored will not reach captured() in the
first place.

10 months ago[DWARFLinker] Use union to reduce sizeof(WorklistItem) (NFC)
Jonas Devlieghere [Sat, 7 Nov 2020 07:22:29 +0000 (23:22 -0800)]
[DWARFLinker] Use union to reduce sizeof(WorklistItem) (NFC)

Reduce the size of the WorklistItem struct by using a struct.

10 months ago[BranchProbabilityInfo] Simplify getEdgeProbability (NFC)
Kazu Hirata [Sat, 7 Nov 2020 06:47:22 +0000 (22:47 -0800)]
[BranchProbabilityInfo] Simplify getEdgeProbability (NFC)

The patch simplifies BranchProbabilityInfo::getEdgeProbability by
handling two cases separately, depending on whether we have edge
probabilities.

- If we have edge probabilities, then add up probabilities for
  successors being equal to Dst.

- Otherwise, return the number of ocurrences divided by the total
  number of successors.

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

10 months ago[test] Fix Other/new-pass-manager.ll with has different behaviors whether or not...
Fangrui Song [Sat, 7 Nov 2020 06:19:37 +0000 (22:19 -0800)]
[test] Fix Other/new-pass-manager.ll with has different behaviors whether or not Polly is enabled

after D89158

10 months ago[test] Fix Other/new-pass-manager.ll & clang/test/Misc/loop-opt-setup.c
Fangrui Song [Sat, 7 Nov 2020 05:55:10 +0000 (21:55 -0800)]
[test] Fix Other/new-pass-manager.ll & clang/test/Misc/loop-opt-setup.c

10 months agoRevert "[LoopDeletion] Allows deletion of possibly infinite side-effect free loops"
Atmn Patel [Sat, 7 Nov 2020 05:31:35 +0000 (00:31 -0500)]
Revert "[LoopDeletion] Allows deletion of possibly infinite side-effect free loops"

This reverts commit 0b17c6e4479d62bd4ff05c48d6cdf340b198832f. This patch
causes a compile-time error in SCEV.

10 months agoRevert "[CodeGen] Fixes sanitizer test"
Atmn Patel [Sat, 7 Nov 2020 05:29:42 +0000 (00:29 -0500)]
Revert "[CodeGen] Fixes sanitizer test"

This reverts commit b1878b4641e06baa754ce6e3e0387b1e7d7dc143. This does
fix the test but it means that ac73b73c1652 is not implemented
correctly. Reverting for now, and will be reverting the commit that
causes this to fail.

10 months agoAsmPrinter/Dwarf*: Use llvm::Register instead of unsigned
Fangrui Song [Sat, 7 Nov 2020 05:00:28 +0000 (21:00 -0800)]
AsmPrinter/Dwarf*: Use llvm::Register instead of unsigned

10 months ago[CodeGen] Fixes sanitizer test
Atmn Patel [Sat, 7 Nov 2020 04:50:55 +0000 (23:50 -0500)]
[CodeGen] Fixes sanitizer test

By turning the loop into an infinite one, the loop can't be deleted
anymore so the test will continue to pass.

10 months ago[OpenMP] Fix -Wmisleading-indentation after D84192
Fangrui Song [Sat, 7 Nov 2020 04:09:43 +0000 (20:09 -0800)]
[OpenMP] Fix -Wmisleading-indentation after D84192

10 months ago[AsmPrinter] Rename ByteStreamer::EmitInt8 to emitInt8
Fangrui Song [Sat, 7 Nov 2020 04:02:56 +0000 (20:02 -0800)]
[AsmPrinter] Rename ByteStreamer::EmitInt8 to emitInt8

to be consistent with other emit*

10 months ago[LoopDeletion] Fixes failing test
Atmn Patel [Sat, 7 Nov 2020 03:36:47 +0000 (22:36 -0500)]
[LoopDeletion] Fixes failing test

The commit 0b17c6e4479d62bd4ff05c48d6cdf340b198832f occasionally causes this test to
fail, this fixes it.

10 months ago[DWARFLinker] Add CompileUnit::getInfo helper that takes a DWARFDie (NFC)
Jonas Devlieghere [Sat, 7 Nov 2020 03:35:06 +0000 (19:35 -0800)]
[DWARFLinker] Add CompileUnit::getInfo helper that takes a DWARFDie (NFC)

Eliminate the need to go through the DIE index by passing the DIE to
CompileUnit::getInfo directly.

Before:

  unsigned Idx = Unit->getOrigUnit().getDIEIndex(Die);
  CompileUnit::DIEInfo &Info = Unit->getInfo(Idx);

After:

  CompileUnit::DIEInfo &Info = Unit->getInfo(Die);

10 months ago[LoopDeletion] Allows deletion of possibly infinite side-effect free loops
Atmn Patel [Sun, 25 Oct 2020 22:24:48 +0000 (18:24 -0400)]
[LoopDeletion] Allows deletion of possibly infinite side-effect free loops

From C11 and C++11 onwards, a forward-progress requirement has been
introduced for both languages. In the case of C, loops with non-constant
conditionals that do not have any observable side-effects (as defined by
6.8.5p6) can be assumed by the implementation to terminate, and in the
case of C++, this assumption extends to all functions. The clang
frontend will emit the `mustprogress` function attribute for C++
functions (D86233, D85393, D86841) and emit the loop metadata
`llvm.loop.mustprogress` for every loop in C11 or later that has a
non-constant conditional.

This patch modifies LoopDeletion so that only loops with
the `llvm.loop.mustprogress` metadata or loops contained in functions
that are required to make progress (`mustprogress` or `willreturn`) are
checked for observable side-effects. If these loops do not have an
observable side-effect, then we delete them.

Loops without observable side-effects that do not satisfy the above
conditions will not be deleted.

Reviewed By: jdoerfert

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

10 months ago[OpenMP5.0] map item can be non-contiguous for target update
cchen [Sat, 7 Nov 2020 03:03:55 +0000 (21:03 -0600)]
[OpenMP5.0] map item can be non-contiguous for target update

In order not to modify the `tgt_target_data_update` information but still be
able to pass the extra information for non-contiguous map item (offset,
count, and stride for each dimension), this patch overload `arg` when
the maptype is set as `OMP_MAP_DESCRIPTOR`. The origin `arg` is for
passing the pointer information, however, the overloaded `arg` is an
array of descriptor_dim:

struct descriptor_dim {
  int64_t offset;
  int64_t count;
  int64_t stride
};

and the array size is the same as dimension size. In addition, since we
have count and stride information in descriptor_dim, we can replace/overload the
`arg_size` parameter by using dimension size.

For supporting `stride` in array section, we use a dummy dimension in
descriptor to store the unit size. The formula for counting the stride
in dimension D_n: `unit size * (D_0 * D_1 ... * D_n-1) * D_n.stride`.

Demonstrate how it works:
```
double arr[3][4][5];

D0: { offset = 0, count = 1, stride = 8 }                                // offset, count, dimension size always be 0, 1, 1 for this extra dimension, stride is the unit size
D1: { offset = 0, count = 2, stride = 8 * 1 * 2 = 16 }                   // stride = unit size * (product of dimension size of D0) * D1.stride = 4 * 1 * 2 = 8
D2: { offset = 2, count = 2, stride = 8 * (1 * 5) * 1 = 40  }            // stride = unit size * (product of dimension size of D0, D1) * D2.stride = 4 * 5 * 1 = 20
D3: { offset = 0, count = 2, stride = 8 * (1 * 5 * 4) * 2 = 320 }        // stride = unit size * (product of dimension size of D0, D1, D2) * D3.stride = 4 * 25 * 2 = 200

// X here means we need to offload this data, therefore, runtime will transfer
// data from offset 80, 96, 120, 136, 400, 416, 440, 456
// Runtime patch: https://reviews.llvm.org/D82245
// OOOOO OOOOO OOOOO
// OOOOO OOOOO OOOOO
// XOXOO OOOOO XOXOO
// XOXOO OOOOO XOXOO
```

Reviewed By: ABataev

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

10 months ago[libomptarget] Add support for target update non-contiguous
cchen [Sat, 7 Nov 2020 02:54:49 +0000 (20:54 -0600)]
[libomptarget] Add support for target update non-contiguous

This patch is the runtime support for https://reviews.llvm.org/D84192.

In order not to modify the tgt_target_data_update information but still be
able to pass the extra information for non-contiguous map item (offset,
count, and stride for each dimension), this patch overload arg when
the maptype is set as OMP_TGT_MAPTYPE_DESCRIPTOR. The origin arg is for
passing the pointer information, however, the overloaded arg is an
array of descriptor_dim:

```
struct descriptor_dim {
  int64_t offset;
  int64_t count;
  int64_t stride
};
```

and the array size is the dimension size. In addition, since we
have count and stride information in descriptor_dim, we can replace/overload the
arg_size parameter by using dimension size.

Reviewed By: grokos

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

10 months agoDon't link any LLVM/MLIR library to the C API unit-test
Mehdi Amini [Sat, 7 Nov 2020 01:34:43 +0000 (01:34 +0000)]
Don't link any LLVM/MLIR library to the C API unit-test

The tests are intended to exercise the public C API and will link to a
specific shared library exposing only the C API, this library itself may
link to libMLIR.so.
If we link some LLVM library statically in the test themselves, we end
up with duplicated cl::opt registrations in LLVM. A possible setup if
these libraries were needed could be to link libMLIR.so directly when
available and link statically when it isn't available (in which case the
libary exposing the C API would be statically link and isolated from the
cl::opt registry, hopefully).

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

10 months ago[Inliner] Handle `mustprogress` functions
Atmn Patel [Fri, 6 Nov 2020 05:10:23 +0000 (00:10 -0500)]
[Inliner] Handle `mustprogress` functions

When inlining `mustprogress` functions, if the caller or the callee has
the attribute, we drop the function attribute. The loops that have the
`llvm.loop.mustprogress` metadata keep their metadata. We do not need to
add new loop metadata to inlined functions because the patch in D86841
already adds the relevant loop metadata in all of the necessary places.

Reviewed By: jdoerfert

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

10 months ago[test] -mtriple=x86_64-* -> -mtriple=x86_64
Fangrui Song [Sat, 7 Nov 2020 00:49:51 +0000 (16:49 -0800)]
[test] -mtriple=x86_64-* -> -mtriple=x86_64

10 months ago[mlir][Python] Fix cmake typo keeping the extension from installing.
Stella Laurenzo [Sat, 7 Nov 2020 00:47:26 +0000 (16:47 -0800)]
[mlir][Python] Fix cmake typo keeping the extension from installing.

10 months ago[libc] Extend WrapperGen to emit aliases.
Siva Chandra Reddy [Fri, 6 Nov 2020 23:43:45 +0000 (15:43 -0800)]
[libc] Extend WrapperGen to emit aliases.

Reviewed By: michaelrj

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

10 months agoMerge branch 'mainrename-addmainunit2-debug-scoped-altlink-sharedstmt-dieref-dwz3...
Jan Kratochvil [Fri, 6 Nov 2020 23:20:16 +0000 (00:20 +0100)]
Merge branch 'mainrename-addmainunit2-debug-scoped-altlink-sharedstmt-dieref-dwz3-main2-testdts' into mainrename-addmainunit2-debug-scoped-altlink-sharedstmt-dieref-dwz3-main2-testdts-testcategory

10 months agoMerge branch 'mainrename-addmainunit2-debug-scoped-altlink-sharedstmt-dieref-dwz3...
Jan Kratochvil [Fri, 6 Nov 2020 23:20:14 +0000 (00:20 +0100)]
Merge branch 'mainrename-addmainunit2-debug-scoped-altlink-sharedstmt-dieref-dwz3-main2' into mainrename-addmainunit2-debug-scoped-altlink-sharedstmt-dieref-dwz3-main2-testdts

10 months agoMerge branch 'mainrename-addmainunit2-debug-scoped-altlink-sharedstmt-dieref-dwz3...
Jan Kratochvil [Fri, 6 Nov 2020 23:20:12 +0000 (00:20 +0100)]
Merge branch 'mainrename-addmainunit2-debug-scoped-altlink-sharedstmt-dieref-dwz3' into mainrename-addmainunit2-debug-scoped-altlink-sharedstmt-dieref-dwz3-main2

10 months agoMerge branch 'mainrename-addmainunit2-debug-scoped-altlink-sharedstmt-dieref' into...
Jan Kratochvil [Fri, 6 Nov 2020 23:20:10 +0000 (00:20 +0100)]
Merge branch 'mainrename-addmainunit2-debug-scoped-altlink-sharedstmt-dieref' into mainrename-addmainunit2-debug-scoped-altlink-sharedstmt-dieref-dwz3

10 months agoMerge branch 'mainrename-addmainunit2-debug-scoped-altlink-sharedstmt' into mainrenam...
Jan Kratochvil [Fri, 6 Nov 2020 23:20:08 +0000 (00:20 +0100)]
Merge branch 'mainrename-addmainunit2-debug-scoped-altlink-sharedstmt' into mainrename-addmainunit2-debug-scoped-altlink-sharedstmt-dieref

10 months agoMerge branch 'mainrename-addmainunit2-debug-scoped-altlink' into mainrename-addmainun...
Jan Kratochvil [Fri, 6 Nov 2020 23:20:06 +0000 (00:20 +0100)]
Merge branch 'mainrename-addmainunit2-debug-scoped-altlink' into mainrename-addmainunit2-debug-scoped-altlink-sharedstmt