lldb.git
5 min agoMerge branch 'addmainunit4-altlink-sharedstmt-dieref-dwz3-inlinebug-testcategory... dwz
Jan Kratochvil [Sat, 31 Jul 2021 20:48:58 +0000 (22:48 +0200)]
Merge branch 'addmainunit4-altlink-sharedstmt-dieref-dwz3-inlinebug-testcategory-testcase' into addmainunit4-altlink-sharedstmt-dieref-dwz3-inlinebug-testcategory-testcase-symlink

5 min agoMerge branch 'addmainunit4-altlink-sharedstmt-dieref-dwz3-inlinebug-testcategory...
Jan Kratochvil [Sat, 31 Jul 2021 20:48:58 +0000 (22:48 +0200)]
Merge branch 'addmainunit4-altlink-sharedstmt-dieref-dwz3-inlinebug-testcategory' into addmainunit4-altlink-sharedstmt-dieref-dwz3-inlinebug-testcategory-testcase

5 min agoMerge branch 'addmainunit4-altlink-sharedstmt-dieref-dwz3-inlinebug' into addmainunit...
Jan Kratochvil [Sat, 31 Jul 2021 20:48:57 +0000 (22:48 +0200)]
Merge branch 'addmainunit4-altlink-sharedstmt-dieref-dwz3-inlinebug' into addmainunit4-altlink-sharedstmt-dieref-dwz3-inlinebug-testcategory

5 min agoMerge branch 'addmainunit4-altlink-sharedstmt-dieref-dwz3' into addmainunit4-altlink...
Jan Kratochvil [Sat, 31 Jul 2021 20:48:56 +0000 (22:48 +0200)]
Merge branch 'addmainunit4-altlink-sharedstmt-dieref-dwz3' into addmainunit4-altlink-sharedstmt-dieref-dwz3-inlinebug

5 min agoMerge branch 'addmainunit4-altlink-sharedstmt-dieref' into addmainunit4-altlink-share...
Jan Kratochvil [Sat, 31 Jul 2021 20:48:56 +0000 (22:48 +0200)]
Merge branch 'addmainunit4-altlink-sharedstmt-dieref' into addmainunit4-altlink-sharedstmt-dieref-dwz3

5 min agoMerge branch 'addmainunit4-altlink-sharedstmt' into addmainunit4-altlink-sharedstmt...
Jan Kratochvil [Sat, 31 Jul 2021 20:48:55 +0000 (22:48 +0200)]
Merge branch 'addmainunit4-altlink-sharedstmt' into addmainunit4-altlink-sharedstmt-dieref

5 min agoMerge branch 'addmainunit4-altlink' into addmainunit4-altlink-sharedstmt
Jan Kratochvil [Sat, 31 Jul 2021 20:48:54 +0000 (22:48 +0200)]
Merge branch 'addmainunit4-altlink' into addmainunit4-altlink-sharedstmt

5 min agoMerge branch 'addmainunit4' into addmainunit4-altlink
Jan Kratochvil [Sat, 31 Jul 2021 20:48:53 +0000 (22:48 +0200)]
Merge branch 'addmainunit4' into addmainunit4-altlink

6 min ago(no commit message)
Jan Kratochvil [Sat, 31 Jul 2021 20:48:37 +0000 (22:48 +0200)]

8 hours agoMerge branch 'addmainunit4-altlink-sharedstmt-dieref-dwz3-inlinebug-testcategory...
Jan Kratochvil [Sat, 31 Jul 2021 11:59:13 +0000 (13:59 +0200)]
Merge branch 'addmainunit4-altlink-sharedstmt-dieref-dwz3-inlinebug-testcategory-testcase' into addmainunit4-altlink-sharedstmt-dieref-dwz3-inlinebug-testcategory-testcase-symlink

8 hours agoMerge branch 'addmainunit4-altlink-sharedstmt-dieref-dwz3-inlinebug-testcategory...
Jan Kratochvil [Sat, 31 Jul 2021 11:59:12 +0000 (13:59 +0200)]
Merge branch 'addmainunit4-altlink-sharedstmt-dieref-dwz3-inlinebug-testcategory' into addmainunit4-altlink-sharedstmt-dieref-dwz3-inlinebug-testcategory-testcase

8 hours agoMerge branch 'addmainunit4-altlink-sharedstmt-dieref-dwz3-inlinebug' into addmainunit...
Jan Kratochvil [Sat, 31 Jul 2021 11:59:10 +0000 (13:59 +0200)]
Merge branch 'addmainunit4-altlink-sharedstmt-dieref-dwz3-inlinebug' into addmainunit4-altlink-sharedstmt-dieref-dwz3-inlinebug-testcategory

8 hours agoMerge branch 'addmainunit4-altlink-sharedstmt-dieref-dwz3' into addmainunit4-altlink...
Jan Kratochvil [Sat, 31 Jul 2021 11:59:09 +0000 (13:59 +0200)]
Merge branch 'addmainunit4-altlink-sharedstmt-dieref-dwz3' into addmainunit4-altlink-sharedstmt-dieref-dwz3-inlinebug

8 hours agoMerge branch 'addmainunit4-altlink-sharedstmt-dieref' into addmainunit4-altlink-share...
Jan Kratochvil [Sat, 31 Jul 2021 11:59:08 +0000 (13:59 +0200)]
Merge branch 'addmainunit4-altlink-sharedstmt-dieref' into addmainunit4-altlink-sharedstmt-dieref-dwz3

8 hours agoMerge branch 'addmainunit4-altlink-sharedstmt' into addmainunit4-altlink-sharedstmt...
Jan Kratochvil [Sat, 31 Jul 2021 11:59:07 +0000 (13:59 +0200)]
Merge branch 'addmainunit4-altlink-sharedstmt' into addmainunit4-altlink-sharedstmt-dieref

8 hours agoMerge branch 'addmainunit4-altlink' into addmainunit4-altlink-sharedstmt
Jan Kratochvil [Sat, 31 Jul 2021 11:59:06 +0000 (13:59 +0200)]
Merge branch 'addmainunit4-altlink' into addmainunit4-altlink-sharedstmt

8 hours agoMerge branch 'addmainunit4' into addmainunit4-altlink
Jan Kratochvil [Sat, 31 Jul 2021 11:59:05 +0000 (13:59 +0200)]
Merge branch 'addmainunit4' into addmainunit4-altlink

8 hours ago(no commit message)
Jan Kratochvil [Sat, 31 Jul 2021 11:59:02 +0000 (13:59 +0200)]

8 hours ago(no commit message)
Jan Kratochvil [Sat, 31 Jul 2021 11:58:55 +0000 (13:58 +0200)]

11 hours ago[MLIR] NFC Clean up doc comments on memref replacement utility
Uday Bondhugula [Fri, 30 Jul 2021 09:47:43 +0000 (15:17 +0530)]
[MLIR] NFC Clean up doc comments on memref replacement utility

NFC. Clean up stale doc comments on memref replacement utility and some
variable renaming in it to avoid confusion.

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

12 hours ago[AArch64] Legalize MVT::i64x8 in DAG isel lowering
Alexandros Lamprineas [Sat, 31 Jul 2021 07:59:19 +0000 (08:59 +0100)]
[AArch64] Legalize MVT::i64x8 in DAG isel lowering

This patch legalizes the Machine Value Type introduced in D94096 for loads
and stores. A new target hook named getAsmOperandValueType() is added which
maps i512 to MVT::i64x8. GlobalISel falls back to DAG for legalization.

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

12 hours ago[AArch64] Add a Machine Value Type for 8 consecutive registers
Alexandros Lamprineas [Sat, 31 Jul 2021 07:46:20 +0000 (08:46 +0100)]
[AArch64] Add a Machine Value Type for 8 consecutive registers

Adds MVT::i64x8, a Machine Value Type needed for lowering inline assembly
operands which materialize a sequence of eight general purpose registers.

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

12 hours ago[Clang][AArch64] Inline assembly support for the ACLE type 'data512_t'
Alexandros Lamprineas [Wed, 28 Jul 2021 15:40:59 +0000 (16:40 +0100)]
[Clang][AArch64] Inline assembly support for the ACLE type 'data512_t'

In LLVM IR terms the ACLE type 'data512_t' is essentially an aggregate
type { [8 x i64] }. When emitting code for inline assembly operands,
clang tries to scalarize aggregate types to an integer of the equivalent
length, otherwise it passes them by-reference. This patch adds a target
hook to tell whether a given inline assembly operand is scalarizable
so that clang can emit code to pass/return it by-value.

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

12 hours ago[lldb] [DWARF-5] Be lazier about loading .dwo files
Eric Leese [Fri, 30 Jul 2021 11:08:00 +0000 (13:08 +0200)]
[lldb] [DWARF-5] Be lazier about loading .dwo files

This change makes sure that DwarfUnit does not load a .dwo file until
necessary. I also take advantage of DWARF 5's guarantee that the first
support file is also the primary file to make it possible to create
a compile unit without loading the .dwo file.

Testcases now require Linux as it is needed for -gsplit-dwarf.

Review By: jankratochvil, dblaikie

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

13 hours ago[profile][test] Delete --path-equivalence=/tmp,%S
Fangrui Song [Sat, 31 Jul 2021 07:36:16 +0000 (00:36 -0700)]
[profile][test] Delete --path-equivalence=/tmp,%S

This causes the test to fail if %S is under /tmp

13 hours agotsan: prevent insertion of memset into BenignRaceImpl
Dmitry Vyukov [Sat, 31 Jul 2021 07:09:01 +0000 (09:09 +0200)]
tsan: prevent insertion of memset into BenignRaceImpl

Some bots started failing with the following error
after changing Alloc to New. Change it back.

ThreadSanitizer: CHECK failed: ((locked[i].recursion)) == ((0))
 4 __sanitizer::CheckedMutex::CheckNoLocks()
 5 __tsan::ScopedInterceptor::~ScopedInterceptor()
 6 memset
 7 __tsan::New<__tsan::ExpectRace>()
 8 __tsan::AddExpectRace()
 9 BenignRaceImpl()

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

13 hours agotsan: introduce Tid and StackID typedefs
Dmitry Vyukov [Fri, 30 Jul 2021 11:50:15 +0000 (13:50 +0200)]
tsan: introduce Tid and StackID typedefs

Currently we inconsistently use u32 and int for thread ids,
there are also "unique tid" and "os tid" and just lots of other
things identified by integers.
Additionally new tsan runtime will introduce yet another
thread identifier that is very different from current tids.
Similarly for stack IDs, it's easy to confuse u32 with other
integer identifiers. And when a function accepts u32 or a struct
contains u32 field, it's not always clear what it is.

Add Tid and StackID typedefs to make it clear what is what.

Reviewed By: melver

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

13 hours agosanitizers: build tests with -g
Dmitry Vyukov [Fri, 30 Jul 2021 14:56:36 +0000 (16:56 +0200)]
sanitizers: build tests with -g

We currently build tests without -g, which is quite inconvenient.
Crash stacks don't have line numbers, gdb don't how line numbers either.
Always build tests with -g.

Reviewed By: vitalybuka

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

13 hours agotsan: remove "expected" races
Dmitry Vyukov [Fri, 30 Jul 2021 16:05:47 +0000 (18:05 +0200)]
tsan: remove "expected" races

"Expected" races is a very ancient facility used in tsanv1 tests.
It's not used/needed anymore. Remove it.

Reviewed By: vitalybuka

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

14 hours agotsan: always setup sigaction signal handler
Dmitry Vyukov [Fri, 30 Jul 2021 17:52:48 +0000 (19:52 +0200)]
tsan: always setup sigaction signal handler

Currently we setup either sigaction signal handler with 3 arguments
or old style signal handler with 1 argument depending on user handler type.
This unnecessarily complicates code. Always setup sigaction handler.

Reviewed By: vitalybuka

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

18 hours ago[NFC][sanitizer] clang-format few files
Vitaly Buka [Sat, 31 Jul 2021 02:24:45 +0000 (19:24 -0700)]
[NFC][sanitizer] clang-format few files

18 hours agoRevert "[clang][cache] Update Fuchsia-stage2.cmake to create hwasan multilibs"
Petr Hosek [Sat, 31 Jul 2021 01:56:51 +0000 (18:56 -0700)]
Revert "[clang][cache] Update Fuchsia-stage2.cmake to create hwasan multilibs"

This reverts commit bb438f6cbfc08eaa2cd9124a0ad581dd29f819b4 since
it broke our Windows builders and we need more time to investigate
the issue.

19 hours ago[profile] Fix profile merging with binary IDs
Petr Hosek [Fri, 30 Jul 2021 09:40:27 +0000 (02:40 -0700)]
[profile] Fix profile merging with binary IDs

This fixes support for merging profiles which broke as a consequence
of e50a38840dc3db5813f74b1cd2e10e6d984d0e67. The issue was missing
adjustment in merge logic to account for the binary IDs which are
now included in the raw profile just after header.

In addition, this change also:
* Includes the version in module signature that's used for merging
to avoid accidental attempts to merge incompatible profiles.
* Moves the binary IDs size field after version field in the header
as was suggested in the review.

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

19 hours agoRevert "[profile] Fix profile merging with binary IDs"
Petr Hosek [Sat, 31 Jul 2021 01:53:48 +0000 (18:53 -0700)]
Revert "[profile] Fix profile merging with binary IDs"

This reverts commit dcadd64986b8a84dc244d4e7faa848fb4c18cea6.

19 hours agoRevert "[lldb] [DWARF-5] Be lazier about loading .dwo files"
Stella Stamenova [Sat, 31 Jul 2021 01:33:13 +0000 (18:33 -0700)]
Revert "[lldb] [DWARF-5] Be lazier about loading .dwo files"

This reverts commit 8dfd6cae9bd62ae5ef056b994ece2e98f1558830.

This change broke the windows lldb bot:
https://lab.llvm.org/buildbot/#/builders/83/builds/8842

19 hours ago[libc] Add trigonometric and exponential functions to the windows config.
Siva Chandra Reddy [Sat, 31 Jul 2021 01:30:26 +0000 (01:30 +0000)]
[libc] Add trigonometric and exponential functions to the windows config.

19 hours ago[sanitizer] Remove cpplint annotations
Vitaly Buka [Fri, 30 Jul 2021 22:24:59 +0000 (15:24 -0700)]
[sanitizer] Remove cpplint annotations

cpplint was removed by D107197

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

19 hours ago[vscode-mlir] Fix the package repo url.
River Riddle [Sat, 31 Jul 2021 00:49:47 +0000 (00:49 +0000)]
[vscode-mlir] Fix the package repo url.

It should be llvm/vscode-mlir not llvm-project/vscode-mlir.

20 hours ago[profile] Fix profile merging with binary IDs
Petr Hosek [Fri, 30 Jul 2021 09:40:27 +0000 (02:40 -0700)]
[profile] Fix profile merging with binary IDs

This fixes support for merging profiles which broke as a consequence
of e50a38840dc3db5813f74b1cd2e10e6d984d0e67. The issue was missing
adjustment in merge logic to account for the binary IDs which are
now included in the raw profile just after header.

In addition, this change also:
* Includes the version in module signature that's used for merging
to avoid accidental attempts to merge incompatible profiles.
* Moves the binary IDs size field after version field in the header
as was suggested in the review.

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

21 hours ago[mlir-vscode] Create a proper output channel for the MLIRContext
River Riddle [Fri, 30 Jul 2021 23:53:01 +0000 (23:53 +0000)]
[mlir-vscode] Create a proper output channel for the MLIRContext

This allows for reusing the same output channel when the extension reloads after updating the server. Currently, whenever the extension restarts a new output channel is created (which can lead to a large number of seemingly dead output channels).

21 hours ago[vscode-mlir] Update package.json in preparation for publishing
River Riddle [Fri, 30 Jul 2021 23:52:47 +0000 (23:52 +0000)]
[vscode-mlir] Update package.json in preparation for publishing

Quite a few things were out-of-date, or just not
organized well. This revision updates the extension
name, repo, icon, and many other components in
preperation for publishing the extension to the
marketplace.

21 hours ago[libc] Move FPExceptMatcher out of TestHelpers.h
Siva Chandra Reddy [Fri, 30 Jul 2021 05:22:20 +0000 (05:22 +0000)]
[libc] Move FPExceptMatcher out of TestHelpers.h

TestHelpers.h pulls few pieces from LLVM libc's unittest framework
which aren't available on platforms like Fuchsia which use their own
unittest framework. So, by moving FPExceptMatcher to a different file
we can exclude LLVM libc specific pieces in a cleaner way.

In a later pass, it might make more sense to rename TestHelpers.h also
to FPMatcher.h. That way, we can make macros like EXPECT_FP_EQ to be
equivalent to EXPECT_EQ on platforms like Fuchsia.

Reviewed By: michaelrj

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

22 hours ago[sanitizer] Remove cpplint
Vitaly Buka [Fri, 30 Jul 2021 21:53:09 +0000 (14:53 -0700)]
[sanitizer] Remove cpplint

As code diverge from Google style we need
to add more and more exceptions to suppress
conflicts with clang-format and clang-tidy.
As this point it does not provide a additional value.

Reviewed By: morehouse

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

22 hours ago[flang] Produce proper "preprocessor output" for -E option
peter klausler [Fri, 23 Jul 2021 23:41:04 +0000 (16:41 -0700)]
[flang] Produce proper "preprocessor output" for -E option

Rename the current -E option to "-E -Xflang -fno-reformat".

Add a new Parsing::EmitPreprocessedSource() routine to convert the
cooked character stream output of the prescanner back to something
more closely resembling output from a traditional preprocessor;
call this new routine when -E appears.

The new -E output is suitable for use as fixed form Fortran source to
compilation by (one hopes) any Fortran compiler.  If the original
top-level source file had been free form source, the output will be
suitable for use as free form source as well; otherwise there may be
diagnostics about missing spaces if they were indeed absent in the
original fixed form source.

Unless the -P option appears, #line directives are interspersed
with the output (but be advised, f18 will ignore these if presented
with them in a later compilation).

An effort has been made to preserve original alphabetic character case
and source indentation.

Add -P and -fno-reformat to the new drivers.

Tweak test options to avoid confusion with prior -E output; use
-fno-reformat where needed, but prefer to keep -E, sometimes
in concert with -P, on most, updating expected results accordingly.

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

22 hours ago[libcxx][docs] Take locks on the last three views.
zoecarver [Fri, 30 Jul 2021 22:07:35 +0000 (15:07 -0700)]
[libcxx][docs] Take locks on the last three views.

22 hours ago[mlir][spirv] Add support for i8 serialization
Lei Zhang [Fri, 30 Jul 2021 21:39:32 +0000 (17:39 -0400)]
[mlir][spirv] Add support for i8 serialization

Reviewed By: hanchung

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

22 hours ago[mlir][spirv] Fix loading bool with proper storage capabilities
Lei Zhang [Fri, 30 Jul 2021 00:22:01 +0000 (20:22 -0400)]
[mlir][spirv] Fix loading bool with proper storage capabilities

If the source value to load is bool, and we have native storage
capability support for the source bitwidth, we still cannot directly
rewrite uses; we need to perform casting to bool first.

Reviewed By: hanchung

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

22 hours ago[mlir][spirv] Fix storing bool with proper storage capabilities
Lei Zhang [Fri, 30 Jul 2021 00:21:44 +0000 (20:21 -0400)]
[mlir][spirv] Fix storing bool with proper storage capabilities

If the source value to store is bool, and we have native storage
capability support for the target bitwidth, we still cannot directly
store; we need to perform casting to match the target memref
element's bitwidth.

Reviewed By: hanchung

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

22 hours ago[libomptarget][nfc] Only set cuda-path for nvptx tests
Jon Chesterfield [Fri, 30 Jul 2021 22:01:07 +0000 (23:01 +0100)]
[libomptarget][nfc] Only set cuda-path for nvptx tests

Remove --cuda-path=CUDA_TOOLKIT_ROOT_DIR-NOTFOUND
from the invocation of non-nvptx test cases. Better signal
to noise ratio on other architectures.

Reviewed By: tianshilei1992

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

23 hours ago[builtins] Try to ensure single copy of emulated TLS state
Shoaib Meenai [Fri, 30 Jul 2021 01:39:04 +0000 (18:39 -0700)]
[builtins] Try to ensure single copy of emulated TLS state

Multiple copies of emulated TLS state means inconsistent results when
accessing the same thread-local variable from different shared objects
(https://github.com/android/ndk/issues/1551). Making `__emutls_get_address`
be a weak default visibility symbol should make the dynamic linker
ensure only a single copy gets used at runtime. This is best-effort, but
the more robust approach of putting emulated TLS into its own shared
object would (a) be a much bigger change, and (b) shared objects are
pretty heavyweight, and adding a new one to a space-constrained
environment isn't an easy sell. Given the expected rarity of direct
accesses to emulated TLS variables across different shared objects, the
best-effort approach should suffice.

Reviewed By: danalbert, rprichard

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

23 hours agoRevert "[profile] Fix profile merging with binary IDs"
Petr Hosek [Fri, 30 Jul 2021 21:32:15 +0000 (14:32 -0700)]
Revert "[profile] Fix profile merging with binary IDs"

This reverts commit 89d6eb6f8c5d94093f30a5f37b193a2422491642, this
seemed to have break a few builders.

23 hours agoRevert "[hwasan] Detect use after scope within function."
Florian Mayer [Fri, 30 Jul 2021 21:32:04 +0000 (22:32 +0100)]
Revert "[hwasan] Detect use after scope within function."

This reverts commit 84705ed913659d1d5e0ee6b5ae7b298914ec87d4.

23 hours ago[LoopStrengthReduction] Fix pointer extend asserts
Brendon Cahoon [Fri, 30 Jul 2021 16:45:04 +0000 (12:45 -0400)]
[LoopStrengthReduction] Fix pointer extend asserts

Additional asserts were added to ScalarEvolution to enforce
pointer/int type rules. An assert is triggered when the LSR pass
attempts to extend a pointer SCEV in GenerateTruncates.

This patch changes GenerateTruncates to exit early if the Formaula
contains a ScaledReg or BaseReg with a pointer type.

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

23 hours ago[lldb] [DWARF-5] Be lazier about loading .dwo files
Eric Leese [Fri, 30 Jul 2021 11:08:00 +0000 (13:08 +0200)]
[lldb] [DWARF-5] Be lazier about loading .dwo files

This change makes sure that DwarfUnit does not load a .dwo file until
necessary. I also take advantage of DWARF 5's guarantee that the first
support file is also the primary file to make it possible to create
a compile unit without loading the .dwo file.

Review By: jankratochvil, dblaikie

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

23 hours agoRevert "[OpenMP][AMDGCN] Initial math headers support"
Jon Chesterfield [Fri, 30 Jul 2021 21:03:23 +0000 (22:03 +0100)]
Revert "[OpenMP][AMDGCN] Initial math headers support"

Broke nvptx compilation on files including <complex>

This reverts commit 12da97ea10a941f0123340831300d09a2121e173.

23 hours agoMerge branch 'addmainunit4-altlink-sharedstmt-dieref-dwz3-inlinebug-testcategory...
Jan Kratochvil [Fri, 30 Jul 2021 21:00:01 +0000 (23:00 +0200)]
Merge branch 'addmainunit4-altlink-sharedstmt-dieref-dwz3-inlinebug-testcategory-testcase' into addmainunit4-altlink-sharedstmt-dieref-dwz3-inlinebug-testcategory-testcase-symlink

23 hours agoMerge branch 'addmainunit4-altlink-sharedstmt-dieref-dwz3-inlinebug-testcategory...
Jan Kratochvil [Fri, 30 Jul 2021 20:59:59 +0000 (22:59 +0200)]
Merge branch 'addmainunit4-altlink-sharedstmt-dieref-dwz3-inlinebug-testcategory' into addmainunit4-altlink-sharedstmt-dieref-dwz3-inlinebug-testcategory-testcase

23 hours agoMerge branch 'addmainunit4-altlink-sharedstmt-dieref-dwz3-inlinebug' into addmainunit...
Jan Kratochvil [Fri, 30 Jul 2021 20:59:58 +0000 (22:59 +0200)]
Merge branch 'addmainunit4-altlink-sharedstmt-dieref-dwz3-inlinebug' into addmainunit4-altlink-sharedstmt-dieref-dwz3-inlinebug-testcategory

23 hours agoMerge branch 'addmainunit4-altlink-sharedstmt-dieref-dwz3' into addmainunit4-altlink...
Jan Kratochvil [Fri, 30 Jul 2021 20:59:56 +0000 (22:59 +0200)]
Merge branch 'addmainunit4-altlink-sharedstmt-dieref-dwz3' into addmainunit4-altlink-sharedstmt-dieref-dwz3-inlinebug

23 hours agoMerge branch 'addmainunit4-altlink-sharedstmt-dieref' into addmainunit4-altlink-share...
Jan Kratochvil [Fri, 30 Jul 2021 20:59:55 +0000 (22:59 +0200)]
Merge branch 'addmainunit4-altlink-sharedstmt-dieref' into addmainunit4-altlink-sharedstmt-dieref-dwz3

23 hours agoMerge branch 'addmainunit4-altlink-sharedstmt' into addmainunit4-altlink-sharedstmt...
Jan Kratochvil [Fri, 30 Jul 2021 20:59:54 +0000 (22:59 +0200)]
Merge branch 'addmainunit4-altlink-sharedstmt' into addmainunit4-altlink-sharedstmt-dieref

23 hours agoMerge branch 'addmainunit4-altlink' into addmainunit4-altlink-sharedstmt
Jan Kratochvil [Fri, 30 Jul 2021 20:59:52 +0000 (22:59 +0200)]
Merge branch 'addmainunit4-altlink' into addmainunit4-altlink-sharedstmt

23 hours agoMerge branch 'addmainunit4' into addmainunit4-altlink
Jan Kratochvil [Fri, 30 Jul 2021 20:59:51 +0000 (22:59 +0200)]
Merge branch 'addmainunit4' into addmainunit4-altlink

23 hours ago(no commit message)
Jan Kratochvil [Fri, 30 Jul 2021 20:59:46 +0000 (22:59 +0200)]

23 hours agoMerge remote-tracking branch 'origin/main' into addmainunit4
Jan Kratochvil [Fri, 30 Jul 2021 20:59:36 +0000 (22:59 +0200)]
Merge remote-tracking branch 'origin/main' into addmainunit4

24 hours ago[polly] Fix up regression test config with current features.
Eli Friedman [Fri, 30 Jul 2021 20:17:45 +0000 (13:17 -0700)]
[polly] Fix up regression test config with current features.

Primarily, configure substitutions so we can copy-paste the "RUN" line
of failed tests without worrying about the paths.

24 hours ago[profile] Fix profile merging with binary IDs
Petr Hosek [Fri, 30 Jul 2021 09:40:27 +0000 (02:40 -0700)]
[profile] Fix profile merging with binary IDs

This fixes support for merging profiles which broke as a consequence
of e50a38840dc3db5813f74b1cd2e10e6d984d0e67. The issue was missing
adjustment in merge logic to account for the binary IDs which are
now included in the raw profile just after header.

In addition, this change also:
* Includes the version in module signature that's used for merging
to avoid accidental attempts to merge incompatible profiles.
* Moves the binary IDs size field after version field in the header
as was suggested in the review.

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

24 hours ago[AMDGPU] Autogenerate checks in kernel-args.ll
Jay Foad [Thu, 29 Jul 2021 08:43:49 +0000 (09:43 +0100)]
[AMDGPU] Autogenerate checks in kernel-args.ll

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

24 hours ago[mlir][sparse] move comments from cpp files into dialect doc
Aart Bik [Fri, 30 Jul 2021 19:59:20 +0000 (12:59 -0700)]
[mlir][sparse] move comments from cpp files into dialect doc

Reviewed By: rriddle

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

24 hours ago[lldb] Fix remote macOS debugging on Apple Silicon
Jonas Devlieghere [Fri, 30 Jul 2021 16:35:44 +0000 (09:35 -0700)]
[lldb] Fix remote macOS debugging on Apple Silicon

Update ARMGetSupportedArchitectureAtIndex to consider remote macOS
debugging. Currently, it defaults to an iOS triple when IsHost() returns
false. This fixes TestPlatformSDK.py on Apple Silicon.

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

25 hours ago[z/OS]Remove overriding default attribute aligned value
Fanbo Meng [Fri, 30 Jul 2021 19:03:40 +0000 (15:03 -0400)]
[z/OS]Remove overriding default attribute aligned value

Make DefaultAlignForAttributeAligned consistent with SystemZ.

Reviewed By: abhina.sreeskantharajan, anirudhp

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

25 hours ago[PowerPC] Fix byte ordering of ld/st with length on BE
Nemanja Ivanovic [Fri, 30 Jul 2021 19:33:55 +0000 (14:33 -0500)]
[PowerPC] Fix byte ordering of ld/st with length on BE

The builtins vec_xl_len_r and vec_xst_len_r actually use the
wrong side of the vector on big endian Power9 systems. We never
spotted this before because there was no such thing as a big
endian distro that supported Power9. Now we have AIX and the
elements are in the wrong part of the vector. This just fixes
it so the elements are loaded to and stored from the right
side of the vector.

25 hours ago[doc]Added examples for generic opcodes
pooja2299 [Thu, 29 Jul 2021 11:21:28 +0000 (16:51 +0530)]
[doc]Added examples for generic opcodes

Added examples to G_BR, G_BRCOND, G_BRJT, G_BRINDIRECT

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

25 hours agoExplain the symbols of basic block clusters with an example in the header comments.
Rahman Lavaee [Fri, 30 Jul 2021 02:20:12 +0000 (19:20 -0700)]
Explain the symbols of basic block clusters with an example in the header comments.

This prevents from confusion with the ``labels`` option.

Reviewed By: snehasish

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

26 hours ago[clang][cache] Update Fuchsia-stage2.cmake to create hwasan multilibs
Leonard Chan [Fri, 30 Jul 2021 18:52:27 +0000 (11:52 -0700)]
[clang][cache] Update Fuchsia-stage2.cmake to create hwasan multilibs

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

26 hours ago[InstrProfiling] Make CountersPtr in __profd_ relative
Fangrui Song [Fri, 30 Jul 2021 18:52:18 +0000 (11:52 -0700)]
[InstrProfiling] Make CountersPtr in __profd_ relative

Change `CountersPtr` in `__profd_` to a label difference, which is a link-time
constant. On ELF, when linking a shared object, this requires that `__profc_` is
either private or linkonce/linkonce_odr hidden. On COFF, we need D104564 so that
`.quad a-b` (64-bit label difference) can lower to a 32-bit PC-relative relocation.

```
# ELF: R_X86_64_PC64 (PC-relative)
.quad .L__profc_foo-.L__profd_foo

# Mach-O: a pair of 8-byte X86_64_RELOC_UNSIGNED and X86_64_RELOC_SUBTRACTOR
.quad l___profc_foo-l___profd_foo

# COFF: we actually use IMAGE_REL_AMD64_REL32/IMAGE_REL_ARM64_REL32 so
# the high 32-bit value is zero even if .L__profc_foo < .L__profd_foo
# As compensation, we truncate CountersDelta in the header so that
# __llvm_profile_merge_from_buffer and llvm-profdata reader keep working.
.quad .L__profc_foo-.L__profd_foo
```

(Note: link.exe sorts `.lprfc` before `.lprfd` even if the object writer
has `.lprfd` before `.lprfc`, so we cannot work around by reordering
`.lprfc` and `.lprfd`.)

With this change, a stage 2 (`-DLLVM_TARGETS_TO_BUILD=X86 -DLLVM_BUILD_INSTRUMENTED=IR`)
`ld -pie` linked clang is 1.74% smaller due to fewer R_X86_64_RELATIVE relocations.
```
% readelf -r pie | awk '$3~/R.*/{s[$3]++} END {for (k in s) print k, s[k]}'
R_X86_64_JUMP_SLO 331
R_X86_64_TPOFF64 2
R_X86_64_RELATIVE 476059  # was: 607712
R_X86_64_64 2616
R_X86_64_GLOB_DAT 31
```

The absolute function address (used by llvm-profdata to collect indirect call
targets) can be converted to relative as well, but is not done in this patch.

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

26 hours ago[ARM] Distribute reductions based on ascending load offset
David Green [Fri, 30 Jul 2021 18:50:07 +0000 (19:50 +0100)]
[ARM] Distribute reductions based on ascending load offset

This distributes reductions based on the relative offset of loads, if
one is found from their operands. Given chains of reductions this will
then sort them in ascending load order, which in turn can help simple
prefetches latch on to increasing strides more easily.

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

26 hours ago[OpenCL] Replace test for pipe struct to test it with fixed triple
Anton Zabaznov [Fri, 30 Jul 2021 16:21:05 +0000 (19:21 +0300)]
[OpenCL] Replace test for pipe struct to test it with fixed triple

Reviewed By: Anastasia

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

26 hours ago[InstCombine] add more tests for vector cmp-bitcast; NFC
Sanjay Patel [Fri, 30 Jul 2021 18:11:28 +0000 (14:11 -0400)]
[InstCombine] add more tests for vector cmp-bitcast; NFC

D107170

26 hours ago[InstCombine] add more tests for vector-cmp bitcast; NFC
Sanjay Patel [Fri, 30 Jul 2021 13:26:34 +0000 (09:26 -0400)]
[InstCombine] add more tests for vector-cmp bitcast; NFC

26 hours ago[compiler-rt][Fuchsia] Support HWASan on Fuchsia
Leonard Chan [Wed, 2 Jun 2021 18:19:56 +0000 (11:19 -0700)]
[compiler-rt][Fuchsia] Support HWASan on Fuchsia

This allows for hwasan to be built targetting fuchsia.

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

26 hours ago[compiler-rt][hwasan] Remove __sanitizer allocation functions from hwasan interface
Leonard Chan [Thu, 25 Mar 2021 21:36:47 +0000 (14:36 -0700)]
[compiler-rt][hwasan] Remove __sanitizer allocation functions from hwasan interface

These functions should not be externally used. We also do not need them internally for Fuchsia.

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

26 hours ago[libc++] Improve LIBCXX_ENABLE_INCOMPLETE_FEATURES.
Mark de Wever [Fri, 30 Jul 2021 18:35:37 +0000 (14:35 -0400)]
[libc++] Improve LIBCXX_ENABLE_INCOMPLETE_FEATURES.

@tcanens pointed out the current behavior of the macro breaks the usage
pattern described in http://wg21.link/SD6
```
#  if __has_include(<optional>)
#    include <optional>
#    if __cpp_lib_optional >= 201606
#      define have_optional 1
#    endif
```

To support this usage pattern the hard errror is removed. Instead the
header includes nothing but the `<version>` header.

Reviewed By: ldionne, #libc

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

26 hours ago[InstCombine] getMaskedTypeForICmpPair - remove dead code. NFCI.
Simon Pilgrim [Fri, 30 Jul 2021 17:31:50 +0000 (18:31 +0100)]
[InstCombine] getMaskedTypeForICmpPair - remove dead code. NFCI.

Ok should be true at this point, so the early-out is dead - replace with an assert.

26 hours agoSelectionDAGDumper.cpp - remove nested if-else return chain. NFCI.
Simon Pilgrim [Fri, 30 Jul 2021 16:49:03 +0000 (17:49 +0100)]
SelectionDAGDumper.cpp - remove nested if-else return chain. NFCI.

Match style and don't use an else after a return.

26 hours agoSelectionDAGDumper.cpp - printrWithDepthHelper - remove dead code. NFCI.
Simon Pilgrim [Fri, 30 Jul 2021 16:32:01 +0000 (17:32 +0100)]
SelectionDAGDumper.cpp - printrWithDepthHelper - remove dead code. NFCI.

Fixes coverity warning - we have an early-out for unsigned depth == 0, so the depth < 1 early-out later on is dead code.

26 hours ago[mlir][sparse] template the memory resident coordinate scheme storage
Aart Bik [Fri, 30 Jul 2021 16:48:41 +0000 (09:48 -0700)]
[mlir][sparse] template the memory resident coordinate scheme storage

Rationale:
External file formats always store the values as doubles, so this was
hard coded in the memory resident COO scheme used to pass data into the
final sparse storage scheme during setup. However, with alternative methods
on the horizon of setting up these temporary COO schemes, it is time to
properly template this data structure.

Reviewed By: gussmith23

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

26 hours ago[lldb] Always codesign binaries on macOS
Jonas Devlieghere [Fri, 30 Jul 2021 18:14:19 +0000 (11:14 -0700)]
[lldb] Always codesign binaries on macOS

Always codesign binaries on macOS. Apple Silicon has stricter
codesigning requirements, for example requiring macCatalyst binaries to
be signed. Ad-hoc sign everything like we do for other Darwin platforms.

26 hours ago[OpenMP] Fixing llvm-omp-device-info compilation with runtimes
Jose M Monsalve Diaz [Fri, 30 Jul 2021 16:26:26 +0000 (11:26 -0500)]
[OpenMP] Fixing llvm-omp-device-info compilation with runtimes

When using `-DLLVM_ENABLED_RUNTIMES` instead of `-DLLVM_ENABLED_PROJECTS`
the `llvm-omp-device-info` tool is not compiled or installed.
In general, no llvm tool would be build on runtimes, because the
-DLLVM_BUILD_TOOLS flag is removed by the way runtimes compilation calls
cmake again.

This patch is simple. Just forward the value of this flag to the
runtime cmake command.

I'm also removing an unnecessary comment in the compilation of the tool

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

26 hours ago[gn build] Port 481ad59b9fa4
LLVM GN Syncbot [Fri, 30 Jul 2021 17:57:30 +0000 (17:57 +0000)]
[gn build] Port 481ad59b9fa4

26 hours ago[nfc] improve a simple call
Walter Erquinigo [Fri, 30 Jul 2021 17:54:38 +0000 (10:54 -0700)]
[nfc] improve a simple call

@jingham correctly pointed out that this call can be simplified. So
let's better do it.

27 hours ago[libcxx][ranges] Add `std::ranges::single_view`.
zoecarver [Tue, 27 Jul 2021 00:27:40 +0000 (17:27 -0700)]
[libcxx][ranges] Add `std::ranges::single_view`.

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

27 hours agoTrim failing test
Paul Robinson [Fri, 30 Jul 2021 17:51:01 +0000 (10:51 -0700)]
Trim failing test

Don't try to run the non-integrated assembler; just verify that the
invocations look like what we expect.  Do verify that the integrated
assembler handles warnings as expected.

27 hours ago[libc][NFC] Add dummy errno target to satisfy mixed mode builds.
Siva Chandra Reddy [Fri, 30 Jul 2021 17:38:04 +0000 (17:38 +0000)]
[libc][NFC] Add dummy errno target to satisfy mixed mode builds.

In mixed mode builds, we should not be including errno as part of
LLVM libc - errno from another library (or the system library) should be
used. But, other entrypoints which use errno list LLVM libc's errno as a
dep ta satisfy the full build mode. So, we add a dummy errno
implementation with empty files to make both mixed mode and full build
mode happy.

27 hours agoGlobalISel: Have lowerLoad scalarize unaligned vectors
Matt Arsenault [Mon, 26 Jul 2021 18:10:26 +0000 (14:10 -0400)]
GlobalISel: Have lowerLoad scalarize unaligned vectors

This could be smarter by picking an ideal type, or at least splitting
the vector in half first. Also handles lower for non-power-of-2,
non-extending vector loads.

Currently this just avoids failing to legalize some odd vector AMDGPU
tests, but is a step towards removing the split logic from the
NarrowScalar logic.

27 hours ago[SLP]Improve splats vectorization.
Alexey Bataev [Thu, 29 Jul 2021 20:47:57 +0000 (13:47 -0700)]
[SLP]Improve splats vectorization.

Replace insertelement instructions for splats with just single
insertelement + broadcast shuffle. Also, try to merge these instructions
if they come from the same/shuffled gather node.

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

27 hours agoReland "[LV] Use lookThroughAnd with logical reductions"
Kerry McLaughlin [Fri, 30 Jul 2021 13:26:30 +0000 (14:26 +0100)]
Reland "[LV] Use lookThroughAnd with logical reductions"

If a reduction Phi has a single user which `AND`s the Phi with a type mask,
`lookThroughAnd` will return the user of the Phi and the narrower type represented
by the mask. Currently this is only used for arithmetic reductions, whereas loops
containing logical reductions will create a reduction intrinsic using the widened
type, for example:

  for.body:
    %phi = phi i32 [ %and, %for.body ], [ 255, %entry ]
    %mask = and i32 %phi, 255
    %gep = getelementptr inbounds i8, i8* %ptr, i32 %iv
    %load = load i8, i8* %gep
    %ext = zext i8 %load to i32
    %and = and i32 %mask, %ext
    ...

^ this will generate an and reduction intrinsic such as the following:
    call i32 @llvm.vector.reduce.and.v8i32(<8 x i32>...)

The same example for an add instruction would create an intrinsic of type i8:
    call i8 @llvm.vector.reduce.add.v8i8(<8 x i8>...)

This patch changes AddReductionVar to call lookThroughAnd for other integer
reductions, allowing loops similar to the example above with reductions such
as and, or & xor to vectorize.

Reviewed By: david-arm, dmgreen

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

27 hours agoGlobalISel: Have load lowering handle some unaligned accesses
Matt Arsenault [Thu, 22 Jul 2021 12:11:14 +0000 (08:11 -0400)]
GlobalISel: Have load lowering handle some unaligned accesses

The code for splitting an unaligned access into 2 pieces is
essentially the same as for splitting a non-power-of-2 load for
scalars. It would be better to pick an optimal memory access size and
directly use it, but splitting in half is what the DAG does.

As-is this fixes handling of some unaligned sextload/zextloads for
AMDGPU. In the future this will help drop the ugly abuse of
narrowScalar to handle splitting unaligned accesses.

28 hours agoXFAIL ppc => powerpc
Paul Robinson [Fri, 30 Jul 2021 16:39:44 +0000 (09:39 -0700)]
XFAIL ppc => powerpc

28 hours agoAMDGPU/GlobalISel: Fix tests using illegal copies to physregs
Matt Arsenault [Tue, 27 Jul 2021 16:42:14 +0000 (12:42 -0400)]
AMDGPU/GlobalISel: Fix tests using illegal copies to physregs

These are unlegalizable and introduce spurious failures. Ideally the
verifier would reject them. Also avoid some weird G_INSERTs.