platform/upstream/llvm.git
3 years ago[clang][test] Fix test for external assemblers
Douglas Yung [Wed, 22 Jul 2020 21:50:20 +0000 (14:50 -0700)]
[clang][test] Fix test for external assemblers

This test depends on using the integrated assembler, so make it
explicit by specifying -fintegrated-as.

3 years ago[mlir][VectorOps] Expose SuperVectorizer as a utility
Diego Caballero [Wed, 22 Jul 2020 21:10:29 +0000 (14:10 -0700)]
[mlir][VectorOps] Expose SuperVectorizer as a utility

This patch refactors a small part of the Super Vectorizer code to
a utility so that it can be used independently from the pass. This
aligns vectorization with other utilities that we already have for loop
transformations, such as fusion, interchange, tiling, etc.

Reviewed By: nicolasvasilache

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

3 years agoRevert D84057 "[PGO][PGSO] Remove a temporary flag used for gradual rollout."
Fangrui Song [Wed, 22 Jul 2020 21:28:28 +0000 (14:28 -0700)]
Revert D84057 "[PGO][PGSO] Remove a temporary flag used for gradual rollout."

This reverts commit e64afefdf88d2607c476f13de05193c0f8991976. It caused
a PGO bootstrapped clang to crash on many source files.

`__llvm_profile_instrument_range` seems to trigger a null pointer dereference.

Call stack:
__llvm_profile_instrument_range
llvm::APInt::udiv(llvm::APInt const&) const
getRangeForAffineARHelper

3 years ago[MVT] Fix getTypeForEVT for v64f16 and v128f16
Christopher Tetreault [Wed, 22 Jul 2020 20:44:47 +0000 (13:44 -0700)]
[MVT] Fix getTypeForEVT for v64f16 and v128f16

Summary: These should have half float as the element type

Reviewers: cameron.mcinally, efriedma, sdesmalen, paulwalker-arm

Reviewed By: paulwalker-arm

Subscribers: hiraditya, llvm-commits

Tags: #llvm

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

3 years agoTry enabling -Wsuggest-override again, using add_compile_options instead of add_compi...
Logan Smith [Wed, 22 Jul 2020 21:16:35 +0000 (14:16 -0700)]
Try enabling -Wsuggest-override again, using add_compile_options instead of add_compile_definitions for disabling it in unittests/ directories.

Using add_compile_definitions caused the flag to be passed to rc.exe on Windows and thus broke Windows builds.

3 years agoDebugInfo: Use debug_line.dwo for debug_macro.dwo
David Blaikie [Sun, 12 Jul 2020 22:35:21 +0000 (15:35 -0700)]
DebugInfo: Use debug_line.dwo for debug_macro.dwo

This is an alternative proposal to D81476 (and D82084) - the details were sufficiently confusing to me it seemed easier to write some code and see how it looks.

Reviewers: SouraVX

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

3 years ago[lldb] Eliminate unneeded value parameters in Utility (NFC)
Jonas Devlieghere [Wed, 22 Jul 2020 20:33:03 +0000 (13:33 -0700)]
[lldb] Eliminate unneeded value parameters in Utility (NFC)

Eliminates value parameter for types that are not trivially copyable.

3 years ago[Polly] Run polly-update-format. NFC.
Michael Kruse [Wed, 22 Jul 2020 20:45:06 +0000 (15:45 -0500)]
[Polly] Run polly-update-format. NFC.

3 years agoFor PR46800, implement the GCC __builtin_complex builtin.
Richard Smith [Wed, 22 Jul 2020 20:34:07 +0000 (13:34 -0700)]
For PR46800, implement the GCC __builtin_complex builtin.

glibc's implementation of the CMPLX macro uses it (with -fgnuc-version
set to 4.7 or later).

3 years ago[gn build] Remove something I missed in 1afd889d0
Nico Weber [Wed, 22 Jul 2020 20:36:21 +0000 (16:36 -0400)]
[gn build] Remove something I missed in 1afd889d0

3 years agoTemporarily revert D83903 "[PGO] Enable the extended value profile buckets for mem...
Fangrui Song [Wed, 22 Jul 2020 20:10:59 +0000 (13:10 -0700)]
Temporarily revert D83903 "[PGO] Enable the extended value profile buckets for mem op sizes."

`__llvm_profile_instrument_memop` transitively calls calloc, thus calloc
should not be instrumented.

I saw a
`calloc -> __llvm_profile_instrument_memop -> calloc -> __llvm_profile_instrument_memop -> ...`
infinite loop leading to stack overflow
when the malloc implementation (e.g. tcmalloc) is built and instrumented along with the application.

We should figure out the library calls which may be instrumented and disable
their instrumentation before rolling out this change.

Reviewed By: yamauchi

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

3 years agolldb fix for b198de67e0bab462217db50814b1434796fa7caf (PCH/modular codegen refactor)
David Blaikie [Wed, 22 Jul 2020 20:08:54 +0000 (13:08 -0700)]
lldb fix for b198de67e0bab462217db50814b1434796fa7caf (PCH/modular codegen refactor)

3 years ago[SCCP] Add additional multi-edge + phi tests (NFC)
Nikita Popov [Wed, 22 Jul 2020 19:56:47 +0000 (21:56 +0200)]
[SCCP] Add additional multi-edge + phi tests (NFC)

3 years ago[SCCP] Regenerate test checks (NFC)
Nikita Popov [Wed, 22 Jul 2020 19:58:53 +0000 (21:58 +0200)]
[SCCP] Regenerate test checks (NFC)

And adjust the indbrtest4 test to actually test what it's supposed
to. BB1 is supposed to be eliminated here, but isn't, because
BB0 still branches to it. This was lost due to the incomplete CHECK
lines.

3 years ago[libc++] Make sure we only consider _GNUC_VER_NEW when the compiler is GCC
Louis Dionne [Wed, 22 Jul 2020 19:59:09 +0000 (15:59 -0400)]
[libc++] Make sure we only consider _GNUC_VER_NEW when the compiler is GCC

When the compiler is Clang, _GNUC_VER_NEW is 0, which messes up the logic.

3 years ago[llvm][NFC] const-ed MachineBlockFrequencyInfo::isIrrLoopHeader
Mircea Trofin [Wed, 22 Jul 2020 20:05:58 +0000 (13:05 -0700)]
[llvm][NFC] const-ed MachineBlockFrequencyInfo::isIrrLoopHeader

3 years agoasan_device_setup's wrapper scripts not handling args with spaces correctly
Andrew Grieve [Wed, 22 Jul 2020 19:53:57 +0000 (12:53 -0700)]
asan_device_setup's wrapper scripts not handling args with spaces correctly

Summary: Came up in Chromium: https://bugs.chromium.org/p/chromium/issues/detail?id=1103108#c21

Reviewers: eugenis

Reviewed By: eugenis

Subscribers: #sanitizers

Tags: #sanitizers

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

3 years agoMerge some of the PCH object support with modular codegen
David Blaikie [Sun, 12 Jul 2020 22:36:56 +0000 (15:36 -0700)]
Merge some of the PCH object support with modular codegen

I was trying to pick this up a bit when reviewing D48426 (& perhaps D69778) - in any case, looks like D48426 added a module level flag that might not be needed.

The D48426 implementation worked by setting a module level flag, then code generating contents from the PCH a special case in ASTContext::DeclMustBeEmitted would be used to delay emitting the definition of these functions if they came from a Module with this flag.

This strategy is similar to the one initially implemented for modular codegen that was removed in D29901 in favor of the modular decls list and a bit on each decl to specify whether it's homed to a module.

One major difference between PCH object support and modular code generation, other than the specific list of decls that are homed, is the compilation model: MSVC PCH modules are built into the object file for some other source file (when compiling that source file /Yc is specified to say "this compilation is where the PCH is homed"), whereas modular code generation invokes a separate compilation for the PCH alone. So the current modular code generation test of to decide if a decl should be emitted "is the module where this decl is serialized the current main file" has to be extended (as Lubos did in D69778) to also test the command line flag -building-pch-with-obj.

Otherwise the whole thing is basically streamlined down to the modular code generation path.

This even offers one extra material improvement compared to the existing divergent implementation: Homed functions are not emitted into object files that use the pch. Instead at -O0 they are not emitted into the IR at all, and at -O1 they are emitted using available_externally (existing functionality implemented for modular code generation). The pch-codegen test has been updated to reflect this new behavior.

[If possible: I'd love it if we could not have the extra MSVC-style way of accessing dllexport-pch-homing, and just do it the modular codegen way, but I understand that it might be a limitation of existing build systems. @hans / @thakis: Do either of you know if it'd be practical to move to something more similar to .pcm handling, where the pch itself is passed to the compilation, rather than homed as a side effect of compiling some other source file?]

Reviewers: llunak, hans

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

3 years ago[ARM] Fix missing MVE_VMUL_qr predicate
David Green [Wed, 22 Jul 2020 19:43:02 +0000 (20:43 +0100)]
[ARM] Fix missing MVE_VMUL_qr predicate

This was missed out of 1030e82598da, but hopefully fixes the issues
reported with NEON accidentally generating MVE instructions.

3 years ago[mlir][linalg] Add vectorization transform for CopyOp
Thomas Raoux [Wed, 22 Jul 2020 19:16:29 +0000 (12:16 -0700)]
[mlir][linalg] Add vectorization transform for CopyOp

CopyOp get vectorized to vector.transfer_read followed by vector.transfer_write

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

3 years ago[libc++] Workaround broken support for C++17 in GCC 5
Louis Dionne [Wed, 22 Jul 2020 19:24:16 +0000 (15:24 -0400)]
[libc++] Workaround broken support for C++17 in GCC 5

3 years ago[flang] Fix an assert when RESHAPE() is called on empty strings
Pete Steinfeld [Wed, 22 Jul 2020 18:33:35 +0000 (11:33 -0700)]
[flang] Fix an assert when RESHAPE() is called on empty strings

Summary:
When a constant array of empty strings goes through contant folding, the result
is something that contains no bytes.  If this array is passed to the intrinsic
function `RESHAPE()`, we were not handling things correctly.  I fixed this by
checking for an empty destination when calling the function `CopyFrom()` on an
array of strings.

I also added a test with a couple of different examples that trigger the
problem.

Reviewers: klausler, tskeith, DavidTruby

Subscribers: llvm-commits

Tags: #llvm

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

3 years ago[CGP] Add Pass Dependencies
Andrew Litteken [Wed, 22 Jul 2020 17:15:36 +0000 (10:15 -0700)]
[CGP] Add Pass Dependencies

Add pass dependecies:
  - TargetTransformInfoWrapperPass
  - TargetPassConfig
  - LoopInfoWrapperPass
  - TargetLibraryInfoWrapperPass

To fix inconsistencies when passes are added to the pipeline.

Reviewers: efriedma, kmclaughlin, paquette

Reviewed By: efriedma

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

3 years ago[libc++] Add static_assert to make sure rate limiter doesn't use locks
Louis Dionne [Wed, 22 Apr 2020 14:23:38 +0000 (10:23 -0400)]
[libc++] Add static_assert to make sure rate limiter doesn't use locks

We want to be sure that atomic<size_t> is always lock-free, or the code
will be much slower than expected (and could even conceivably fail if
the lock implementation somehow calls back into libc++abi).

3 years ago[libc++] Build the dylib with C++17 to allow aligned new/delete
Louis Dionne [Wed, 22 Apr 2020 15:15:05 +0000 (11:15 -0400)]
[libc++] Build the dylib with C++17 to allow aligned new/delete

This allows simplifying the implementation of barriers.

This is a re-commit of 1ac403bd145d, which had to be reverted in
64a9c944fc45 because the minimum CMake version wasn't high enough.
Now that we've upgraded, we can do this.

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

3 years ago[gn build] Port 418121c30a8
LLVM GN Syncbot [Wed, 22 Jul 2020 18:37:02 +0000 (18:37 +0000)]
[gn build] Port 418121c30a8

3 years ago[lldb] Use std::make_unique<DynamicRegisterInfo> (NFC)
Jonas Devlieghere [Wed, 22 Jul 2020 18:32:18 +0000 (11:32 -0700)]
[lldb] Use std::make_unique<DynamicRegisterInfo> (NFC)

3 years ago[SCCP] Add multi-edge switch + phi test case (NFC)
Nikita Popov [Wed, 22 Jul 2020 18:18:13 +0000 (20:18 +0200)]
[SCCP] Add multi-edge switch + phi test case (NFC)

3 years ago[PowerPC][Power10] Fix the Test LSB by Byte (xvtlsbb) Builtins Implementation
Amy Kwan [Wed, 22 Jul 2020 17:16:08 +0000 (12:16 -0500)]
[PowerPC][Power10] Fix the Test LSB by Byte (xvtlsbb) Builtins Implementation

The implementation of the xvtlsbb builtins/intrinsics were not correct as the
intrinsics previously used i1 as an argument type. This patch changes the i1
argument type used in these intrinsics to be i32 instead, as having the second
as an i1 can lead to issues in the backend.

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

3 years agoDwarfCompileUnit.cpp - remove duplicate includes that already exist in DwarfCompileUn...
Simon Pilgrim [Wed, 22 Jul 2020 18:00:28 +0000 (19:00 +0100)]
DwarfCompileUnit.cpp - remove duplicate includes that already exist in DwarfCompileUnit.h. NFC.

Also remove DIE.h include from DwarfCompileUnit.h and replace with forward declarations.

3 years agoCodeViewDebug.cpp - remove duplicate includes that already exist in CodeViewDebug...
Simon Pilgrim [Wed, 22 Jul 2020 17:02:43 +0000 (18:02 +0100)]
CodeViewDebug.cpp - remove duplicate includes that already exist in CodeViewDebug.h. NFC.

3 years ago[CMake] Bump CMake minimum version to 3.13.4
Louis Dionne [Wed, 22 Apr 2020 15:15:05 +0000 (11:15 -0400)]
[CMake] Bump CMake minimum version to 3.13.4

This upgrade should be friction-less because we've already been ensuring
that CMake >= 3.13.4 is used.

This is part of the effort discussed on llvm-dev here:

  http://lists.llvm.org/pipermail/llvm-dev/2020-April/140578.html

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

3 years agoRevert "Enable -Wsuggest-override in the LLVM build" and the follow-ups.
Hans Wennborg [Wed, 22 Jul 2020 18:12:18 +0000 (20:12 +0200)]
Revert "Enable -Wsuggest-override in the LLVM build" and the follow-ups.

After lots of follow-up fixes, there are still problems, such as
-Wno-suggest-override getting passed to the Windows Resource Compiler
because it was added with add_definitions in the CMake file.

Rather than piling on another fix, let's revert so this can be re-landed
when there's a proper fix.

This reverts commit 21c0b4c1e8d6a171899b31d072a47dac27258fc5.
This reverts commit 81d68ad27b29b1e6bc93807c6e42b14e9a77eade.
This reverts commit a361aa5249856e333a373df90947dabf34cd6aab.
This reverts commit fa42b7cf2949802ff0b8a63a2e111a2a68711067.
This reverts commit 955f87f947fda3072a69b0b00ca83c1f6a0566f6.
This reverts commit 8b16e45f66e24e4c10e2cea1b70d2b85a7ce64d5.
This reverts commit 308a127a38d1111f3940420b98ff45fc1c17715f.
This reverts commit 274b6b0c7a8b584662595762eaeff57d61c6807f.
This reverts commit 1c7037a2a5576d0bb083db10ad947a8308e61f65.

3 years ago[llvm][NFC] Remove definition from build system of LLVM_HAVE_TF_AOT
Mircea Trofin [Wed, 22 Jul 2020 18:16:08 +0000 (11:16 -0700)]
[llvm][NFC] Remove definition from build system of LLVM_HAVE_TF_AOT

We can just use the definition from config.h. This means we need to move
a few lines around in CMakeLists.txt - the TF_AOT detection needs to be
before the spot we process the config.h.cmake files.

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

3 years agoAArch64: Use Register
Matt Arsenault [Fri, 10 Jul 2020 17:57:11 +0000 (13:57 -0400)]
AArch64: Use Register

3 years agoGlobalISel: Don't use virtual for distinguishing arg handlers
Matt Arsenault [Thu, 9 Jul 2020 00:36:48 +0000 (20:36 -0400)]
GlobalISel: Don't use virtual for distinguishing arg handlers

There's no reason to involve the hassle of a virtual method targets
have to override for a simple boolean.

Not sure exactly what's going on with Mips, but it seems to define its
own totally separate handler classes.

3 years ago[gn build] (manually) port 746b5fad5b
Nico Weber [Wed, 22 Jul 2020 18:10:17 +0000 (14:10 -0400)]
[gn build] (manually) port 746b5fad5b

3 years ago[OpenMP] Implement TR8 `present` map type modifier in runtime (2/2)
Joel E. Denny [Wed, 22 Jul 2020 18:04:58 +0000 (14:04 -0400)]
[OpenMP] Implement TR8 `present` map type modifier in runtime (2/2)

This implements OpenMP runtime support for the OpenMP TR8 `present`
map type modifier.  The previous patch in this series implements Clang
front end support.  See that patch summary for behaviors that are not
yet supported.

Reviewed By: grokos, jdoerfert

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

3 years agoFix Windows build
Adrian Prantl [Wed, 22 Jul 2020 18:01:16 +0000 (11:01 -0700)]
Fix Windows build

3 years agoAMDGPU: Don't assert on f16 inv2pi immediates pre-gfx8
Matt Arsenault [Wed, 22 Jul 2020 16:27:50 +0000 (12:27 -0400)]
AMDGPU: Don't assert on f16 inv2pi immediates pre-gfx8

v_cvt_f32_f16 can still accept this value as a literal constant. This
showed up in GlobalISel since it doesn't have constant folding for
G_FPEXT.

3 years ago[clangd] Disable -Wsuggest-override for unittests/
Logan Smith [Wed, 22 Jul 2020 17:49:05 +0000 (10:49 -0700)]
[clangd] Disable -Wsuggest-override for unittests/

3 years ago[mlir][Vector] Vectorize integer matmuls
Benjamin Kramer [Wed, 22 Jul 2020 16:18:50 +0000 (18:18 +0200)]
[mlir][Vector] Vectorize integer matmuls

The underlying infrastructure supports this already, just add the
pattern matching for linalg.generic.

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

3 years ago[libcxx] Fix default argument for merge_archives.py -L flag
Alex Richardson [Wed, 22 Jul 2020 17:32:34 +0000 (18:32 +0100)]
[libcxx] Fix default argument for merge_archives.py -L flag

If we use the default of None, we get a python exception in
find_and_diagnose_missing() instead of printing a sensible error message.

Reviewed By: #libc, ldionne

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

3 years agoGlobalISel: Restructure argument lowering loop in handleAssignments
Matt Arsenault [Wed, 8 Jul 2020 13:11:53 +0000 (09:11 -0400)]
GlobalISel: Restructure argument lowering loop in handleAssignments

This was structured in a way that implied every split argument is in
memory, or in registers. It is possible to pass an original argument
partially in registers, and partially in memory. Transpose the logic
here to only consider a single piece at a time. Every individual
CCValAssign should be treated independently, and any merge to original
value needs to be handled later.

This is in preparation for merging some preprocessing hacks in the
AMDGPU calling convention lowering into the generic code.

I'm also not sure what the correct behavior for memlocs where the
promoted size is larger than the original value. I've opted to clamp
the memory access size to not exceed the value register to avoid the
explicit trunc/extend/vector widen/vector extract instruction. This
happens for AMDGPU for i8 arguments that end up stack passed, which
are promoted to i16 (I think this is a preexisting DAG bug though, and
they should not really be promoted when in memory).

3 years agoAMDGPU: Add IntrWillReturn to llvm.amdgcn.atomic.csub
Matt Arsenault [Wed, 22 Jul 2020 01:50:13 +0000 (21:50 -0400)]
AMDGPU: Add IntrWillReturn to llvm.amdgcn.atomic.csub

3 years ago[Sanitizers] Add interceptor for xdrrec_create
Gui Andrade [Wed, 22 Jul 2020 16:48:51 +0000 (16:48 +0000)]
[Sanitizers] Add interceptor for xdrrec_create

For now, xdrrec_create is only intercepted Linux as its signature
is different on Solaris.

The method of intercepting xdrrec_create isn't super ideal but I
couldn't think of a way around it: Using an AddrHashMap combined
with wrapping the userdata field.

We can't just allocate a handle on the heap in xdrrec_create and leave
it at that, since there'd be no way to free it later. This is because it
doesn't seem to be possible to access handle from the XDR struct, which
is the only argument to xdr_destroy.
On the other hand, the callbacks don't have a way to get at the
x_private field of XDR, which is what I chose for the HashMap key. So we
need to wrap the handle parameter of the callbacks. But we can't just
pass x_private as handle (as it hasn't been set yet). We can't put the
wrapper struct into the HashMap and pass its pointer as handle, as the
key we need (x_private again) hasn't been set yet.

So I allocate the wrapper struct on the heap, pass its pointer as
handle, and put it into the HashMap so xdr_destroy can find it later and
destroy it.

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

3 years ago[profile][test] Add -fuse-ld=bfd to make instrprof-lto-pgogen.c robust
Fangrui Song [Wed, 22 Jul 2020 17:15:51 +0000 (10:15 -0700)]
[profile][test] Add -fuse-ld=bfd to make instrprof-lto-pgogen.c robust

Otherwise if 'ld' is an older system LLD (FreeBSD; or if someone adds 'ld' to
point to an LLD from a different installation) which does not support the
current ModuleSummaryIndex::BitCodeSummaryVersion, the test will fail.

Add lit feature 'binutils_lto'. GNU ld is more common than GNU gold, so
we can just require 'is_binutils_lto_supported' to additionally support GNU ld.

Reviewed By: myhsu

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

3 years agoAMDGPU/GlobalISel: Fix translation of indirect calls
Matt Arsenault [Wed, 22 Jul 2020 17:05:51 +0000 (13:05 -0400)]
AMDGPU/GlobalISel: Fix translation of indirect calls

3 years ago[WebAssembly] Autogenerate checks in simd-offset.ll
Thomas Lively [Wed, 22 Jul 2020 17:12:26 +0000 (10:12 -0700)]
[WebAssembly] Autogenerate checks in simd-offset.ll

Implementing new functionality tested in this file requires adding new
tests for many IR addressing patterns, which can be a large
maintenance burden. This patch makes adding tests easier by switching
to using autogenerated checks. This patch also removes the testing
mode that has simd128 disabled because it would produce very large
checks and is not particularly interesting.

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

3 years agoReapply "Rename InlineFeatureAnalysis to FunctionPropertiesAnalysis"
Tarindu Jayatilaka [Wed, 22 Jul 2020 16:52:53 +0000 (09:52 -0700)]
Reapply "Rename InlineFeatureAnalysis to FunctionPropertiesAnalysis"

(This reverts commit a5e0194709c40212694370e0ea789a1ca14548b5, and
corrects author).

Rename the pass to be able to extend it to function properties other than inliner features.

    Reviewed By: mtrofin

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

3 years agoOnly enable -Wsuggest-override if it doesn't suggest adding override to functions...
Logan Smith [Wed, 22 Jul 2020 17:03:49 +0000 (10:03 -0700)]
Only enable -Wsuggest-override if it doesn't suggest adding override to functions that are already final

A previous patch added -Wsuggest-override using a simple add_flag_if_supported(). This causes lots of warnings in LLVM when building with older GCC versions (< 9.2) which suggest adding override to functions that are only marked final. The current flags in both GCC >=9.2 and Clang accept plain final as equivalent to override final.

This patch adds logic to detect versions of -Wsuggest-override that warn on void foo() final and disables them to avoid warning spam in builds using older GCC's. This has the added minor benefit of getting rid of the useless C_SUPPORTS_SUGGEST_OVERRIDE_FLAG CMake cache variable which was set by add_flag_if_supported().

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

3 years ago[gn build] Port a5e0194709c
LLVM GN Syncbot [Wed, 22 Jul 2020 16:56:06 +0000 (16:56 +0000)]
[gn build] Port a5e0194709c

3 years ago[gn build] Port 2a6c871596c
LLVM GN Syncbot [Wed, 22 Jul 2020 16:56:05 +0000 (16:56 +0000)]
[gn build] Port 2a6c871596c

3 years ago[lldb] Cleanup CommandObject registration (NFC)
Jonas Devlieghere [Wed, 22 Jul 2020 16:51:24 +0000 (09:51 -0700)]
[lldb] Cleanup CommandObject registration (NFC)

 - Remove the spurious argument to `CommandObjectScript`.
 - Use make_shared instead of bare `new`.
 - Move code duplication behind a macro.

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

3 years ago[gn build] Handle X86InstCombineIntrinsic.cpp in 2a6c871596ce
Fangrui Song [Wed, 22 Jul 2020 16:49:08 +0000 (09:49 -0700)]
[gn build] Handle X86InstCombineIntrinsic.cpp in 2a6c871596ce

3 years ago[MSAN] Instrument libatomic load/store calls
Gui Andrade [Wed, 22 Jul 2020 16:34:55 +0000 (16:34 +0000)]
[MSAN] Instrument libatomic load/store calls

These calls are neither intercepted by compiler-rt nor is libatomic.a
naturally instrumented.

This patch uses the existing libcall mechanism to detect a call
to atomic_load or atomic_store, and instruments them much like
the preexisting instrumentation for atomics.

Calls to _load are modified to have at least Acquire ordering, and
calls to _store at least Release ordering. Because this needs to be
converted at runtime, msan injects a LUT (implemented as a vector
with extractelement).

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

3 years agoRevert "Rename InlineFeatureAnalysis to FunctionPropertiesAnalysis"
Mircea Trofin [Wed, 22 Jul 2020 16:42:17 +0000 (09:42 -0700)]
Revert "Rename InlineFeatureAnalysis to FunctionPropertiesAnalysis"

This reverts commit 44a6bda19b40f2dfcbe92fc3d58bb6276c71ef78. I forgot
to correctly attibute it to tarinduj. Fixing and resubmitting.

3 years ago[gn build] Port 2a6c871596ce & 44a6bda19b40
Fangrui Song [Wed, 22 Jul 2020 16:40:41 +0000 (09:40 -0700)]
[gn build] Port 2a6c871596ce & 44a6bda19b40

3 years ago[ARM] Add predicated add reduction patterns
David Green [Wed, 22 Jul 2020 16:30:02 +0000 (17:30 +0100)]
[ARM] Add predicated add reduction patterns

Given a vecreduce.add(select(p, x, 0)), we can convert that to a
predicated vaddv, as the else value for the select is the identity
value, a zero. That is what this patch does for the vaddv, vaddva,
vaddlv and vaddlva instructions, copying the existing patterns to also
handle predication through a select.

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

3 years ago[Sema][AArch64] Add semantics for arm_sve_vector_bits attribute
Cullen Rhodes [Tue, 9 Jun 2020 13:19:35 +0000 (13:19 +0000)]
[Sema][AArch64] Add semantics for arm_sve_vector_bits attribute

Summary:
This patch implements semantics for the 'arm_sve_vector_bits' type
attribute, defined by the Arm C Language Extensions (ACLE) for SVE [1].
The purpose of this attribute is to define fixed-length (VLST) versions
of existing sizeless types (VLAT).

Implemented in this patch is the the behaviour described in section 3.7.3.2
and minimal parts of sections 3.7.3.3 and 3.7.3.4, this includes:

    * Defining VLST globals, structs, unions, and local variables
    * Implicit casting between VLAT <=> VLST.
    * Diagnosis of ill-formed conditional expressions of the form:

        C ?  E1 : E2

      where E1 is a VLAT type and E2 is a VLST, or vice-versa. This
      avoids any ambiguity about the nature of the result type (i.e is
      it sized or sizeless).
    * For vectors:
        * sizeof(VLST) == N/8
        * alignof(VLST) == 16
    * For predicates:
        * sizeof(VLST) == N/64
        * alignof(VLST) == 2

VLSTs have the same representation as VLATs in the AST but are wrapped
with a TypeAttribute. Scalable types are currently emitted in the IR for
uses such as globals and structs which don't support these types, this
is addressed in the next patch with codegen, where VLSTs are lowered to
sized arrays for globals, structs / unions and arrays.

Not implemented in this patch is the behaviour guarded by the feature
macros:

    * __ARM_FEATURE_SVE_VECTOR_OPERATORS
    * __ARM_FEATURE_SVE_PREDICATE_OPERATORS

As such, the GNU __attribute__((vector_size)) extension is not available
and operators such as binary '+' are not supported for VLSTs. Support
for this is intended to be addressed by later patches.

[1] https://developer.arm.com/documentation/100987/latest

This is patch 2/4 of a patch series.

Reviewers: sdesmalen, rsandifo-arm, efriedma, cameron.mcinally, ctetreau, rengolin, aaron.ballman

Reviewed By: aaron.ballman

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

3 years ago[ADT] Delete unused llvm::pointer_union_detail::AssignableFrom
Fangrui Song [Wed, 22 Jul 2020 16:23:52 +0000 (09:23 -0700)]
[ADT] Delete unused llvm::pointer_union_detail::AssignableFrom

Noticed by Zhiwei Chen

3 years agoRename InlineFeatureAnalysis to FunctionPropertiesAnalysis
Mircea Trofin [Wed, 22 Jul 2020 16:24:15 +0000 (09:24 -0700)]
Rename InlineFeatureAnalysis to FunctionPropertiesAnalysis

 Rename the pass to be able to extend it to function properties other than inliner features.

Reviewed By: mtrofin

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

3 years agoThread ExecutionContextScope through GetByteSize where possible (NFC-ish)
Adrian Prantl [Tue, 21 Jul 2020 20:53:43 +0000 (13:53 -0700)]
Thread ExecutionContextScope through GetByteSize where possible (NFC-ish)

This patch has no effect for C and C++. In more dynamic languages,
such as Objective-C and Swift GetByteSize() needs to call into the
language runtime, so it's important to pass one in where possible. My
primary motivation for this is some work I'm doing on the Swift
branch, however, it looks like we are also seeing warnings in
Objective-C that this may resolve.  Everything in the SymbolFile
hierarchy still passes in nullptrs, because we don't have an execution
context in SymbolFile, since SymbolFile transcends processes.

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

3 years ago[NFC][NewPM] Add clarification on analysis manager proxies
Arthur Eubanks [Wed, 22 Jul 2020 15:40:55 +0000 (08:40 -0700)]
[NFC][NewPM] Add clarification on analysis manager proxies

Explain why you can only get a cached analysis result, not compute one
on the fly.

Reviewed By: asbirlea

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

3 years agoProfileSummaryInfo.h - remove unnecessary ProfileSummary forward declaration. NFCI.
Simon Pilgrim [Wed, 22 Jul 2020 14:18:32 +0000 (15:18 +0100)]
ProfileSummaryInfo.h - remove unnecessary ProfileSummary forward declaration. NFCI.

This is defined in ProfileSummary.h which we have to explicitly include already.

3 years ago[SLP][Test] Precommit tests for D83779. NFC.
Anton Afanasyev [Thu, 16 Jul 2020 14:57:33 +0000 (17:57 +0300)]
[SLP][Test] Precommit tests for D83779. NFC.

3 years agoRevert "[OpenMP] Implement TR8 `present` map type modifier in runtime (2/2)"
Joel E. Denny [Wed, 22 Jul 2020 15:22:08 +0000 (11:22 -0400)]
Revert "[OpenMP] Implement TR8 `present` map type modifier in runtime (2/2)"

This reverts commit 45b8f7ec35ef653bafdf48034857222517c17781.

It attempts to use debug macros `DPxMOD` and `DPxPTR` in release
builds.  Will fix and reapply later.

3 years agoRevert abd45154b "[Coverage] Add comment to skipped regions"
Hans Wennborg [Wed, 22 Jul 2020 15:01:57 +0000 (17:01 +0200)]
Revert abd45154b "[Coverage] Add comment to skipped regions"

This casued assertions during Chromium builds. See comment on the code review

> Bug filled here: https://bugs.llvm.org/show_bug.cgi?id=45757.
> Add comment to skipped regions so we don't track execution count for lines containing only comments.
>
> Differential Revision: https://reviews.llvm.org/D84208

This reverts commit abd45154bdb6b76c5b480455eacc8c75b08242aa and the
follow-up 87d725473380652bbe845fd2fbd9c0507a55172f.

3 years agoFix target specific InstCombine
Sebastian Neubauer [Wed, 22 Jul 2020 15:00:43 +0000 (17:00 +0200)]
Fix target specific InstCombine

A clang arm test was failing if clang is compiled without arm support.

Regression was introduced in 2a6c871596ce8bdd23501a96fd22f0f16d3cfcad

3 years ago[CodeMoverUtils] Add more data dependency related test case
SharmaRithik [Wed, 22 Jul 2020 14:42:57 +0000 (20:12 +0530)]
[CodeMoverUtils] Add more data dependency related test case
Summary: This patch adds more test case focusing on data dependency.
Authored By: RithikSharma
Reviewer: Whitney, bmahjour, etiotto
Reviewed By: Whitney
Subscribers: llvm-commits
Tag: LLVM
Differential Revision: https://reviews.llvm.org/D83543

3 years ago[lldb] add printing of stdout compile errors to lldbsuite
Benson Li [Wed, 22 Jul 2020 14:22:59 +0000 (16:22 +0200)]
[lldb] add printing of stdout compile errors to lldbsuite

Summary: Add printing of the output of stdout during compile errors, in
addition to stderr output.

Reviewed By: labath

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

3 years ago[llvm-readobj] - Don't get the name of the symbol table in ELFDumper<ELFT>::printSymb...
Georgii Rymar [Tue, 21 Jul 2020 10:13:01 +0000 (13:13 +0300)]
[llvm-readobj] - Don't get the name of the symbol table in ELFDumper<ELFT>::printSymbolsHelper.

It was requested in D84173 thread to not do it, because otherwise we extract and
check the name of the symbol table in LLVM style, but do not use it and
might report a warning which perhaps might be confusing.

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

3 years ago[SCEVExpander] Fix indentation/formatting (NFC).
Florian Hahn [Wed, 22 Jul 2020 13:53:22 +0000 (14:53 +0100)]
[SCEVExpander] Fix indentation/formatting (NFC).

The declarations inside the llvm namespace where indented too much. Fix
it by re-running clang-format on the whole file.

3 years ago[AMDGPU][MC] Corrected decoding of 16-bit literals
Dmitry Preobrazhensky [Wed, 22 Jul 2020 14:16:59 +0000 (17:16 +0300)]
[AMDGPU][MC] Corrected decoding of 16-bit literals

16-bit literals are encoded as 32-bit values. If high 16-bits of the value is 0xFFFF, the decoded instruction cannot be reassembled.

For example, the following code

0xff,0x04,0x04,0x52,0xcd,0xab,0xff,0xff

was decoded as

v_mul_lo_u16_e32 v2, 0xffffabcd, v2

However this literal is actually a 64-bit constant 0x00000000ffffabcd which violates requirements described in the documentation - the truncation is not safe.

This change corrects decoding to make reassembly possible.

Reviewers: arsenm, rampitec

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

3 years ago[compiler-rt] fix build on Illumos
David Carlier [Wed, 22 Jul 2020 14:15:45 +0000 (15:15 +0100)]
[compiler-rt] fix build on Illumos

- there are additional fields for glob_t struct, thus size check is failing.
- to access old mman.h api based on caddr_t, _XOPEN_SOURCE needs to be not defined
 thus we provide the prototype.
- prxmap_t constified.

Reviewers: ro, eugenis

Reviewed-By: ro
Differential Revision: https://reviews.llvm.org/D84046

3 years ago[OpenMP] Implement TR8 `present` map type modifier in runtime (2/2)
Joel E. Denny [Wed, 22 Jul 2020 14:14:30 +0000 (10:14 -0400)]
[OpenMP] Implement TR8 `present` map type modifier in runtime (2/2)

This implements OpenMP runtime support for the OpenMP TR8 `present`
map type modifier.  The previous patch in this series implements Clang
front end support.  See that patch summary for behaviors that are not
yet supported.

Reviewed By: grokos, jdoerfert

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

3 years ago[OpenMP] Implement TR8 `present` map type modifier in Clang (1/2)
Joel E. Denny [Wed, 22 Jul 2020 14:14:00 +0000 (10:14 -0400)]
[OpenMP] Implement TR8 `present` map type modifier in Clang (1/2)

This patch implements Clang front end support for the OpenMP TR8
`present` map type modifier.  The next patch in this series implements
OpenMP runtime support.

This patch does not attempt to implement TR8 sec. 2.22.7.1 "map
Clause", p. 319, L14-16:

> If a map clause with a present map-type-modifier is present in a map
> clause, then the effect of the clause is ordered before all other
> map clauses that do not have the present modifier.

Compare to L10-11, which Clang does not appear to implement yet:

> For a given construct, the effect of a map clause with the to, from,
> or tofrom map-type is ordered before the effect of a map clause with
> the alloc, release, or delete map-type.

This patch also does not implement the `present` implicit-behavior for
`defaultmap` or the `present` motion-modifier for `target update`.

Reviewed By: ABataev

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

3 years ago[PowerPC] Add linker opt for PC Relative GOT indirect accesses
Stefan Pintilie [Tue, 21 Jul 2020 19:29:54 +0000 (14:29 -0500)]
[PowerPC] Add linker opt for PC Relative GOT indirect accesses

A linker optimization is available on PowerPC for GOT indirect PCRelative loads.

The idea is that we can mark a usual GOT indirect load:

pld 3, vec@got@pcrel(0), 1
lwa 3, 4(3)

With a relocation to say that if we don't need to go through the GOT we can let
the linker further optimize this and replace a load with a nop.

  pld 3, vec@got@pcrel(0), 1
.Lpcrel1:
.reloc .Lpcrel1-8,R_PPC64_PCREL_OPT,.-(.Lpcrel1-8)
  lwa 3, 4(3)

This patch adds the logic that allows the compiler to add the R_PPC64_PCREL_OPT.

Reviewers: nemanjai, lei, hfinkel, sfertile, efriedma, tstellar, grosbach

Reviewed By: nemanjai

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

3 years ago[XCOFF] Enable symbol alias for AIX
jasonliu [Fri, 17 Jul 2020 18:40:02 +0000 (18:40 +0000)]
[XCOFF] Enable symbol alias for AIX

Summary:
AIX assembly's .set directive is not usable for aliasing purpose.
We need to use extra-label-at-defintion strategy to generate symbol
aliasing on AIX.

Reviewed By: DiggerLin, Xiangling_L

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

3 years ago[InstCombine] Move target-specific inst combining
Sebastian Neubauer [Wed, 3 Jun 2020 13:56:40 +0000 (15:56 +0200)]
[InstCombine] Move target-specific inst combining

For a long time, the InstCombine pass handled target specific
intrinsics. Having target specific code in general passes was noted as
an area for improvement for a long time.

D81728 moves most target specific code out of the InstCombine pass.
Applying the target specific combinations in an extra pass would
probably result in inferior optimizations compared to the current
fixed-point iteration, therefore the InstCombine pass resorts to newly
introduced functions in the TargetTransformInfo when it encounters
unknown intrinsics.
The patch should not have any effect on generated code (under the
assumption that code never uses intrinsics from a foreign target).

This introduces three new functions:
TargetTransformInfo::instCombineIntrinsic
TargetTransformInfo::simplifyDemandedUseBitsIntrinsic
TargetTransformInfo::simplifyDemandedVectorEltsIntrinsic

A few target specific parts are left in the InstCombine folder, where
it makes sense to share code. The largest left-over part in
InstCombineCalls.cpp is the code shared between arm and aarch64.

This allows to move about 3000 lines out from InstCombine to the targets.

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

3 years agoDebugSubsectionVisitor.h - remove unnecessary includes/forward declarations. NFC.
Simon Pilgrim [Wed, 22 Jul 2020 13:12:36 +0000 (14:12 +0100)]
DebugSubsectionVisitor.h - remove unnecessary includes/forward declarations. NFC.

We don't need the StringsAndChecksumsRef forward declaration as we have to include StringsAndChecksums.h.
We don't need DebugSubsectionRecord.h and we forward declare all referenced classes.
We don't need to include cstdint as we don't use any stdint types.

3 years agoSelectionDAGBuilder.cpp - remove duplicate includes that already exist in SelectionDA...
Simon Pilgrim [Wed, 22 Jul 2020 12:21:45 +0000 (13:21 +0100)]
SelectionDAGBuilder.cpp - remove duplicate includes that already exist in SelectionDAGBuilder.h. NFC.

3 years agoMappedBlockStream.h - remove unnecessary MSFLayout forward declaration. NFCI.
Simon Pilgrim [Mon, 20 Jul 2020 15:14:22 +0000 (16:14 +0100)]
MappedBlockStream.h - remove unnecessary MSFLayout forward declaration. NFCI.

This is defined in MSFCommon.h which we have to explicitly include already.

3 years ago[SLP]Add an extra test for vectorization of non-pow-2 trees, NFC.
Alexey Bataev [Wed, 22 Jul 2020 13:03:30 +0000 (09:03 -0400)]
[SLP]Add an extra test for vectorization of non-pow-2 trees, NFC.

3 years ago[NFC][Reduce] Add a test showing that we fail to to reduce single/last feature
Roman Lebedev [Wed, 22 Jul 2020 13:09:51 +0000 (16:09 +0300)]
[NFC][Reduce] Add a test showing that we fail to to reduce single/last feature

3 years ago[NFC][Reduce] Rewrite remove-funcs.ll to use FileCheck, make it less fragile
Roman Lebedev [Wed, 22 Jul 2020 13:07:13 +0000 (16:07 +0300)]
[NFC][Reduce] Rewrite remove-funcs.ll to use FileCheck, make it less fragile

3 years ago[ARM] Extra MVE select(binop) patterns
David Green [Wed, 22 Jul 2020 13:08:29 +0000 (14:08 +0100)]
[ARM] Extra MVE select(binop) patterns

This is very similar to 243970d03cace2, but handling a slightly
different form of predicated operations. When starting with a pattern of
the form select(p, BinOp(x, y), x), Instcombine will often transform
this to BinOp(x, select(p, y, 0)), where 0 is the identity value of the
binop (0 for adds/subs, 1 for muls, -1 for ands etc). This adds the
patterns that transforms those back into predicated binary operations.

There is also a very minor adjustment to tablegen null_frag in here, to
allow it to also be recognized as a PatLeaf node, so that it can be used
in MVE_TwoOpPattern to easily exclude the cases where we do not need the
alternate transform.

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

3 years ago[clangd] Fixes in lit tests
Aleksandr Platonov [Wed, 22 Jul 2020 12:59:36 +0000 (15:59 +0300)]
[clangd] Fixes in lit tests

Summary:
Changes:
- `background-index.test` Add Windows support, don't create redundant `*-e` files on macOS
- `did-change-configuration-params.test` Replace `cat | FileCheck` with `FileCheck --input-file`
- `test-uri-windows.test` This test did not run on Windows displite `REQUIRES: windows-gnu || windows-msvc` (replacement: `UNSUPPORTED: !(windows-gnu || windows-msvc)`).

Reviewers: sammccall, kadircet

Reviewed By: kadircet

Subscribers: thakis, njames93, ormris, ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, usaxena95, cfe-commits

Tags: #clang

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

3 years ago[ARM] Add patterns for select(p, BinOp(x, y), z) -> BinOpT(x, y,p z)
David Green [Wed, 22 Jul 2020 12:24:01 +0000 (13:24 +0100)]
[ARM] Add patterns for select(p, BinOp(x, y), z) -> BinOpT(x, y,p z)

Most MVE instructions can be predicated to fold a select into the
instruction, using the predicate and the selects else as a passthough.
This adds tablegen patterns for most two operand instructions using the
newly added TwoOpPattern from 1030e82598da.

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

3 years ago[DebugInfo] Drop location ranges for variables which exist entirely outside the varia...
OCHyams [Wed, 22 Jul 2020 08:25:14 +0000 (09:25 +0100)]
[DebugInfo] Drop location ranges for variables which exist entirely outside the variable's scope

Summary:
This patch reduces file size in debug builds by dropping variable locations a
debugger user will not see.

After building the debug entity history map we loop through it. For each
variable we look at each entry. If the entry opens a location range which does
not intersect any of the variable's scope's ranges then we mark it for removal.
After visiting the entries for each variable we also mark any clobbering
entries which will no longer be referenced for removal, and then finally erase
the marked entries. This all requires the ability to query the order of
instructions, so before this runs we number them.

Tests:
Added llvm/test/DebugInfo/X86/trim-var-locs.mir

Modified llvm/test/DebugInfo/COFF/register-variables.ll
  Branch folding merges the tails of if.then and if.else into if.else. Each
  blocks' debug-locations point to different scopes so when they're merged we
  can't use either. Because of this the variable 'c' ends up with a location
  range which doesn't cover any instructions in its scope; with the patch
  applied the location range is dropped and its flag changes to IsOptimizedOut.

Modified llvm/test/DebugInfo/X86/live-debug-variables.ll
Modified llvm/test/DebugInfo/ARM/PR26163.ll
  In both tests an out of scope location is now removed. The remaining location
  covers the entire scope of the variable allowing us to emit it as a single
  location.

Reviewed By: aprantl

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

3 years ago[llvm-readelf] - Introduce describe() helper functions.
Georgii Rymar [Tue, 21 Jul 2020 13:48:39 +0000 (16:48 +0300)]
[llvm-readelf] - Introduce describe() helper functions.

These functions can be used to generate strings like
"SHT_?? section with index ?" to describe sections in error/warning messages,
what helps to simplify and generalize them.

Also this allows to isolate the following common code pattern:
`&Sec - &cantFail(Obj->sections()).front();`

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

3 years ago[AMDGPU] Don't combine memory intrs to v3i16
Sebastian Neubauer [Tue, 21 Jul 2020 08:28:12 +0000 (10:28 +0200)]
[AMDGPU] Don't combine memory intrs to v3i16

v3i16 and v3f16 currently cannot be legalized and lowered so they should
not be emitted by inst combining.

Moved the check down to still allow extracting 1 or 2 elements via the dmask.

Fixes image intrinsics being combined to return v3x16.

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

3 years ago[lAA] Return SmallVectorImpl& instead of SmallVector& (NFC).
Florian Hahn [Wed, 22 Jul 2020 10:33:57 +0000 (11:33 +0100)]
[lAA] Return SmallVectorImpl& instead of SmallVector& (NFC).

3 years ago[llvm-readelf/readobj] - Fix the behavior when a sections is included in two groups...
Georgii Rymar [Mon, 20 Jul 2020 13:28:17 +0000 (16:28 +0300)]
[llvm-readelf/readobj] - Fix the behavior when a sections is included in two groups at the same time.

The current behavior was introduced by me in D37567 and it is a bit strange. It prints the
"Error: ...." message to the errs() manually and stops dumping the group section which has this error.
This behavior is consistent with GNU though, but it is very inconsistent with what the regular llvm-readelf
code usually does/prints, so I suggest to change the implementation:

1) Instead of printing "Error: ...." to errs() - just report a warning.
2) Try to continue dumping the section.
3) Merge broken-group.test to group.text.

This is what this patch does.

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

3 years ago[PowerPC] fixupIsDeadOrKill start and end in different block fixing
Chen Zheng [Wed, 22 Jul 2020 10:01:52 +0000 (06:01 -0400)]
[PowerPC] fixupIsDeadOrKill start and end in different block fixing

In fixupIsDeadOrKill, we assume StartMI and EndMI not exist in same
basic block, so we add an assertion in that function. This is wrong
before RA, as before RA the true definition may exist in another
block through copy like instructions.

Reviewed By: nemanjai

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

3 years ago[OpenMP][NFC] pass on env variables to libomptarget tests
Joachim Protze [Wed, 22 Jul 2020 10:14:28 +0000 (12:14 +0200)]
[OpenMP][NFC] pass on env variables to libomptarget tests

3 years ago[clangd] Fix conversion from Windows UNC paths to file URI format.
Ilya Golovenko [Wed, 22 Jul 2020 10:13:08 +0000 (12:13 +0200)]
[clangd] Fix conversion from Windows UNC paths to file URI format.

Summary:
The fix improves handling of Windows UNC paths to align with Appendix E. Nonstandard Syntax Variations of RFC 8089.

Before this fix it was difficult to use Windows UNC paths in compile_commands.json database as such paths were converted to file URIs using 'file:////auth/share/file.cpp' notation instead of recommended 'file://auth/share/file.cpp'.

As an example, VS.Code cannot understand file URIs with 4 starting slashes, thus such features as go-to-definition, jump-to-file, hover tooltip, etc. stop working. This also applicable to files which reside on Windows network-mapped drives because clangd internally resolves file paths to real paths in some cases and such paths get resolved to UNC paths.

Reviewers: sammccall, kadircet

Reviewed By: sammccall

Subscribers: ormris, ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, usaxena95, kbobyrev, cfe-commits

Tags: #clang

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

3 years ago[llvm-readobj/readelf] - Don't fail dumping when unable to read the name of the SHT_D...
Georgii Rymar [Mon, 20 Jul 2020 14:30:52 +0000 (17:30 +0300)]
[llvm-readobj/readelf] - Don't fail dumping when unable to read the name of the SHT_DYNSYM section.

We have an issue currently: we are trying to read the name of the SHT_DYNSYM section
very early and using `unwrapOrError` call for that.

The name is needed only for the GNU output. Because of the current logic, the tool
fails to dump the whole object when something is wrong with the name of the .dynsym section.

This patch delays reading the name and also allows it to be broken.

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

3 years ago[Test] Add more simple tests for PR46786
Max Kazantsev [Wed, 22 Jul 2020 10:10:36 +0000 (17:10 +0700)]
[Test] Add more simple tests for PR46786

3 years ago[sanitizer,NFC] InternalAlloc cleanup
Vitaly Buka [Wed, 22 Jul 2020 10:01:34 +0000 (03:01 -0700)]
[sanitizer,NFC] InternalAlloc cleanup