platform/upstream/llvm.git
3 years ago[GCOVProfiling][test] Ensure that 'opt' drops any files in a temp directory
Dmitri Gribenko [Sun, 20 Jun 2021 20:48:35 +0000 (22:48 +0200)]
[GCOVProfiling][test] Ensure that 'opt' drops any files in a temp directory

3 years agoTry to unbreak the windows CI
Jason Molenda [Sun, 20 Jun 2021 20:12:38 +0000 (13:12 -0700)]
Try to unbreak the windows CI

MSVC and clang seem to disagree with whether I can do this.

3 years ago[TypePromotion] Prune Intrinsic includes. NFC
Craig Topper [Sun, 20 Jun 2021 02:52:52 +0000 (19:52 -0700)]
[TypePromotion] Prune Intrinsic includes. NFC

TypePromotion is meant to be a generic pass and doesn't reference
any ARM intrinsics so it shouldn't include IntrinsicsARM.h.
The other Intrinsic related headers appear to be unneeded as well.

3 years agoAdd a corefile style option to process save-core; skinny corefiles
Jason Molenda [Sun, 20 Jun 2021 19:19:50 +0000 (12:19 -0700)]
Add a corefile style option to process save-core; skinny corefiles

Add a new feature to process save-core on Darwin systems -- for
lldb to create a user process corefile with only the dirty (modified
memory) pages included.  All of the binaries that were used in the
corefile are assumed to still exist on the system for the duration
of the use of the corefile.  A new --style option to process save-core
is added, so a full corefile can be requested if portability across
systems, or across time, is needed for this corefile.

debugserver can now identify the dirty pages in a memory region
when queried with qMemoryRegionInfo, and the size of vm pages is
given in qHostInfo.

Create a new "all image infos" LC_NOTE for Mach-O which allows us
to describe all of the binaries that were loaded in the process --
load address, UUID, file path, segment load addresses, and optionally
whether code from the binary was executing on any thread.  The old
"read dyld_all_image_infos and then the in-memory Mach-O load
commands to get segment load addresses" no longer works when we
only have dirty memory.

rdar://69670807
Differential Revision: https://reviews.llvm.org/D88387

3 years ago[LoopUnroll] Use smallest exact trip count from any exit
Nikita Popov [Sat, 19 Jun 2021 07:44:28 +0000 (09:44 +0200)]
[LoopUnroll] Use smallest exact trip count from any exit

This is a more general alternative/extension to D102635. Rather than
handling the special case of "header exit with non-exiting latch",
this unrolls against the smallest exact trip count from any exit.
The latch exit is no longer treated as priviledged when it comes to
full unrolling.

The motivating case is in full-unroll-one-unpredictable-exit.ll.
Here the header exit is an IV-based exit, while the latch exit is
a data comparison. This kind of loop does not get rotated, because
the latch is already exiting, and loop rotation doesn't try to
distinguish IV-based/analyzable latches.

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

3 years ago[mlir] Fix -Wunused-but-set-variable in -DLLVM_ENABLE_ASSERTIONS=off build. NFC
Fangrui Song [Sun, 20 Jun 2021 18:55:00 +0000 (11:55 -0700)]
[mlir] Fix -Wunused-but-set-variable in -DLLVM_ENABLE_ASSERTIONS=off build. NFC

3 years ago[lld-link] Fix -Wunused-but-set-variable in -DLLVM_ENABLE_ASSERTIONS=off build. NFC
Fangrui Song [Sun, 20 Jun 2021 18:35:01 +0000 (11:35 -0700)]
[lld-link] Fix -Wunused-but-set-variable in -DLLVM_ENABLE_ASSERTIONS=off build. NFC

3 years agoFix -Wunused-variable and -Wunused-but-set-variable in -DLLVM_ENABLE_ASSERTIONS=off...
Fangrui Song [Sun, 20 Jun 2021 18:09:07 +0000 (11:09 -0700)]
Fix -Wunused-variable and -Wunused-but-set-variable in -DLLVM_ENABLE_ASSERTIONS=off build. NFC

3 years ago[lldb] [Process/elf-core] Fix reading NetBSD/i386 core dumps
Michał Górny [Thu, 22 Apr 2021 17:42:52 +0000 (19:42 +0200)]
[lldb] [Process/elf-core] Fix reading NetBSD/i386 core dumps

Add support for extracting basic data from NetBSD/i386 core dumps.
FPU registers are not supported at the moment.

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

3 years ago[DSE] Remove stores in the same loop iteration
David Green [Sun, 20 Jun 2021 16:03:30 +0000 (17:03 +0100)]
[DSE] Remove stores in the same loop iteration

DSE will currently only remove stores in the same block unless they can
be guaranteed to be loop invariant. This expands that to any stores that
are in the same Loop, at the same loop level. This should still account
for where AA/MSSA will not handle aliasing between loops, but allow the
dead stores to be removed where they overlap in the same loop iteration.
It requires adding loop info to DSE, but that looks fairly harmless.

The test case this helps is from code like this, which can come up in
certain matrix operations:
  for(i=..)
    dst[i] = 0;
    for(j=..)
      dst[i] += src[i*n+j];

After LICM, this becomes:
for(i=..)
  dst[i] = 0;
  sum = 0;
  for(j=..)
    sum += src[i*n+j];
  dst[i] = sum;

The first store is dead, and with this patch is now removed.

Differntial Revision: https://reviews.llvm.org/D100464

3 years ago[InstCombine] fold ctpop-of-select with 1 or more constant arms
Sanjay Patel [Sun, 20 Jun 2021 15:26:11 +0000 (11:26 -0400)]
[InstCombine] fold ctpop-of-select with 1 or more constant arms

The general pattern is mentioned in:
https://llvm.org/PR50140
...but we need to do a bit more to handle intrinsics with extra operands
like ctlz/cttz.

3 years ago[libcxx] Implement P0883R2 ("Fixing Atomic Initialization")
Raul Tambre [Sun, 6 Jun 2021 16:02:20 +0000 (19:02 +0300)]
[libcxx] Implement P0883R2 ("Fixing Atomic Initialization")

Reviewed By: Quuxplusone

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

3 years ago[flang] Implement constant folding for the NOT intrinsic
Peter Steinfeld [Sat, 19 Jun 2021 02:18:27 +0000 (19:18 -0700)]
[flang] Implement constant folding for the NOT intrinsic

I implemented constant folding for the NOT intrinsic and added some tests.

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

3 years ago[InstCombine] avoid infinite loops with select folds of constant expressions
Sanjay Patel [Sun, 20 Jun 2021 13:41:59 +0000 (09:41 -0400)]
[InstCombine] avoid infinite loops with select folds of constant expressions

This pair of transforms was added recently with:
8591640379ac9175a

And could lead to conflicting folds:
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=35399

3 years ago[NFC][AArch64][ARM][Thumb][Hexagon] Autogenerate some tests
Roman Lebedev [Sun, 20 Jun 2021 10:24:31 +0000 (13:24 +0300)]
[NFC][AArch64][ARM][Thumb][Hexagon] Autogenerate some tests

These all (and some others) are being affected by D104597,
but they are manually-written, which rather complicates
checking the effect that change has on them.

3 years ago[UpdateTestUtils] Print test filename when complaining about conflicting prefix
Roman Lebedev [Sun, 20 Jun 2021 10:14:33 +0000 (13:14 +0300)]
[UpdateTestUtils] Print test filename when complaining about conflicting prefix

Now that FileCheck eagerly complains when prefixes are unused,
the update script does the same, and  is becoming very common
to need to drop some prefixes, yet figuring out the file
it complains about isn't obvious unless it actually tells us.

3 years ago[SimplifyCFG] FoldTwoEntryPHINode(): don't fold if either block has it's address...
Roman Lebedev [Sun, 20 Jun 2021 09:33:57 +0000 (12:33 +0300)]
[SimplifyCFG] FoldTwoEntryPHINode(): don't fold if either block has it's address taken

Same as with HoistThenElseCodeToIf() (ad87761925c2790aab272138b5bbbde4a93e0383).

3 years ago[SimplifyCFG] HoistThenElseCodeToIf(): don't hoist if either block has it's address...
Roman Lebedev [Sun, 20 Jun 2021 09:18:15 +0000 (12:18 +0300)]
[SimplifyCFG] HoistThenElseCodeToIf(): don't hoist if either block has it's address taken

This problem is exposed by D104598, after it tail-merges `ret` in
`@test_inline_constraint_S_label`, the verifier would start complaining
`invalid operand for inline asm constraint 'S'`.

Essentially, taking address of a block is mismodelled in IR.
It should probably be an explicit instruction, a first one in block,
that isn't identical to any other instruction of the same type,
so that it can't be hoisted.

3 years ago[InstSimplify] icmp poison, X -> poison
Juneyoung Lee [Sun, 20 Jun 2021 06:29:05 +0000 (15:29 +0900)]
[InstSimplify] icmp poison, X -> poison

This adds a simple transformation from icmp with poison constant to poison.
Comparing poison with something else is poison, so this is okay.

https://alive2.llvm.org/ce/z/e8iReb
https://alive2.llvm.org/ce/z/q4MurY

3 years ago[llvm-cov gcov] Support GCC 12 format
Fangrui Song [Sun, 20 Jun 2021 05:51:20 +0000 (22:51 -0700)]
[llvm-cov gcov] Support GCC 12 format

GCC 12 will change the length field to represent the number of bytes instead of
32-bit words. This avoids padding for strings.

3 years ago[llvm-cov gcov] Change case to match the prevailing style && replace getString with...
Fangrui Song [Sun, 20 Jun 2021 05:02:14 +0000 (22:02 -0700)]
[llvm-cov gcov] Change case to match the prevailing style && replace getString with readString

3 years ago[Flang][test] Fix Windows buildbot.
Michael Kruse [Sun, 20 Jun 2021 03:23:02 +0000 (22:23 -0500)]
[Flang][test] Fix Windows buildbot.

Add

    REQUIRES: shell

to tests that execute a UNIX shell script to not run on Windows.

3 years ago[test] Fix nocompress.test
Fangrui Song [Sat, 19 Jun 2021 23:27:52 +0000 (16:27 -0700)]
[test] Fix nocompress.test

3 years ago[profile] Fix variable name
Petr Hosek [Sat, 19 Jun 2021 21:55:32 +0000 (14:55 -0700)]
[profile] Fix variable name

This fixes a bug introduced in d85c258fd1e7459cc8085b5f364e356f50b490a4.

3 years ago[llvm-profdata] Make diagnostics consistent with the (no capitalization, no period...
Fangrui Song [Sat, 19 Jun 2021 21:54:24 +0000 (14:54 -0700)]
[llvm-profdata] Make diagnostics consistent with the (no capitalization, no period) style

The format is currently inconsistent. Use the https://llvm.org/docs/CodingStandards.html#error-and-warning-messages style.

And add `error:` or `warning:` to CHECK lines wherever appropriate.

3 years ago[profile] Don't publish VMO if there are no counters
Petr Hosek [Wed, 19 May 2021 17:14:00 +0000 (10:14 -0700)]
[profile] Don't publish VMO if there are no counters

If there are no counters, there's no need to publish the VMO.

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

3 years ago[LLD] [COFF] Avoid doing repeated fuzzy symbol lookup for each iteration. NFC.
Martin Storsjö [Thu, 17 Jun 2021 13:28:47 +0000 (16:28 +0300)]
[LLD] [COFF] Avoid doing repeated fuzzy symbol lookup for each iteration. NFC.

This is run every time around in the main linker loop. Once a match
has been found, stop trying to rematch such a symbol.

Not sure if this has any actual measurable performance impact though
(SymbolTable::findMangle() iterates over the whole symbol table for
each call and does fuzzy matching on top of that) but this makes the
code more reassuring to read at least. (This is in practice run for def
files listing undecorated stdcall functions to be exported.)

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

3 years ago[LLD] [MinGW] Print errors/warnings in lld-link with a "ld.lld" prefix
Martin Storsjö [Fri, 18 Jun 2021 11:29:55 +0000 (14:29 +0300)]
[LLD] [MinGW] Print errors/warnings in lld-link with a "ld.lld" prefix

Pass the original argv[0] to the coff linker, as the coff linker uses
the basename of argv[0] as the log prefix.

This makes error messages to be printed with a "ld.lld:" prefix
instead of "lld-link:". The current "lld-link:" prefix can be confusing
to users, as they're invoking the MinGW linker (and might not even have
a lld-link executable).

Keep the first argument as lld-link when printing the command line, to
make it an actually reproducible standalone command.

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

3 years ago[llvm-profdata] Delete unneeded empty output filename check
Fangrui Song [Sat, 19 Jun 2021 19:20:45 +0000 (12:20 -0700)]
[llvm-profdata] Delete unneeded empty output filename check

3 years ago[RISCV] Prevent formation of shXadd(.uw) and add.uw if it prevents the use of addi.
Craig Topper [Sat, 19 Jun 2021 18:54:59 +0000 (11:54 -0700)]
[RISCV] Prevent formation of shXadd(.uw) and add.uw if it prevents the use of addi.

If the outer add has an simm12 immediate operand we should prefer
it instead of materializing it in a register. This would guarantee
and extra instruction and temporary register. Since we don't check
one use on the shl or zext we might generate more instructions if
there is an additional user.

3 years ago[NFC] AMD Zen 3: fix typo in a comment
Roman Lebedev [Sat, 19 Jun 2021 19:04:42 +0000 (22:04 +0300)]
[NFC] AMD Zen 3: fix typo in a comment

3 years agoSimplify some typedef struct
Fangrui Song [Sat, 19 Jun 2021 18:36:44 +0000 (11:36 -0700)]
Simplify some typedef struct

3 years ago[gn build] (manually) port b9c05aff205b (MIRTests)
Nico Weber [Sat, 19 Jun 2021 17:03:51 +0000 (13:03 -0400)]
[gn build] (manually) port b9c05aff205b (MIRTests)

3 years ago[lld/mac] Make sure __thread_ptrs is in front of __thread_bss
Nico Weber [Sat, 19 Jun 2021 14:55:48 +0000 (10:55 -0400)]
[lld/mac] Make sure __thread_ptrs is in front of __thread_bss

The exact location doesn't matter, but it should be in front
of __thread_bss. We put it right in front of __thread_data
which is where ld64 seems to put it as well.

Fixes PR50769.

(As mentioned on the bug, there is probably a more structural
fix too, see comment 5. If we don't address this, it's likely
we'll run into this again with other synthetic sections. But
for now, let's fix the immediate breakage.)

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

3 years ago[lld/mac] Give __DATA,__thread_ptrs type S_THREAD_LOCAL_VARIABLE_POINTERS
Nico Weber [Sat, 19 Jun 2021 13:54:11 +0000 (09:54 -0400)]
[lld/mac] Give __DATA,__thread_ptrs type S_THREAD_LOCAL_VARIABLE_POINTERS

...instead of S_NON_LAZY_SYMBOL_POINTERS. This matches ld64.

Part of PR50769.

While here, also remove an old TODO that was done in D87178.

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

3 years ago[MIRPrinter] Add machine metadata support.
Michael Liao [Wed, 26 May 2021 00:20:52 +0000 (20:20 -0400)]
[MIRPrinter] Add machine metadata support.

- Distinct metadata needs generating in the codegen to attach correct
  AAInfo on the loads/stores after lowering, merging, and other relevant
  transformations.
- This patch adds 'MachhineModuleSlotTracker' to help assign slot
  numbers to these newly generated unnamed metadata nodes.
- To help 'MachhineModuleSlotTracker' track machine metadata, the
  original 'SlotTracker' is rebased from 'AbstractSlotTrackerStorage',
  which provides basic interfaces to create/retrive metadata slots. In
  addition, once LLVM IR is processsed, additional hooks are also
  introduced to help collect machine metadata and assign them slot
  numbers.
- Finally, if there is any such machine metadata, 'MIRPrinter' outputs
  an additional 'machineMetadataNodes' field containing all the
  definition of those nodes.

Reviewed By: arsenm

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

3 years ago[amdgpu] Improve the from f32 to i64.
Michael Liao [Fri, 11 Jun 2021 21:21:09 +0000 (17:21 -0400)]
[amdgpu] Improve the from f32 to i64.

- Take the same principle as the conversion from f64 to i64 with extra
  necessary pre- and post-processing. It helps to reduce that conversion
  sequence by half compared to legacy one.

Reviewed By: foad

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

3 years ago[InstCombine][test] add tests for select-of-bit-manip; NFC
Sanjay Patel [Sat, 19 Jun 2021 16:20:45 +0000 (12:20 -0400)]
[InstCombine][test] add tests for select-of-bit-manip; NFC

3 years agoRevert "Re-Revert "DirectoryWatcher: add an implementation for Windows""
Saleem Abdulrasool [Fri, 18 Jun 2021 23:00:01 +0000 (16:00 -0700)]
Revert "Re-Revert "DirectoryWatcher: add an implementation for Windows""

This reverts commit fb32de9e97af0921242a021e30020ffacf7aa6e2.

Remove the secondary synchronization point as noted by Adrian.  This is
technically only to make the builders happier about tests and should not
be needed.  This also pushes the condition variable setting to after the
watch is actually established (which was the source of the original race
condition, but would normally succeed as the thread shouldn't get put to
sleep immediately on the trigger of the condition variable).

This also was pretested on the chromium builders:
https://ci.chromium.org/ui/p/chromium/builders/try/win_upload_clang/1612/overview.

3 years agoAllow building for release with EXPENSIVE_CHECKS
Tomas Matheson [Fri, 18 Jun 2021 09:57:59 +0000 (10:57 +0100)]
Allow building for release with EXPENSIVE_CHECKS

D97225 moved LazyCallGraph verify() calls behind EXPENSIVE_CHECKS,
but verity() is defined for debug builds only so this had the unintended
effect of breaking release builds with EXPENSIVE_CHECKS.

Fix by enabling verify() for both debug and EXPENSIVE_CHECKS.

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

3 years ago[ARM][NFC] Tidy up subtarget frame pointer routines
Tomas Matheson [Thu, 17 Jun 2021 18:11:25 +0000 (19:11 +0100)]
[ARM][NFC] Tidy up subtarget frame pointer routines

getFramePointerReg only depends on information in ARMSubtarget,
so move it in there so it can be accessed from more places.

Make use of ARMSubtarget::getFramePointerReg to remove duplicated code.

The main use of useR7AsFramePointer is getFramePointerReg, so inline it.

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

3 years agoRevert "[clang][FPEnv] Clang floatng point model ffp-model=precise enables ffp-contra...
Melanie Blower [Sat, 19 Jun 2021 11:59:21 +0000 (07:59 -0400)]
Revert "[clang][FPEnv] Clang floatng point model ffp-model=precise enables ffp-contract=on"

This reverts commit a1449a10dbcfcf353f4f761281c4e572b4ce9308.
Seems like my changes to LNT had no effect -- puzzled.
The 21 tests pass on my sandbox with the clang patch but are
failing in exec time in the bot

3 years ago[gn build] Port 134723edd5bf
LLVM GN Syncbot [Sat, 19 Jun 2021 11:49:56 +0000 (11:49 +0000)]
[gn build] Port 134723edd5bf

3 years ago[libcxx] Move all algorithms into their own headers
Louis Dionne [Thu, 17 Jun 2021 15:30:11 +0000 (11:30 -0400)]
[libcxx] Move all algorithms into their own headers

This is a fairly mechanical change, it just moves each algorithm into
its own header. This is intended to be a NFC.

This commit re-applies 7ed7d4ccb899, which was reverted in 692d7166f771
because the Modules build got broken. The modules build has now been
fixed, so we're re-committing this.

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

Attribution note
----------------
I'm only committing this. This commit is a mix of D103583, D103330 and
D104171 authored by:

Co-authored-by: Christopher Di Bella <cjdb@google.com>
Co-authored-by: zoecarver <z.zoelec2@gmail.com>
3 years ago[clang-cl] Don't expand /permissive- to /ZC:strictStrings yet
Markus Böck [Sat, 19 Jun 2021 11:28:12 +0000 (13:28 +0200)]
[clang-cl] Don't expand /permissive- to /ZC:strictStrings yet

Follow up on rGc70b0e808da8

/Zc:strictStrings is an alias to an option part of the -W group. When the driver tries to render the option back to a string for the cc1 invocation, it sadly gets rendered with the original spelling instead of the alias, causing issues reported here: https://reviews.llvm.org/D103773#inline-989447

I am thinking it's the best to revert this part of the patch until I figured out how to correctly add the arg and until /Zc:strictStrings- exists/is needed.

3 years ago[clang][FPEnv] Clang floatng point model ffp-model=precise enables ffp-contract=on
Melanie Blower [Sat, 19 Jun 2021 10:49:27 +0000 (06:49 -0400)]
[clang][FPEnv] Clang floatng point model ffp-model=precise enables ffp-contract=on

This patch changes the ffp-model=precise to enables -ffp-contract=on
(previously -ffp-model=precise enabled -ffp-contract=fast). This is a
follow-up to Andy Kaylor's comments in the llvm-dev discussion
"Floating Point semantic modes". From the same email thread, I put
Andy's distillation of floating point options and floating point modes
into UsersManual.rst

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

3 years ago[mlir] Add EmitC dialect
Marius Brehler [Wed, 9 Jun 2021 13:38:10 +0000 (13:38 +0000)]
[mlir] Add EmitC dialect

This upstreams the EmitC dialect and the corresponding Cpp target, both
initially presented with [1], from [2] to MLIR core. For the related
discussion, see [3].

[1] https://reviews.llvm.org/D76571
[2] https://github.com/iml130/mlir-emitc
[3] https://llvm.discourse.group/t/emitc-generating-c-c-from-mlir/3388

Co-authored-by: Jacques Pienaar <jpienaar@google.com>
Co-authored-by: Simon Camphausen <simon.camphausen@iml.fraunhofer.de>
Co-authored-by: Oliver Scherf <oliver.scherf@iml.fraunhofer.de>
Reviewed By: rriddle

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

3 years ago[LoopUnroll] Push runtime unrolling decision up into tryToUnrollLoop()
Nikita Popov [Thu, 17 Jun 2021 19:49:29 +0000 (21:49 +0200)]
[LoopUnroll] Push runtime unrolling decision up into tryToUnrollLoop()

Currently, UnrollLoop() is passed an AllowRuntime flag and decides
itself whether runtime unrolling should be used or not. This patch
pushes the decision into the caller and allows us to eliminate the
ULO.TripCount and ULO.TripMultiple parameters.

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

3 years ago[RISCV] Optimize add-mul in the zba extension with SH*ADD
Ben Shi [Sat, 19 Jun 2021 03:01:43 +0000 (11:01 +0800)]
[RISCV] Optimize add-mul in the zba extension with SH*ADD

This patch does the following optimization.

Rx + Ry * 18 => (SH1ADD (SH3ADD Rx, Rx), Ry)
Rx + Ry * 20 => (SH2ADD (SH2ADD Rx, Rx), Ry)
Rx + Ry * 24 => (SH3ADD (SH1ADD Rx, Rx), Ry)
Rx + Ry * 36 => (SH2ADD (SH3ADD Rx, Rx), Ry)
Rx + Ry * 40 => (SH3ADD (SH2ADD Rx, Rx), Ry)
Rx + Ry * 72 => (SH3ADD (SH3ADD Rx, Rx), Ry)

Reviewed By: craig.topper

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

3 years ago[RISCV][test] Add new tests for add-mul optimization in the zba extension with SH*ADD
Ben Shi [Sat, 19 Jun 2021 02:09:08 +0000 (10:09 +0800)]
[RISCV][test] Add new tests for add-mul optimization in the zba extension with SH*ADD

These tests will show the following optimization by future patches.

Rx + Ry * 18  => (SH1ADD (SH3ADD Rx, Rx), Ry)
Rx + Ry * 20  => (SH2ADD (SH2ADD Rx, Rx), Ry)
Rx + Ry * 24  => (SH3ADD (SH1ADD Rx, Rx), Ry)
Rx + Ry * 36  => (SH2ADD (SH3ADD Rx, Rx), Ry)
Rx + Ry * 40  => (SH3ADD (SH2ADD Rx, Rx), Ry)
Rx + Ry * 72  => (SH3ADD (SH3ADD Rx, Rx), Ry)
Rx * (3 << C) => (SLLI (SH1ADD Rx, Rx), C)
Rx * (5 << C) => (SLLI (SH2ADD Rx, Rx), C)
Rx * (9 << C) => (SLLI (SH3ADD Rx, Rx), C)

Reviewed By: craig.topper

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

3 years ago[ORC][examples] Add missing library dependence
Lang Hames [Sat, 19 Jun 2021 04:44:38 +0000 (14:44 +1000)]
[ORC][examples] Add missing library dependence

3 years ago[mlir][linalg] Lower subtensor(pad_tensor) to pad_tensor(subtensor)
Matthias Springer [Sat, 19 Jun 2021 04:25:47 +0000 (13:25 +0900)]
[mlir][linalg] Lower subtensor(pad_tensor) to pad_tensor(subtensor)

Only high padding is supported at the moment. Low padding will be added in a separate commit.

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

3 years ago[re-land][lld-macho] Avoid force-loading the same archive twice
Jez Ng [Sat, 19 Jun 2021 02:30:57 +0000 (22:30 -0400)]
[re-land][lld-macho] Avoid force-loading the same archive twice

This reverts commit c9b241efd68c5a0f1f67e9250960ade454f3bc11, which was
a backout diff to fix the buildbots.

The real culprit of the crash is
https://github.com/llvm/llvm-project/commit/1d31fb8d122b1117cf20a9edc09812db8472e930,
which is being reverted.

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

3 years agoRevert "[lld-macho] Have path-related functions return std::string, not StringRef"
Jez Ng [Sat, 19 Jun 2021 02:19:09 +0000 (22:19 -0400)]
Revert "[lld-macho] Have path-related functions return std::string, not StringRef"

This reverts commit 1d31fb8d122b1117cf20a9edc09812db8472e930.

Making `rerootPath` return a temporary std::string caused a
use-after-free:

https://ci.chromium.org/ui/p/chromium/builders/try/win_upload_clang/1608/overview

3 years ago[llvm][Inliner] Add an optional PriorityInlineOrder
Liqiang Tao [Sat, 19 Jun 2021 02:17:19 +0000 (10:17 +0800)]
[llvm][Inliner] Add an optional PriorityInlineOrder

This patch adds an optional PriorityInlineOrder, which uses the heap to order inlining.
The callsite which size is smaller would have a higher priority.

Reviewed By: mtrofin

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

3 years ago[ORC][C-bindings] Add access to LLJIT IRTransformLayer, ThreadSafeModule utils.
Lang Hames [Sat, 19 Jun 2021 01:41:42 +0000 (11:41 +1000)]
[ORC][C-bindings] Add access to LLJIT IRTransformLayer, ThreadSafeModule utils.

This patch was derived from Valentin Churavy's work in
https://reviews.llvm.org/D104480. It adds support for setting the transform on
an IRTransformLayer, and for accessing the IRTransformLayer in LLJIT. It also
adds access to the ThreadSafeModule::withModuleDo method for thread-safe
access to modules.

A new example has been added to show how to use these APIs to optimize a module
during materialization.

Thanks Valentin!

Reviewed By: lhames

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

3 years ago[ORC][examples] Fix file name in comment.
Lang Hames [Fri, 18 Jun 2021 23:22:45 +0000 (09:22 +1000)]
[ORC][examples] Fix file name in comment.

3 years ago[libfuzzer] Disable failing DFSan-related tests
George Balatsouras [Fri, 18 Jun 2021 21:10:49 +0000 (21:10 +0000)]
[libfuzzer] Disable failing DFSan-related tests

These have been broken by https://reviews.llvm.org/D104494.
However, `lib/fuzzer/dataflow/` is unused (?) so addressing this is not a priority.

Added TODOs to re-enable them in the future.

Reviewed By: stephan.yichao.zhao

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

3 years ago[InstCombine] Don't transform code if DoTransform is false
Guozhi Wei [Sat, 19 Jun 2021 01:01:34 +0000 (18:01 -0700)]
[InstCombine] Don't transform code if DoTransform is false

In patch https://reviews.llvm.org/D72396, it doesn't check DoTransform before transforming the code, and generates wrong result for the attached test case.

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

3 years agoRevert "[lld-macho] Avoid force-loading the same archive twice"
Nico Weber [Sat, 19 Jun 2021 00:22:15 +0000 (20:22 -0400)]
Revert "[lld-macho] Avoid force-loading the same archive twice"

This reverts commit 24706cd73cd150543753a2e169c68a2c68da46a1.
Test seems to fail flakily. See comments on https://reviews.llvm.org/D104353
for a hypothesis for why.

3 years ago[InstrProfiling][ELF] Make __profd_ private if the function does not use value profiling
Fangrui Song [Sat, 19 Jun 2021 00:01:17 +0000 (17:01 -0700)]
[InstrProfiling][ELF] Make __profd_ private if the function does not use value profiling

On ELF, the D1003372 optimization can apply to more cases. There are two
prerequisites for making `__profd_` private:

* `__profc_` keeps `__profd_` live under compiler/linker GC
* `__profd_` is not referenced by code

The first is satisfied because all counters/data are in a section group (either
`comdat any` or `comdat noduplicates`). The second requires that the function
does not use value profiling.

Regarding the second point: `__profd_` may be referenced by other text sections
due to inlining. There will be a linker error if a prevailing text section
references the non-prevailing local symbol.

With this change, a stage 2 (`-DLLVM_TARGETS_TO_BUILD=X86 -DLLVM_BUILD_INSTRUMENTED=IR`)
clang is 4.2% smaller (1-169620032/177066968).
`stat -c %s **/*.o | awk '{s+=$1}END{print s}' is 2.5% smaller.

Reviewed By: davidxl, rnk

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

3 years ago[flang] Recode a switch() to dodge a sketchy warning
peter klausler [Fri, 18 Jun 2021 23:55:37 +0000 (16:55 -0700)]
[flang] Recode a switch() to dodge a sketchy warning

One of the buildbots uses a compiler (can't tell which) that
doesn't approve of a "default:" in a switch statement whose
cases appear to completely cover all possible values of an
enum class.  But this switch is in raw data dumping code that
needs to allow for incorrect values in memory.  So rewrite it
as a cascade of if statements; performance doesn't matter here.

3 years ago[profile][test] Delete profraw directory so that tests are immune to format version...
Fangrui Song [Fri, 18 Jun 2021 23:44:03 +0000 (16:44 -0700)]
[profile][test] Delete profraw directory so that tests are immune to format version upgrade

3 years agoAMDGPU: Fix infinite loop in DAG combine with fneg + fma
Matt Arsenault [Sat, 12 Jun 2021 15:21:57 +0000 (11:21 -0400)]
AMDGPU: Fix infinite loop in DAG combine with fneg + fma

We were not reporting isFNegFree for v2f32, although it is effectively
free after legalization. The generic combine was pulling fneg out of
the fma source operands, and the AMDGPU combine was doing the
opposite.

3 years agoRe-Revert "DirectoryWatcher: add an implementation for Windows"
Nico Weber [Fri, 18 Jun 2021 22:50:44 +0000 (18:50 -0400)]
Re-Revert "DirectoryWatcher: add an implementation for Windows"

This reverts commit 76f1baa7875acd88bdd4b431eed6e2d2decfc0fe.

Also reverts 2 follow-ups:

1. Revert "DirectoryWatcher: also wait for the notifier thread"
   This reverts commit 527a1821e6f8e115db3335a3341c7ac491725a0d.

2. Revert "DirectoryWatcher: close a possible window of race on Windows"
   This reverts commit a6948da86ad7e78d66b26263c2681ef6385cc234.

Makes tests hang, see comments on https://reviews.llvm.org/D88666

3 years agoAMDGPU: Fix assert on m0_lo16/m0_hi16
Matt Arsenault [Mon, 14 Jun 2021 16:53:36 +0000 (12:53 -0400)]
AMDGPU: Fix assert on m0_lo16/m0_hi16

These get added (redundantly) to the bundle expanded for indirect
register accesses. We hit this path only when there is a call in the
function.

3 years ago[OpenMP] Make bug49334.cpp more reproducible
Shilei Tian [Fri, 18 Jun 2021 22:35:34 +0000 (18:35 -0400)]
[OpenMP] Make bug49334.cpp more reproducible

`bug49334.cpp` cannot detect data race in `libomptarget` efficiently. It
is reported that with `N = 256` and `BS = 16`, the data race can be reproduced
more steadily. The next coming pathces will fix it so this patch is expected to
fail now.

Reviewed By: jdoerfert

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

3 years ago[CSSPGO] Undoing the concept of dangling pseudo probe
Hongtao Yu [Thu, 17 Jun 2021 18:09:13 +0000 (11:09 -0700)]
[CSSPGO] Undoing the concept of dangling pseudo probe

As a follow-up to https://reviews.llvm.org/D104129, I'm cleaning up the danling probe related code in both the compiler and llvm-profgen.

I'm seeing a 5% size win for the pseudo_probe section for SPEC2017 and 10% for Ciner. Certain benchmark such as 602.gcc has a 20% size win. No obvious difference seen on build time for SPEC2017 and Cinder.

Reviewed By: wenlei

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

3 years ago[flang] Fix clang build (struct/class mismatch warning)
peter klausler [Fri, 18 Jun 2021 22:11:55 +0000 (15:11 -0700)]
[flang] Fix clang build (struct/class mismatch warning)

A recent patch changed a struct into a class, but missed a
forward definition.  GCC didn't warn, but clang does.  Fix.

3 years agoWhitespace fixes for
Nick Desaulniers [Fri, 18 Jun 2021 22:09:18 +0000 (15:09 -0700)]
Whitespace fixes for
193e41c987127aad86d0380df83e67a85266f1f1
which reportedly fails on the mac builds.

3 years agoPartial rollback: Disable MLIR verifier parallelism.
Stella Laurenzo [Fri, 18 Jun 2021 21:42:56 +0000 (21:42 +0000)]
Partial rollback: Disable MLIR verifier parallelism.

Deadlocks have been found in several downstream projects as noted on the original patch: https://reviews.llvm.org/D104207

Disabling pending full root cause analysis.

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

3 years ago[LoopUnroll] Simplify optimization remarks
Nikita Popov [Thu, 17 Jun 2021 19:03:50 +0000 (21:03 +0200)]
[LoopUnroll] Simplify optimization remarks

Remove dependence on ULO.TripCount/ULO.TripMultiple from ORE and
debug code. For debug code, print information about all exits.
For optimization remarks, only include the unroll count and the
type of unroll (complete, partial or runtime), but omit detailed
information about exit folding, now that more than one exit may
be folded.

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

3 years ago[CSSPGO][llvm-profgen] Fix an issue in findDisjointRanges
Hongtao Yu [Fri, 18 Jun 2021 01:02:45 +0000 (18:02 -0700)]
[CSSPGO][llvm-profgen] Fix an issue in findDisjointRanges

We were using 0 as an indicator of invalid offset when computing disjoint ranges. In reality, 0 can be an valid code offset which stands for the first function in .text section. I'm using UINT64_MAX as an invalid code offset instead.

Reviewed By: wenlei

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

3 years ago[mlir] Add support to SourceMgrDiagnosticHandler for filtering FileLineColLocs
River Riddle [Fri, 18 Jun 2021 20:30:16 +0000 (20:30 +0000)]
[mlir] Add support to SourceMgrDiagnosticHandler for filtering FileLineColLocs

This revision adds support for passing a functor to SourceMgrDiagnosticHandler for filtering out FileLineColLocs when emitting a diagnostic. More specifically, this can be useful in situations where there may be large CallSiteLocs with locations that aren't necessarily important/useful for users.

For now the filtering support is limited to FileLineColLocs, but conceptually we could allow filtering for all locations types if a need arises in the future.

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

3 years ago[GCOVProfiling] don't profile Fn's w/ noprofile attribute
Nick Desaulniers [Fri, 18 Jun 2021 20:58:34 +0000 (13:58 -0700)]
[GCOVProfiling] don't profile Fn's w/ noprofile attribute

Similar to D104475, the Linux kernel would like to avoid compiler
generated code in certain functions. The no_profile function
attribute can be used in C to generate the the noprofile fn attr in IR.
Respect that from GCOVProfiling.

Link: https://lore.kernel.org/lkml/CAKwvOdmPTi93n2L0_yQkrzLdmpxzrOR7zggSzonyaw2PGshApw@mail.gmail.com/
Reviewed By: MaskRay

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

3 years ago[Clang][Codegen] Add GNU function attribute 'no_profile' and lower it to noprofile
Nick Desaulniers [Fri, 18 Jun 2021 20:33:44 +0000 (13:33 -0700)]
[Clang][Codegen] Add GNU function attribute 'no_profile' and lower it to noprofile

noprofile IR attribute already exists to prevent profiling with PGO;
emit that when a function uses the newly added no_profile function
attribute.

The Linux kernel would like to avoid compiler generated code in
functions annotated with such attribute. We already respect this for
libcalls to fentry() and mcount().

Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80223
Link: https://lore.kernel.org/lkml/CAKwvOdmPTi93n2L0_yQkrzLdmpxzrOR7zggSzonyaw2PGshApw@mail.gmail.com/
Reviewed By: MaskRay, void, phosek, aaron.ballman

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

3 years ago[NFC][compiler-rt][hwasan] Move hwasanThreadList().CreateCurrentThread() into InitThreads
Leonard Chan [Fri, 18 Jun 2021 20:39:58 +0000 (13:39 -0700)]
[NFC][compiler-rt][hwasan] Move hwasanThreadList().CreateCurrentThread() into InitThreads

Once D104553 lands, CreateCurrentThread will be able to accept optional
parameters for initializing the hwasan thread object. On fuchsia, we can get
stack info in the platform-specific InitThreads and pass it through
CreateCurrentThread. On linux, this is a no-op.

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

3 years ago[lld-macho] Have path-related functions return std::string, not StringRef
Jez Ng [Fri, 18 Jun 2021 06:32:31 +0000 (02:32 -0400)]
[lld-macho] Have path-related functions return std::string, not StringRef

findLibrary() returned a StringRef while findFramework & other helper
functions returned std::strings. Standardize on std::string.

(I initially tried making the helper functions all return StringRefs,
but I realized we shouldn't return input StringRefs since their
lifetimes would not be obvious from the calling code.)

3 years ago[lld-macho] Handle non-extern symbols marked as private extern
Jez Ng [Fri, 18 Jun 2021 20:35:46 +0000 (16:35 -0400)]
[lld-macho] Handle non-extern symbols marked as private extern

Previously, we asserted that such a case was invalid, but in fact
`ld -r` can emit such symbols if the input contained a (true) private
extern, or if it contained a symbol started with "L".

Non-extern symbols marked as private extern are essentially equivalent
to regular TU-scoped symbols, so no new functionality is needed.

Reviewed By: #lld-macho, thakis

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

3 years ago[flang][OpenMP] Add semantic checks for occurrence of nested Barrier regions
Arnamoy Bhattacharyya [Fri, 18 Jun 2021 19:37:36 +0000 (15:37 -0400)]
[flang][OpenMP] Add semantic checks for occurrence of nested Barrier regions

This patch adds the following nesting check for `barrier` constructs:

```
A barrier region may not be closely nested inside a worksharing, loop, task, taskloop, critical, ordered, atomic, or master region.
```

Also adds a test case for the check,

Reviewed By: kiranchandramohan

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

3 years ago[libc++] [P1518R2] Better CTAD behavior for containers with allocators.
Arthur O'Dwyer [Mon, 1 Mar 2021 22:08:24 +0000 (17:08 -0500)]
[libc++] [P1518R2] Better CTAD behavior for containers with allocators.

P1518 does the following in C++23 but we'll just do it in C++17 as well:
- Stop requiring `Alloc` to be an allocator on some container-adaptor deduction guides
- Stop deducing from `Allocator` on some sequence container constructors
- Stop deducing from `Allocator` on some other container constructors (libc++ already did this)

The affected constructors are the "allocator-extended" versions of
constructors where the non-allocator arguments are already sufficient
to deduce the allocator type. For example,

    std::pmr::vector<int> v1;
    std::vector v2(v1, std::pmr::new_delete_resource());
    std::stack s2(v1, std::pmr::new_delete_resource());

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

3 years ago[clang-tidy] performance-unnecessary-copy-initialization: Directly examine the initia...
Felix Berger [Mon, 24 May 2021 13:45:24 +0000 (09:45 -0400)]
[clang-tidy] performance-unnecessary-copy-initialization: Directly examine the initializing var's initializer.

This fixes false positive cases where a reference is initialized outside of a
block statement and then its initializing variable is modified. Another case is
when the looped over container is modified.

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

Reviewed-by: ymandel
3 years ago[RISCV] Teach vsetvli insertion to remember when predecessors have same AVL and SEW...
Craig Topper [Fri, 18 Jun 2021 19:10:17 +0000 (12:10 -0700)]
[RISCV] Teach vsetvli insertion to remember when predecessors have same AVL and SEW/LMUL ratio if their VTYPEs otherwise mismatch.

Previously we went directly to unknown state on VTYPE mismatch.
If we instead remember the partial match, we can use this to
still use X0, X0 vsetvli in successors if AVL and needed SEW/LMUL
ratio match.

Reviewed By: frasercrmck

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

3 years ago[CSSPGO][llvm-profgen] Ignore LBR records after interrupt transition
Hongtao Yu [Fri, 18 Jun 2021 01:15:45 +0000 (18:15 -0700)]
[CSSPGO][llvm-profgen] Ignore LBR records after interrupt transition

If we have seen an inwards transition from external code to internal code, but not a following outwards transition, the inwards transition is likely due to interrupt which is usually unpaired. Ignore current  and subsequent entries since they are likely from an unrelated pre-interrupt context.

LBR records from different interrupt context are unrelated and they should not be mixed together. Currenlty the OS does this for task-scheduling interrupt but not for all interrupts.

Reviewed By: wenlei, wlei

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

3 years ago[AMDGPU] [CodeGen] Fold negate llvm.amdgcn.class into test mask
Anshil Gandhi [Fri, 18 Jun 2021 19:04:12 +0000 (13:04 -0600)]
[AMDGPU] [CodeGen] Fold negate llvm.amdgcn.class into test mask

Implemented the transformation of xor (llvm.amdgcn.class x, mask), -1 into
llvm.amdgcn.class(x, ~mask). Added LIT tests as well.

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

3 years ago[CSSPGO] Fix an invalid hash table reference issue in the CS preinliner.
Hongtao Yu [Wed, 16 Jun 2021 18:51:39 +0000 (11:51 -0700)]
[CSSPGO] Fix an invalid hash table reference issue in the CS preinliner.

We were using a `StringMap` object to store all profiles to be emitted. The object is basically an unordered hash table, therefore updating it in the process of trasvering it may cause issue since the underlying bucket array could change.

I'm also moving the `csspgo-preinliner` switch around so that no context tri will be constructed (by the constructor of `CSPreInliner`) when the switch is off.

Reviewed By: wenlei

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

3 years ago[DFSan] Cleanup code for platforms other than Linux x86_64.
Andrew Browne [Thu, 17 Jun 2021 21:52:09 +0000 (14:52 -0700)]
[DFSan] Cleanup code for platforms other than Linux x86_64.

These other platforms are unsupported and untested.
They could be re-added later based on MSan code.

Reviewed By: gbalats, stephan.yichao.zhao

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

3 years agoRevert "Delay initialization of OptBisect"
Krzysztof Parzyszek [Fri, 18 Jun 2021 18:16:45 +0000 (13:16 -0500)]
Revert "Delay initialization of OptBisect"

This reverts commit ec91df8d8195b8b759a89734dba227da1eaa729f.

It was committed by accident.

3 years agoXFAIL a testcase on Hexagon (missing-abstract-variable.ll)
Krzysztof Parzyszek [Fri, 18 Jun 2021 18:13:09 +0000 (13:13 -0500)]
XFAIL a testcase on Hexagon (missing-abstract-variable.ll)

This seems to be a common problem among several architectures.

3 years agoDelay initialization of OptBisect
Krzysztof Parzyszek [Fri, 18 Jun 2021 17:24:03 +0000 (12:24 -0500)]
Delay initialization of OptBisect

When LLVM is used in other projects, it may happen that global cons-
tructors will execute before the call to ParseCommandLineOptions.
Since OptBisect is initialized via a constructor, and has no ability
to be updated at a later time, passing "-opt-bisect-limit" to the
parse function may have no effect.

To avoid this problem use a cl::cb (callback) to set the bisection
limit when the option is actually processed.

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

3 years ago[OpenMP] Update FAQ for enabling cuda offloading
Asher Mancinelli [Fri, 18 Jun 2021 17:52:59 +0000 (11:52 -0600)]
[OpenMP] Update FAQ for enabling cuda offloading

Add an FAQ entry and add a few lines to an existing one. Document
the use of `GCC_INSTALL_PREFIX` for pointing clang to correct
GCC installation for two-stage build.

Reviewed By: jhuber6

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

3 years ago[hwasan] Clarify report for allocation-tail-overwritten.
Florian Mayer [Fri, 18 Jun 2021 11:55:40 +0000 (12:55 +0100)]
[hwasan] Clarify report for allocation-tail-overwritten.

Explain what the given stack trace means before showing it, rather than
only in the paragraph at the end.

Reviewed By: eugenis

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

3 years ago[compiler-rt][hwasan] Move Thread::Init into hwasan_linux.cpp
Leonard Chan [Wed, 16 Jun 2021 17:24:51 +0000 (10:24 -0700)]
[compiler-rt][hwasan] Move Thread::Init into hwasan_linux.cpp

This allows for other implementations to define their own version of `Thread::Init`.
This will be the case for Fuchsia where much of the thread initialization can be
broken up between different thread hooks (`__sanitizer_before_thread_create_hook`,
`__sanitizer_thread_create_hook`, `__sanitizer_thread_start_hook`). Namely, setting
up the heap ring buffer and stack info and can be setup before thread creation.
The stack ring buffer can also be setup before thread creation, but storing it into
`__hwasan_tls` can only be done on the thread start hook since it's only then we
can access `__hwasan_tls` for that thread correctly.

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

3 years ago[flang] Runtime implementation for default derived type formatted I/O
peter klausler [Thu, 17 Jun 2021 20:13:19 +0000 (13:13 -0700)]
[flang] Runtime implementation for default derived type formatted I/O

This is *not* user-defined derived type I/O, but rather Fortran's
built-in capabilities for using derived type data in I/O lists
and NAMELIST groups.

This feature depends on having the derived type description tables
that are created by Semantics available, passed through compilation
as initialized static objects to which pointers can be targeted
in the descriptors of I/O list items and NAMELIST groups.

NAMELIST processing now handles component references on input
(e.g., "&GROUP x%component = 123 /").

The C++ perspectives of the derived type information records
were transformed into proper classes when it was necessary to add
member functions to them.

The code in Semantics that generates derived type information
was changed to emit derived type components in component order,
not alphabetic order.

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

3 years ago[lldb-vscode] attempt to fix flakiness
Walter Erquinigo [Fri, 18 Jun 2021 17:10:57 +0000 (10:10 -0700)]
[lldb-vscode] attempt to fix flakiness

There are many tests failing intermittently for lldb-vscode after
https://reviews.llvm.org/rGaa4685c0fb3aab5acb90be5fd3eb5ba8bf1e3211. I'm
unsure if this actually the culprit, so I'm softly removing that feature
to see if that fixes the issue.

3 years ago[lld/mac] Support -data_in_code_info, -function_starts flags
Nico Weber [Fri, 18 Jun 2021 15:47:49 +0000 (11:47 -0400)]
[lld/mac] Support -data_in_code_info, -function_starts flags

These are on by default, but there's also an explicit flag for them.

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

3 years agoRename option -icf MODE to --icf=MODE
Greg McGary [Fri, 18 Jun 2021 16:38:50 +0000 (09:38 -0700)]
Rename option -icf MODE to --icf=MODE

The `icf` command-line option is not present in ld64, so it should use the LLD option syntax, which begins with double dashes and separates primary option from any suboption with the equal sign.

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

3 years ago[AArch64] Add TableGen patterns to generate uaddlv
Jingu Kang [Mon, 14 Jun 2021 15:42:00 +0000 (16:42 +0100)]
[AArch64] Add TableGen patterns to generate uaddlv

uaddv(uaddlp(x)) ==> uaddlv(x)
addp(uaddlp(x))  ==> uaddlv(x)

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

3 years ago[NFC][libomptarget] Build elf_common with PIC.
Vyacheslav Zakharin [Fri, 18 Jun 2021 15:54:10 +0000 (08:54 -0700)]
[NFC][libomptarget] Build elf_common with PIC.

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

3 years ago[NFC][libomptarget] Fixed -DLLVM_ENABLE_RUNTIMES="openmp" build.
Vyacheslav Zakharin [Fri, 18 Jun 2021 14:17:23 +0000 (07:17 -0700)]
[NFC][libomptarget] Fixed -DLLVM_ENABLE_RUNTIMES="openmp" build.

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