platform/upstream/llvm.git
3 years ago[SDAG] allow cast folding for vector sext-of-setcc with signed compare
Sanjay Patel [Wed, 2 Jun 2021 19:01:04 +0000 (15:01 -0400)]
[SDAG] allow cast folding for vector sext-of-setcc with signed compare

This extends 434c8e013a2c and ede3982792df to handle signed
predicates by sign-extending the setcc operands.

This is not shown directly in https://llvm.org/PR50055 ,
but the pattern is visible by changing the unsigned convert
to signed in the source code.

3 years ago[llvm-dwp] Skip type unit debug info sections
Kim-Anh Tran [Wed, 2 Jun 2021 18:48:02 +0000 (11:48 -0700)]
[llvm-dwp] Skip type unit debug info sections

This patch makes llvm-dwp skip debug info sections that may not be encoding a compile unit.
In DWARF5, debug info sections are also used for type units. As in preparation to support type units,
make llvm-dwp aware of other uses of debug info sections but skip them for now.

The patch first records all .debug_info sections, then goes through them one by one and records
the cu debug info section for writing the index unit, and copies that section to the final dwp output
info section. If it's not a compile unit, skip.

Reviewed By: dblaikie

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

3 years agoFix dfsan handling of musttail calls.
Andrew Browne [Wed, 2 Jun 2021 05:51:46 +0000 (22:51 -0700)]
Fix dfsan handling of musttail calls.

Without this change, a callsite like:
  [[clang::musttail]] return func_call(x);
will cause an error like:
  fatal error: error in backend: failed to perform tail call elimination
  on a call site marked musttail
due to DFSan inserting instrumentation between the musttail call and
the return.

Reviewed By: stephan.yichao.zhao

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

3 years ago[NFC] Remove variable that was set but not used.
Stefan Pintilie [Wed, 2 Jun 2021 18:16:15 +0000 (13:16 -0500)]
[NFC] Remove variable that was set but not used.

The buildbot ppc64le-lld-multistage-test has been failing because the variable
Tag in Waymaking.h is set but not used. This patch removes that varaible.

3 years ago[x86] add signed compare variant test for PR50055; NFC
Sanjay Patel [Wed, 2 Jun 2021 18:14:29 +0000 (14:14 -0400)]
[x86] add signed compare variant test for PR50055; NFC

3 years ago[mlir-lsp] Report range of potential identifier starting at location of diagnostic
Jacques Pienaar [Wed, 2 Jun 2021 17:49:53 +0000 (10:49 -0700)]
[mlir-lsp] Report range of potential identifier starting at location of diagnostic

Currently the diagnostics reports the file:line:col, but some LSP
frontends require a non-empty range. Report either the range of an
identifier that starts at location, or a range of 1. Expose the id
location to range helper and reuse here.

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

3 years ago[SampleFDO] New hierarchical discriminator for FS SampleFDO (ProfileData part)
Rong Xu [Thu, 27 May 2021 18:34:22 +0000 (11:34 -0700)]
[SampleFDO] New hierarchical discriminator for FS SampleFDO (ProfileData part)

This patch was split from https://reviews.llvm.org/D102246
[SampleFDO] New hierarchical discriminator for Flow Sensitive SampleFDO
This is mainly for ProfileData part of change. It will load
FS Profile when such profile is detected. For an extbinary format profile,
create_llvm_prof tool will add a flag to profile summary section.
For other format profiles, the users need to use an internal option
(-profile-isfs) to tell the compiler that the profile uses FS discriminators.

This patch also simplified the bit API used by FS discriminators.

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

3 years agoImprove performance when parsing symbol tables in mach-o files.
Greg Clayton [Wed, 2 Jun 2021 04:52:31 +0000 (21:52 -0700)]
Improve performance when parsing symbol tables in mach-o files.

Some larger projects were loading quite slowly with the current LLDB on macOS and macOS simulator builds. I did some instrument traces and found 3 main culprits:
- a LLDB timer that was put into a function that was called too often
- a std::set that was keeping track of the address of symbols that were already added
- a unnamed function generator in ObjectFile that was going slow due to allocations

In order to see this in action I ran the latest LLDB on a large application with many frameworks using the following method:

(lldb) script import time; start_time = time.perf_counter()
(lldb) file Large.app
(lldb) script print(time.perf_counter() - start_time)

I first range "sudo purge" to clear the system file caches to simulate a cold startup of the debugger, followed by two iterations with warm file caches.

Prior to this fix I was seeing the following timings:

17.68 (cold)
14.56 (warm 1)
14.52 (warm 2)

After this fix I was seeing:

11.32 (cold)
8.43 (warm 1)
8.49 (warm 2)

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

3 years agoFix -Wsign-compare warning (NFC)
Mehdi Amini [Wed, 2 Jun 2021 17:28:19 +0000 (17:28 +0000)]
Fix -Wsign-compare warning (NFC)

3 years agoAdd matchers for gtest's ASSERT_THAT, EXPECT_THAT, ON_CALL and EXPECT_CALL
Zhaomo Yang [Wed, 2 Jun 2021 13:24:24 +0000 (13:24 +0000)]
Add matchers for gtest's ASSERT_THAT, EXPECT_THAT, ON_CALL and EXPECT_CALL

This patch adds support for matching gtest's ASSERT_THAT, EXPECT_THAT, ON_CALL and EXPECT_CALL macros.

Reviewed By: ymandel, hokein

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

3 years ago[MLIR] Fix Standalone dialect test to work in out-of-tree builds
Krzysztof Drewniak [Wed, 2 Jun 2021 17:21:17 +0000 (17:21 +0000)]
[MLIR] Fix Standalone dialect test to work in out-of-tree builds

When LLVM and MLIR are built as subprojects (via add_subdirectory),
the CMake configuration that indicates where the MLIR libraries are is
not necessarily in the same cmake/ directory as LLVM's configuration.
This patch removes that assumption about where MLIRConfig.cmake is
located.

(As an additional none, the %llvm_lib_dir substitution was never
defined, and so find_package(MLIR) in the build was succeeding for
other reasons.)

Reviewed By: stephenneuendorffer

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

3 years ago[lldb] Preserve type sugar when using SBValue::Dereference on C++ references
Raphael Isemann [Wed, 2 Jun 2021 17:22:23 +0000 (19:22 +0200)]
[lldb] Preserve type sugar when using SBValue::Dereference on C++ references

When checking for type properties we usually want to strip all kind of type
sugar from the type. For example, sugar like Clang's ElaboratedType or typedefs
rarely influence the fundamental behaviour of a type such as its byte size.

However we always need to preserve type sugar for everything else as it does
matter for users that their variable of type `size_t` instead of `unsigned long`
for example.

This patch fixes one such bug when trying to use the SBValue API to dereference
a type.

Reviewed By: werat, shafik

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

3 years ago[SDAG] allow more cast folding for vector sext-of-setcc
Sanjay Patel [Wed, 2 Jun 2021 16:55:46 +0000 (12:55 -0400)]
[SDAG] allow more cast folding for vector sext-of-setcc

This is a follow-up to D103280 that eases the use restrictions,
so we can handle the motivating case from:
https://llvm.org/PR50055

The loop code is adapted from similar use checks in
ExtendUsesToFormExtLoad() and SliceUpLoad(). I did not see an
easier way to filter out non-chain uses of load values.

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

3 years ago[x86] add test for sext-of-setcc; NFC
Sanjay Patel [Tue, 1 Jun 2021 20:07:29 +0000 (16:07 -0400)]
[x86] add test for sext-of-setcc; NFC

D103462

3 years agoFix CMake error: TableGen targets must be in the DEPENDS list instead of LINK_LIBS
Mehdi Amini [Wed, 2 Jun 2021 17:13:51 +0000 (17:13 +0000)]
Fix CMake error: TableGen targets must be in the DEPENDS list instead of LINK_LIBS

3 years agoAdd missing CMake dependency for mlir/lib/Reducer (NFC)
Mehdi Amini [Wed, 2 Jun 2021 16:55:09 +0000 (16:55 +0000)]
Add missing CMake dependency for mlir/lib/Reducer (NFC)

The `OptReductionPass.cpp` file depends on the TableGen generated
`mlir/Reducer/Passes.h.inc` file.

3 years agoRemove redundant comparisons (NFC)
Adrian Prantl [Wed, 2 Jun 2021 16:52:45 +0000 (09:52 -0700)]
Remove redundant comparisons (NFC)

3 years ago[OpenMP] Fix improper printf format specifier
Peyton, Jonathan L [Wed, 2 Jun 2021 16:03:48 +0000 (11:03 -0500)]
[OpenMP] Fix improper printf format specifier

3 years ago[libcxx][NFC] Tidy up calculation of __nbuf in num_put::do_put, and add comments
Daniel McIntosh [Wed, 2 Jun 2021 15:44:07 +0000 (11:44 -0400)]
[libcxx][NFC] Tidy up calculation of __nbuf in num_put::do_put, and add comments

In 07ef8e679621 and 3ed9f6ebdeeb, `__nbuf` started to diverge from the amount
of space that was actually needed for the buffer. For 32-bit longs for example,
we allocate a buffer that is one larger than needed. Moreover, it is no longer
clear exactly where the extra +1 or +2 comes from - they're just numbers pulled
from thin air. This PR cleans up how `__nbuf` is calculated, and adds comments
to further clarify where each part comes from.

Specifically, it corrects the underestimation of the max size buffer needed
that the above two commits had to compensate for. The root cause looks to be
the use of signed type parameters to numeric_limits<>::digits. Since digits
only counts non-sign bits, the calculation was acting as though (for a signed
64-bit type) the longest value we would print was 2^63 in octal. However,
printing in octal treats values as unsigned, so it is actually 2^64. Thus,
using unsigned types and changing the final +2 to a +1 is probably a better
option.

Reviewed By: #libc, ldionne, Mordante

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

3 years ago[lld/mac] try to fix tests after a5645513dba
Nico Weber [Wed, 2 Jun 2021 15:33:08 +0000 (11:33 -0400)]
[lld/mac] try to fix tests after a5645513dba

My linux system doesn't like the `grep` for some reason,
but FileCheck seems to work.

3 years ago[OpenMP] Use new task type/flag for taskwait depend events.
Hansang Bae [Thu, 27 May 2021 22:29:35 +0000 (17:29 -0500)]
[OpenMP] Use new task type/flag for taskwait depend events.

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

3 years ago[lld/mac] Implement -dead_strip
Nico Weber [Fri, 7 May 2021 21:10:05 +0000 (17:10 -0400)]
[lld/mac] Implement -dead_strip

Also adds support for live_support sections, no_dead_strip sections,
.no_dead_strip symbols.

Chromium Framework 345MB unstripped -> 250MB stripped
(vs 290MB unstripped -> 236M stripped with ld64).

Doing dead stripping is a bit faster than not, because so much less
data needs to be processed:

    % ministat lld_*
    x lld_nostrip.txt
    + lld_strip.txt
        N           Min           Max        Median           Avg        Stddev
    x  10      3.929414       4.07692     4.0269079     4.0089678   0.044214794
    +  10     3.8129408     3.9025559     3.8670411     3.8642573   0.024779651
    Difference at 95.0% confidence
            -0.144711 +/- 0.0336749
            -3.60967% +/- 0.839989%
            (Student's t, pooled s = 0.0358398)

This interacts with many parts of the linker. I tried to add test coverage
for all added `isLive()` checks, so that some test will fail if any of them
is removed. I checked that the test expectations for the most part match
ld64's behavior (except for live-support-iterations.s, see the comment
in the test). Interacts with:
- debug info
- export tries
- import opcodes
- flags like -exported_symbol(s_list)
- -U / dynamic_lookup
- mod_init_funcs, mod_term_funcs
- weak symbol handling
- unwind info
- stubs
- map files
- -sectcreate
- undefined, dylib, common, defined (both absolute and normal) symbols

It's possible it interacts with more features I didn't think of,
of course.

I also did some manual testing:
- check-llvm check-clang check-lld work with lld with this patch
  as host linker and -dead_strip enabled
- Chromium still starts
- Chromium's base_unittests still pass, including unwind tests

Implemenation-wise, this is InputSection-based, so it'll work for
object files with .subsections_via_symbols (which includes all
object files generated by clang). I first based this on the COFF
implementation, but later realized that things are more similar to ELF.
I think it'd be good to refactor MarkLive.cpp to look more like the ELF
part at some point, but I'd like to get a working state checked in first.

Mechanical parts:
- Rename canOmitFromOutput to wasCoalesced (no behavior change)
  since it really is for weak coalesced symbols
- Add noDeadStrip to Defined, corresponding to N_NO_DEAD_STRIP
  (`.no_dead_strip` in asm)

Fixes PR49276.

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

3 years ago[lld/mac] Implement -needed_framework, -needed_library, -needed-l
Nico Weber [Wed, 2 Jun 2021 15:06:42 +0000 (11:06 -0400)]
[lld/mac] Implement -needed_framework, -needed_library, -needed-l

These allow overriding dead_strip_dylibs.

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

3 years ago[lld/mac] Don't strip explicit dylib also mentioned in LC_LINKER_OPTION
Nico Weber [Wed, 2 Jun 2021 12:54:36 +0000 (08:54 -0400)]
[lld/mac] Don't strip explicit dylib also mentioned in LC_LINKER_OPTION

Noticed by Jez in D103499.

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

3 years ago[LoopStrengthReduce] Ensure that debug intrinsics do not affect LSR's output
Stephen Tozer [Thu, 27 May 2021 16:03:32 +0000 (17:03 +0100)]
[LoopStrengthReduce] Ensure that debug intrinsics do not affect LSR's output

During Loop Strength Reduce, if the terminating condition for the loop
is not immediately adjacent to the terminating branch and it has more
than one use, a clone of the condition will be created just before the
terminating branch and will be used as the branch condition. Currently,
whether the instructions are "immediately adjacent" is determined by
checking whether the next instruction after the condition is the
terminating branch; this is incorrect however, as the presence of a
debug intrinsic between the two will result in a change to the output.
This is fixed by using getNextNonDebugInstruction() instead.

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

3 years ago[lld/mac] Address review feedback and improve a comment
Nico Weber [Wed, 2 Jun 2021 13:35:06 +0000 (09:35 -0400)]
[lld/mac] Address review feedback and improve a comment

I forgot to move the message() call around as requested in D103428
before committing that change. Move it now.

Also, improve the ordinal uniq'ing comment. I hadn't realized that the
distinct-but-identical files happen with --reproduce and not in general.

No behavior change.

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

3 years ago[coro async] Add the swiftasync attribute to the resume partial function
Arnold Schwaighofer [Wed, 19 May 2021 16:59:13 +0000 (09:59 -0700)]
[coro async] Add the swiftasync attribute to the resume partial function

Transfer the swiftasync attribute to the resume partial function according to
suspend.async specification. It's first argument denotes which argument is the
async context.

rdar://71499498

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

3 years ago[clang] Implement the using_if_exists attribute
Erik Pilkington [Mon, 31 May 2021 15:24:52 +0000 (11:24 -0400)]
[clang] Implement the using_if_exists attribute

This attribute applies to a using declaration, and permits importing a
declaration without knowing if that declaration exists. This is useful
for libc++ C wrapper headers that re-export declarations in std::, in
cases where the base C library doesn't provide all declarations.

This attribute was proposed in http://lists.llvm.org/pipermail/cfe-dev/2020-June/066038.html.

rdar://69313357

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

3 years ago[clangd] Add support for the `defaultLibrary` semantic token modifier
David Goldman [Thu, 29 Apr 2021 17:03:10 +0000 (13:03 -0400)]
[clangd] Add support for the `defaultLibrary` semantic token modifier

This allows us to differentiate symbols from the system (e.g. system
includes or sysroot) differently than symbols defined in the user's
project, which can be used by editors to display them differently.

This is currently based on `FileCharacteristic`, but we can
consider alternatives such as `Sysroot` and file paths in the future.

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

3 years agoFix comments in test cuda-kernel-call.cu
Yaxun (Sam) Liu [Wed, 2 Jun 2021 14:21:16 +0000 (10:21 -0400)]
Fix comments in test cuda-kernel-call.cu

3 years agoAdd getDemandedBits for uses.
Qunyan Mangus [Wed, 2 Jun 2021 14:07:40 +0000 (10:07 -0400)]
Add getDemandedBits for uses.

Add getDemandedBits method for uses so we can query demanded bits for each use.  This can help getting better use information. For example, for the code below
define i32 @test_use(i32 %a) {
  %1 = and i32 %a, -256
  %2 = or i32 %1, 1
  %3 = trunc i32 %2 to i8 (didn't optimize this to 1 for illustration purpose)
  ... some use of %3
  ret %2
}
if we look at the demanded bit of %2 (which is all 32 bits because of the return), we would conclude that %a is used regardless of how its return is used. However, if we look at each use separately, we will see that the demanded bit of %2 in trunc only uses the lower 8 bits of %a which is redefined, therefore %a's usage depends on how the function return is used.

Reviewed By: RKSimon

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

3 years ago[AArch64][NFC] Fix failing cost-model test
Irina Dobrescu [Wed, 2 Jun 2021 13:59:21 +0000 (14:59 +0100)]
[AArch64][NFC] Fix failing cost-model test

3 years ago[LV] Build and cost VPlans for scalable VFs.
Sander de Smalen [Wed, 2 Jun 2021 13:10:59 +0000 (14:10 +0100)]
[LV] Build and cost VPlans for scalable VFs.

This patch uses the calculated maximum scalable VFs to build VPlans,
cost them and select a suitable scalable VF.

Reviewed By: paulwalker-arm

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

3 years ago[compiler-rt][lsan] Increase libdl_deadlock test timeout
David Spickett [Wed, 2 Jun 2021 13:30:37 +0000 (13:30 +0000)]
[compiler-rt][lsan] Increase libdl_deadlock test timeout

We have been seeing this test fail intermittently on our
2 stage AArch64 bot.

As far back as https://lab.llvm.org/buildbot/#/builders/53/builds/2694

Likely due to a lack of resources at certain times on the
shared machine. Up the time limit to give us some more room.

(this limit only applies to the watchdog thread, so if the
test passes then it won't take 20s)

3 years ago[PowerPC][AIX} FIx AIX bootstrap build.
Sean Fertile [Tue, 1 Jun 2021 17:39:02 +0000 (13:39 -0400)]
[PowerPC][AIX} FIx AIX bootstrap build.

A recent patch:
https://reviews.llvm.org/rGe0921655b1ff8d4ba7c14be59252fe05b705920e
changed clangs AIX bitfield handling to use 4-byte bitfield containers,
matching XLs behavior. This change triggers static assert failures when
bootstrapping. Change the macro we check to enable bitfield packing on
AIX to `__clang__` which is defined by both xlclang and clang.

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

3 years ago[LV] NFC: Remove redundant isLegalMasked(Gather|Scatter) functions.
Sander de Smalen [Tue, 1 Jun 2021 20:05:33 +0000 (21:05 +0100)]
[LV] NFC: Remove redundant isLegalMasked(Gather|Scatter) functions.

This NFC change follows from conversation in D102437, where it was discussed
to remove these functions as a separate patch.

3 years ago[LV] NFC: Replace custom getMemInstValueType by llvm::getLoadStoreType.
Sander de Smalen [Tue, 1 Jun 2021 14:30:00 +0000 (15:30 +0100)]
[LV] NFC: Replace custom getMemInstValueType by llvm::getLoadStoreType.

llvm::getLoadStoreType was added recently and has the same implementation
as 'getMemInstValueType' in LoopVectorize.cpp. Since there is no
value in having two implementations, this patch removes the custom LV
implementation in favor of the generic one defined in Instructions.h.

3 years ago[TTI] NFC: Change getIntImmCodeSizeCost to return InstructionCost.
Daniil Fukalov [Thu, 20 May 2021 13:57:19 +0000 (16:57 +0300)]
[TTI] NFC: Change getIntImmCodeSizeCost to return InstructionCost.

This patch migrates the TTI cost interfaces to return an InstructionCost.

See this patch for the introduction of the type: https://reviews.llvm.org/D91174
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2020-November/146408.html

Reviewed By: sdesmalen

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

3 years ago[compiler-rt][asan] Enable unwind-tables for Arm Linux
David Spickett [Tue, 1 Jun 2021 14:54:33 +0000 (14:54 +0000)]
[compiler-rt][asan] Enable unwind-tables for Arm Linux

Since https://reviews.llvm.org/D102046 some tests have
been falling back to fast unwinding on our Thumb bot.

This fails because fast unwinding does not work on Thumb.
By adding the extra information we ensure this does not happen
during testing, but the built library can still fast unwind
as a last resort.

Since there are some situations it can work in, like if
eveything is built with clang. During testing we've got gcc
built system libs and clang built tests.

The same change was made for sanitizer-common in
https://reviews.llvm.org/D96337.

Reviewed By: zatrazz

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

3 years ago[mlir][linalg] Update result position calculation in the Structured Op Interface...
Tobias Gysi [Wed, 2 Jun 2021 12:29:50 +0000 (12:29 +0000)]
[mlir][linalg] Update result position calculation in the Structured Op Interface (NFC).

Remove two unused methods and replace the implementation of getResultsPositionInLoopsToShapeMap. The patch is based on https://reviews.llvm.org/D103394.

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

3 years ago[mlir][linalg] Cleanup LinalgOp usage in fusion on tensors (NFC).
Tobias Gysi [Wed, 2 Jun 2021 11:55:38 +0000 (11:55 +0000)]
[mlir][linalg] Cleanup LinalgOp usage in fusion on tensors (NFC).

Replace the uses of deprecated Structured Op Interface methods in FusionOnTensors.cpp. This patch is based on https://reviews.llvm.org/D103394.

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

3 years ago[RISCV][NFC] Add '+mattr=+experimental-v' to RVV test
Fraser Cormack [Wed, 2 Jun 2021 10:39:53 +0000 (11:39 +0100)]
[RISCV][NFC] Add '+mattr=+experimental-v' to RVV test

3 years ago[AArch64] Optimise bitreverse lowering in ISel
Irina Dobrescu [Tue, 25 May 2021 18:19:52 +0000 (19:19 +0100)]
[AArch64] Optimise bitreverse lowering in ISel

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

3 years ago[AMDGPU][Libomptarget][NFC] Remove bunch of dead structs
Pushpinder Singh [Wed, 2 Jun 2021 07:24:06 +0000 (07:24 +0000)]
[AMDGPU][Libomptarget][NFC] Remove bunch of dead structs

Dropped structs are atmi_machine_t, atmi_device_t and atmi_memory_t

Reviewed By: JonChesterfield

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

3 years ago[lld/mac] Implement -reexport_framework, -reexport_library, -reexport-l
Nico Weber [Wed, 2 Jun 2021 00:17:04 +0000 (20:17 -0400)]
[lld/mac] Implement -reexport_framework, -reexport_library, -reexport-l

These are slightly easier-to-use versions of -sub_library and -sub_umbrella.

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

3 years ago[AMDGPU][Libomptarget][NFC] Remove atmi_place_t
Pushpinder Singh [Wed, 2 Jun 2021 07:22:40 +0000 (07:22 +0000)]
[AMDGPU][Libomptarget][NFC] Remove atmi_place_t

atmi_place_t has been replaced with int DeviceId.

Reviewed By: JonChesterfield

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

3 years ago[mailmap] Use my chromium address as my canonical email address
Nico Weber [Wed, 2 Jun 2021 10:34:39 +0000 (06:34 -0400)]
[mailmap] Use my chromium address as my canonical email address

3 years agoAdd a toplevel .mailmap file
Nico Weber [Sat, 29 May 2021 16:18:15 +0000 (12:18 -0400)]
Add a toplevel .mailmap file

See "Proposal: Adding a toplevel .mailmap file" on llvm-dev:
https://lists.llvm.org/pipermail/llvm-dev/2021-May/150741.html

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

3 years ago[SimpleLoopUnswitch] Port partially invariant unswitch from LoopUnswitch to SimpleLoo...
Jingu Kang [Fri, 21 May 2021 11:34:40 +0000 (12:34 +0100)]
[SimpleLoopUnswitch] Port partially invariant unswitch from LoopUnswitch to SimpleLoopUnswitch

This re-enables commit 107d19eb017ff6734986af077eb2e9f6600114a9 with bug fixes.

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

3 years ago[InstCombine][msp430] Pre-commit test case for @llvm.powi and 16-bit ints
Bjorn Pettersson [Fri, 21 May 2021 11:42:50 +0000 (13:42 +0200)]
[InstCombine][msp430] Pre-commit test case for @llvm.powi and 16-bit ints

This is a pre-commit of a test case D99439 which is a patch that
updates @llvm.powi to handle different int sizes for the exponent.

Problem is that @llvm.powi is used as an IR construct that maps
to RT libcalls to __powi* functions, and those lib functions depend
on sizeof(int) to use correct type for the exponent.

The test cases show that we use i32 for the powi expenent, which
later would result in wrong type being used in libcalls (miscompile).

But there are also a couple of the negative test cases that show
that we rewrite into using powi when having a uitofp conversion
from i16, which would be wrong when doing the libcall as an
"unsigned int" isn't guaranteed to fit inside the "int" argument
in the called libcall function.

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

3 years ago[CodeGen] Refactor libcall lookups for RTLIB::POWI_*
Bjorn Pettersson [Mon, 24 May 2021 21:17:18 +0000 (23:17 +0200)]
[CodeGen] Refactor libcall lookups for RTLIB::POWI_*

Use RuntimeLibcalls to get a common way to pick correct RTLIB::POWI_*
libcall for a given value type.

This includes a small refactoring of ExpandFPLibCall and
ExpandArgFPLibCall in SelectionDAGLegalize to share a bit of code,
plus adding an ExpandFPLibCall version that can be called directly
when expanding FPOWI/STRICT_FPOWI to ensure that we actually use
the same RTLIB::Libcall when expanding the libcall as we used when
checking the legality of such a call by doing a getLibcallName check.

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

3 years ago[LegalizeTypes] Avoid promotion of exponent in FPOWI
Bjorn Pettersson [Fri, 21 May 2021 22:24:25 +0000 (00:24 +0200)]
[LegalizeTypes] Avoid promotion of exponent in FPOWI

The FPOWI DAG node is normally lowered to a libcall to one of the
RTLIB::POWI* runtime functions and the exponent should normally
have a type matching sizeof(int) when making the call. Thus,
type promotion of the exponent could lead to an FPOWI with a type
for the second operand that would be incorrect when doing the
libcall (a situation which would be hard to detect post-legalization
if we allow such FPOWI nodes).

This patch is changing DAGTypeLegalizer::PromoteIntOp_FPOWI to
do the rewrite into a libcall directly instead of promoting the
operand. This way we can check that the exponent is smaller than
sizeof(int) and we can let TargetLowering handle promotion as
part of making the libcall. It could be noticed here that makeLibCall
has some knowledge about targets such as 64-bit RISCV, for which the
libcall argument should be extended to a type larger than sizeof(int).

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

3 years ago[SimplifyLibCalls] Take size of int into consideration when emitting ldexp/ldexpf
Bjorn Pettersson [Fri, 26 Mar 2021 11:49:38 +0000 (12:49 +0100)]
[SimplifyLibCalls] Take size of int into consideration when emitting ldexp/ldexpf

When rewriting
  powf(2.0, itofp(x)) -> ldexpf(1.0, x)
  exp2(sitofp(x)) -> ldexp(1.0, sext(x))
  exp2(uitofp(x)) -> ldexp(1.0, zext(x))

the wrong type was used for the second argument in the ldexp/ldexpf
libc call, for target architectures with 16 bit "int" type.
The transform incorrectly used a bitcasted function pointer with
a 32-bit argument when emitting the ldexp/ldexpf call for such
targets.

The fault is solved by using the correct function prototype
in the call, by asking TargetLibraryInfo about the size of "int".
TargetLibraryInfo by default derives the size of the int type by
assuming that it is 16 bits for 16-bit architectures, and
32 bits otherwise. If this isn't true for a target it should be
possible to override that default in the TargetLibraryInfo
initializer.

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

3 years ago[mlir] Add DivOp lowering from Complex dialect to Standard/Math dialect.
Adrian Kuegel [Wed, 2 Jun 2021 08:34:18 +0000 (10:34 +0200)]
[mlir] Add DivOp lowering from Complex dialect to Standard/Math dialect.

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

3 years ago[Demangle][Rust] Parse binders
Tomasz MiÄ…sko [Wed, 2 Jun 2021 08:26:05 +0000 (10:26 +0200)]
[Demangle][Rust] Parse binders

Reviewed By: dblaikie

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

3 years ago[RISCV] Expand unaligned fixed-length vector memory accesses
Fraser Cormack [Fri, 14 May 2021 12:56:41 +0000 (13:56 +0100)]
[RISCV] Expand unaligned fixed-length vector memory accesses

RVV vectors must be aligned to their element types, so anything less is
unaligned.

For regular loads and stores, our custom-lowering of fixed-length
vectors meant that we opted out of LegalizeDAG's built-in unaligned
expansion. This patch adds that logic in to our custom lower function.

For masked intrinsics, we declare that anything unaligned is not legal,
leaving the ScalarizeMaskedMemIntrin pass to do the expansion for us.

Note that neither of these methods can handle the expansion of
scalable-vector memory ops, so those cases are left alone by this patch.
Scalable loads and stores already go through expansion by default but
hit an assertion, and scalable masked intrinsics will silently generate
incorrect code. It may be prudent to return an error in both of these
cases.

Reviewed By: craig.topper

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

3 years ago[flang] Add tests for REPEAT. NFC
Diana Picus [Mon, 31 May 2021 11:42:42 +0000 (11:42 +0000)]
[flang] Add tests for REPEAT. NFC

These should already pass with the current implementation.

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

3 years ago[NFC] Fix 'Load' name masking.
Daniil Fukalov [Tue, 1 Jun 2021 12:29:39 +0000 (15:29 +0300)]
[NFC] Fix 'Load' name masking.

Reviewed By: mkazantsev

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

3 years ago[NFC][msan] Fix assigned-unused warning
Vitaly Buka [Wed, 2 Jun 2021 07:08:46 +0000 (00:08 -0700)]
[NFC][msan] Fix assigned-unused warning

3 years agoRevert "[NFC][msan] Fix warning on sanitizer-ppc64le-linux bot"
Vitaly Buka [Wed, 2 Jun 2021 07:01:36 +0000 (00:01 -0700)]
Revert "[NFC][msan] Fix warning on sanitizer-ppc64le-linux bot"

This fix breaks the test.

This reverts commit 6a2807bc81771d3fed397378507ecab40f8bff27.

3 years ago[mlir][linalg] Cleanup LinalgOp usage in sparse compiler (NFC).
Tobias Gysi [Wed, 2 Jun 2021 06:21:13 +0000 (06:21 +0000)]
[mlir][linalg] Cleanup LinalgOp usage in sparse compiler (NFC).

Replace the uses of deprecated Structured Op Interface methods in Sparsification.cpp. This patch is based on https://reviews.llvm.org/D103394.

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

3 years agoResubmit D85085 after fixing the tests that were failing.
Sriraman Tallam [Tue, 1 Jun 2021 19:38:32 +0000 (12:38 -0700)]
Resubmit D85085 after fixing the tests that were failing.

D85085 was pushed earlier but broke tests on mac and win:
http://lab.llvm.org:8080/green/job/clang-stage1-RA/21182/consoleFull#-706149783d489585b-5106-414a-ac11-3ff90657619c

Recommitting it after adding mtriple to the llc commands.

Emit correct location lists with basic block sections.

This patch addresses multiple things:

1) It ensures that const_value is emitted when possible with basic block
   sections.
2) It emits location lists such that the labels are always within the
   section boundary.
3) It fixes a bug when the parameter is first used in a non-entry block
   which is in a different section from the entry block.

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

3 years ago[lldb/API] Expose triple for SBProcessInfo.
Bruce Mitchener [Sun, 30 May 2021 10:28:09 +0000 (17:28 +0700)]
[lldb/API] Expose triple for SBProcessInfo.

This is present when doing a `platform process list` and is
tracked by the underlying code. To do something like the
process list via the SB API in the future, this must be
exposed.

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

3 years ago[NFC][msan] Fix warning on sanitizer-ppc64le-linux bot
Vitaly Buka [Wed, 2 Jun 2021 04:03:41 +0000 (21:03 -0700)]
[NFC][msan] Fix warning on sanitizer-ppc64le-linux bot

3 years ago[scudo] Enabled MTE in tests
Vitaly Buka [Thu, 27 May 2021 17:10:50 +0000 (10:10 -0700)]
[scudo] Enabled MTE in tests

Reviewed By: pcc, hctim

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

3 years agoRevert "Fix tmp files being left on Windows builds." for now;
Amy Huang [Wed, 2 Jun 2021 02:51:47 +0000 (19:51 -0700)]
Revert "Fix tmp files being left on Windows builds." for now;
causing some asan test failures.

This reverts commit 7daa18215905c831e130c7542f17619e9d936dfc.

3 years ago[libc++] Add a CI job to test libc++ when building for 32 bit
Louis Dionne [Wed, 2 Dec 2020 21:40:31 +0000 (16:40 -0500)]
[libc++] Add a CI job to test libc++ when building for 32 bit

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

3 years ago[RISCV] Improve register allocation for masked vwadd(u).wv, vwsub(u).wv, vfwadd.wv...
Craig Topper [Wed, 2 Jun 2021 01:29:13 +0000 (18:29 -0700)]
[RISCV] Improve register allocation for masked vwadd(u).wv, vwsub(u).wv, vfwadd.wv, and vfwsub.wv.

The first source has the same EEW as the destination, but we're
using earlyclobber which prevents them from ever being the same
register.

To workaround this, add a special TIED pseudo to use whenever the
first source and merge operand are the same value. This allows
us to use a single operand for the merge operand and first source
which we can then tie to the destination. A tied source disables
earlyclobber for that operand.

Reviewed By: arcbbb

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

3 years ago[gn build] Port 924ea3bb53ca
LLVM GN Syncbot [Wed, 2 Jun 2021 01:47:33 +0000 (01:47 +0000)]
[gn build] Port 924ea3bb53ca

3 years ago[libc++] NFC: Move unwrap_iter to its own header
Louis Dionne [Mon, 31 May 2021 16:08:05 +0000 (12:08 -0400)]
[libc++] NFC: Move unwrap_iter to its own header

This re-applies 9968896cd62a, which was reverted in b13edf6e907b because
it broke the build.

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

3 years ago[mlir] Support tensor types in unrolled VectorToSCF
Matthias Springer [Wed, 2 Jun 2021 01:38:59 +0000 (10:38 +0900)]
[mlir] Support tensor types in unrolled VectorToSCF

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

3 years ago[llvm-readobj] Print function names with `--bb-addr-map`.
Rahman Lavaee [Wed, 26 May 2021 20:36:44 +0000 (13:36 -0700)]
[llvm-readobj] Print function names with `--bb-addr-map`.

This patch uses the `getSymbolIndexForFunctionAddress` helper function to print function names for BB address map entries.

Reviewed By: jhenderson

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

3 years ago[mlir] Support tensor types in non-unrolled VectorToSCF
Matthias Springer [Wed, 2 Jun 2021 01:29:07 +0000 (10:29 +0900)]
[mlir] Support tensor types in non-unrolled VectorToSCF

Support for tensor types in the unrolled version will follow in a separate commit.

Add a new pass option to activate lowering of transfer ops with tensor types (default: deactivated).

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

3 years ago[CUDA][HIP] Promote const variables to constant
Yaxun (Sam) Liu [Tue, 25 May 2021 18:06:08 +0000 (14:06 -0400)]
[CUDA][HIP] Promote const variables to constant

Recently we added diagnosing ODR-use of host variables
in device functions, which includes ODR-use of const
host variables since they are not really emitted on
device side. This caused regressions since we used
to allow ODR-use of const host variables in device
functions.

This patch allows ODR-use of const variables in device
functions if the const variables can be statically initialized
and have an empty dtor. Such variables are marked with
implicit constant attrs and emitted on device side. This is
in line with what clang does for constexpr variables.

Reviewed by: Artem Belevich

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

3 years agoMake ignore counts work as "after stop" modifiers so they play nicely with conditions
Jim Ingham [Tue, 1 Jun 2021 23:14:08 +0000 (16:14 -0700)]
Make ignore counts work as "after stop" modifiers so they play nicely with conditions

Previously ignore counts were checked when we stopped to do the sync callback in Breakpoint::ShouldStop. That meant we would do all the ignore count work even when
there is also a condition says the breakpoint should not stop.

That's wrong, lldb treats breakpoint hits that fail the thread or condition checks as "not having hit the breakpoint". So the ignore count check should happen after
the condition and thread checks in StopInfoBreakpoint::PerformAction.

The one side-effect of doing this is that if you have a breakpoint with a synchronous callback, it will run the synchronous callback before checking the ignore count.
That is probably a good thing, since this was already true of the condition and thread checks, so this removes an odd asymmetry. And breakpoints with sync callbacks
are all internal lldb breakpoints and there's not a really good reason why you would want one of these to use an ignore count (but not a condition or thread check...)

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

3 years ago[RISCV][test] Add new tests of bitwise and with constant for the Zbs extension
Ben Shi [Sat, 29 May 2021 10:18:45 +0000 (18:18 +0800)]
[RISCV][test] Add new tests of bitwise and with constant for the Zbs extension

These tests will show how (and r i) will be optimized to
(BCLRI (BCLRI r, i0), i1) or (BCLRI (ANDI r, i0), i1) by future
commits.

Reviewed By: craig.topper

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

3 years ago[CUDA][HIP] Change default lang std to c++14
Yaxun (Sam) Liu [Thu, 27 May 2021 03:11:33 +0000 (23:11 -0400)]
[CUDA][HIP] Change default lang std to c++14

Currently clang and nvcc use c++14 as default std for C++.
gcc 11 even uses c++17 as default std for C++. However,
clang uses c++98 as default std for CUDA/HIP.

As c++14 has been well adopted and became default for
clang, it seems reasonable to use c++14 as default std
for CUDA/HIP.

Reviewed by: Artem Belevich

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

3 years agoRemove x86 test amx-fast-tile-config.mir (by its author)
Xiang1 Zhang [Wed, 2 Jun 2021 00:29:29 +0000 (08:29 +0800)]
Remove x86 test amx-fast-tile-config.mir (by its author)

This test contains a lot of manual changes which is not convenient
to update, and the checks are duplicated with test amx-configO2toO0.ll

3 years agoFix tmp files being left on Windows builds.
Amy Huang [Tue, 4 May 2021 18:28:28 +0000 (11:28 -0700)]
Fix tmp files being left on Windows builds.

Clang writes object files by first writing to a .tmp file and then
renaming to the final .obj name. On Windows, if a compile is killed
partway through the .tmp files don't get deleted.

Currently it seems like RemoveFileOnSignal takes care of deleting the
tmp files on Linux, but on Windows we need to call
setDeleteDisposition on tmp files so that they are deleted when
closed.

This patch switches to using TempFile to create the .tmp files we write
when creating object files, since it uses setDeleteDisposition on Windows.
This change applies to both Linux and Windows for consistency.

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

3 years ago[AMDGPU] All GWS instructions need aligned VGPR on gfx90a
Stanislav Mekhanoshin [Tue, 25 May 2021 23:37:01 +0000 (16:37 -0700)]
[AMDGPU] All GWS instructions need aligned VGPR on gfx90a

Fixes: SWDEV-288006

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

3 years ago[OpaquePtr] Create API to make a copy of a PointerType with some address space
Arthur Eubanks [Thu, 27 May 2021 03:32:04 +0000 (20:32 -0700)]
[OpaquePtr] Create API to make a copy of a PointerType with some address space

Some existing places use getPointerElementType() to create a copy of a
pointer type with some new address space.

Reviewed By: dblaikie

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

3 years ago[mlir-reduce] Reducer refactor.
Chia-hung Duan [Tue, 1 Jun 2021 23:00:19 +0000 (07:00 +0800)]
[mlir-reduce] Reducer refactor.

* A Reducer is a kind of RewritePattern, so it's just the same as
writing graph rewrite.
* ReductionTreePass operates on Operation rather than ModuleOp, so that
* we are able to reduce a nested structure(e.g., module in module) by
* self-nesting.

Reviewed By: jpienaar, rriddle

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

3 years ago[InstSimplify] Treat invariant group insts as bitcasts for load operands
Arthur Eubanks [Thu, 22 Apr 2021 20:03:09 +0000 (13:03 -0700)]
[InstSimplify] Treat invariant group insts as bitcasts for load operands

We can look through invariant group intrinsics for the purposes of
simplifying the result of a load.

Since intrinsics can't be constants, but we also don't want to
completely rewrite load constant folding, we convert the load operand to
a constant. For GEPs and bitcasts we just treat them as constants. For
invariant group intrinsics, we treat them as a bitcast.

Reviewed By: lebedev.ri

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

3 years ago[test] Precommit test for D101103
Arthur Eubanks [Tue, 1 Jun 2021 23:30:48 +0000 (16:30 -0700)]
[test] Precommit test for D101103

3 years ago[lld/mac] Make -t work correctly with -flat_namespace
Nico Weber [Mon, 31 May 2021 22:20:22 +0000 (18:20 -0400)]
[lld/mac] Make -t work correctly with -flat_namespace

We used to not print dylibs referenced by other dylibs in `-t` mode. This
affected reexports, and with `-flat_namespace` also just dylibs loaded by
dylibs. Now we print them.

Fixes PR49514.

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

3 years ago[clang][Fuchsia] Turn on relative-vtables by default for Fuchsia
Leonard Chan [Wed, 12 May 2021 17:37:37 +0000 (10:37 -0700)]
[clang][Fuchsia] Turn on relative-vtables by default for Fuchsia

All fuchsia targets will now use the relative-vtables ABI by default.
Also remove -fexperimental-relative-c++-abi-vtables from test RUNs targeting fuchsia.

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

3 years ago[Clang] -Wunused-but-set-parameter and -Wunused-but-set-variable
Michael Benfield [Tue, 1 Jun 2021 21:49:34 +0000 (14:49 -0700)]
[Clang] -Wunused-but-set-parameter and -Wunused-but-set-variable

These are intended to mimic warnings available in gcc.

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

3 years ago[various] Remove or use variables which are unused but set.
Michael Benfield [Tue, 1 Jun 2021 21:48:42 +0000 (14:48 -0700)]
[various] Remove or use variables which are unused but set.

This is in preparation for the -Wunused-but-set-variable warning.

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

3 years ago[lld-macho][nfc] Remove unnecessary use of Optional<T*>
Vy Nguyen [Tue, 1 Jun 2021 20:09:41 +0000 (16:09 -0400)]
[lld-macho][nfc] Remove unnecessary use of Optional<T*>

In all of these cases, the functions could simply return a nullptr instead of {}.
There is no case where Optional<nullptr> has a special meaning.

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

3 years ago[CSE] Ask DominanceInfo about "hasSSADominance" instead of reconstructing it.
Chris Lattner [Tue, 1 Jun 2021 22:15:28 +0000 (15:15 -0700)]
[CSE] Ask DominanceInfo about "hasSSADominance" instead of reconstructing it.

I backed this off to make the previous patch easier to wrangle, but now
this is an efficient query and it is better to not replace it in CSE.

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

3 years ago[lld/mac] Emit only one LC_LOAD_DYLIB per dylib
Nico Weber [Tue, 1 Jun 2021 19:13:46 +0000 (15:13 -0400)]
[lld/mac] Emit only one LC_LOAD_DYLIB per dylib

In some cases, we end up with several distinct DylibFiles that
have the same install name. Only emit a single LC_LOAD_DYLIB in
those cases.

This happens in 3 cases I know of:

1. Some tbd files are symlinks. libpthread.tbd is a symlink against
   libSystem.tbd for example, so `-lSystem -lpthread` loads
   libSystem.tbd twice. We could (and maybe should) cache loaded
   dylibs by realpath() to catch this.

2. Some tbd files are copies of each other. For example,
   CFNetwork.framework/CFNetwork.tbd and
   CFNetwork.framework/Versions/A/CFNetwork.tbd are two distinct
   copies of the same file. The former is found by
   `-framework CFNetwork` and the latter by the reexport in
   CoreServices.tbd. We could conceivably catch this by
   making `-framework` search look in `Versions/Current` instead
   of in the root, and/or by using a content hash to cache
   tbd files, but that's starting to sound complicated.

3. Magic $ld$ symbol processing can change the install name of
   a dylib based on the target platform_version. Here, two
   truly distinct dylibs can have the same install name.

So we need this code to deal with (3) anyways. Might as well use
it for 1 and 2, at least for now :)

With this (and D103430), clang-format links in the same dylibs
when linked with lld and ld64.

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

3 years ago[Fuchsia] Add compat multilibs to cache file
Leonard Chan [Tue, 1 Jun 2021 22:14:03 +0000 (15:14 -0700)]
[Fuchsia] Add compat multilibs to cache file

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

3 years ago[Dominators] Rewrite the dominator implementation for efficiency. NFC.
Chris Lattner [Mon, 31 May 2021 01:02:51 +0000 (18:02 -0700)]
[Dominators] Rewrite the dominator implementation for efficiency. NFC.

The previous impl densely scanned the entire region starting with an op
when dominators were created, creating a DominatorTree for every region.

This is extremely expensive up front -- particularly for clients like
Linalg/Transforms/Fusion.cpp that construct DominanceInfo for a single
query.  It is also extremely memory wasteful for IRs that use single
block regions commonly (e.g. affine.for) because it's making a
dominator tree for a region that has trivial dominance.  The
implementation also had numerous unnecessary minor efficiencies, e.g.
doing multiple walks of the region tree or tryGetBlocksInSameRegion
building a DenseMap that it didn't need.

This patch switches to an approach where [Post]DominanceInfo is free
to construct, and which lazily constructs DominatorTree's for any
multiblock regions that it needs.  This avoids the up-front cost
entirely, making its runtime proportional to the complexity of the
region tree instead of # ops in a region.  This also avoids the memory
and time cost of creating DominatorTree's for single block regions.

Finally this rewrites the implementation for simplicity and to avoids
the constant factor problems the old implementation had.

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

3 years ago[lld][WebAssemlby] Fix for string merging of -dwarf-5 sections
Sam Clegg [Tue, 1 Jun 2021 19:48:21 +0000 (12:48 -0700)]
[lld][WebAssemlby] Fix for string merging of -dwarf-5 sections

We were mistakenly treating `.debug_str_offsets` as a string mergable
section when it is not (it contains integers not strings).  This is an
indication that we really should find a way to store flags for custom
sections.

Fixes: https://bugs.llvm.org/show_bug.cgi?id=48828
Fixes: https://bugs.chromium.org/p/chromium/issues/detail?id=1172217

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

3 years ago[gn build] Port 065cf3f9d703
LLVM GN Syncbot [Tue, 1 Jun 2021 21:08:31 +0000 (21:08 +0000)]
[gn build] Port 065cf3f9d703

3 years ago[libcxx][ranges] Add `default_sentinel` and `default_sentinel_t`.
zoecarver [Tue, 1 Jun 2021 19:55:33 +0000 (12:55 -0700)]
[libcxx][ranges] Add `default_sentinel` and `default_sentinel_t`.

Refs https://eel.is/c++draft/default.sentinel and https://eel.is/c++draft/iterator.synopsis

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

3 years agoFix a Clang diagnostic to start with a lowercase letter; NFC
Aaron Ballman [Tue, 1 Jun 2021 21:03:00 +0000 (17:03 -0400)]
Fix a Clang diagnostic to start with a lowercase letter; NFC

3 years agofixup: Missing operator in [globalisel][legalizer] Separate the deprecated LegalizerI...
Daniel Sanders [Tue, 1 Jun 2021 20:57:46 +0000 (13:57 -0700)]
fixup: Missing operator in [globalisel][legalizer] Separate the deprecated LegalizerInfo from the current one

My local compiler was fine with it but the bots complain about ambiguous types.

3 years ago[lld/mac] fix test failure after 24979e111
Nico Weber [Tue, 1 Jun 2021 20:34:10 +0000 (16:34 -0400)]
[lld/mac] fix test failure after 24979e111

If there is an error reading the dylib, we shouldn't try
to load its reexports.

Caught e.g. by https://lab.llvm.org/buildbot/#/builders/36/builds/8946

3 years ago[libc++] Fix the std_include.sh.cpp test that has been failing since c9385297ce
Louis Dionne [Tue, 1 Jun 2021 17:58:17 +0000 (13:58 -0400)]
[libc++] Fix the std_include.sh.cpp test that has been failing since c9385297ce

The compiler used on Apple bots doesn't know about -std=c++20 yet, so
we can't use that just yet.

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