platform/upstream/llvm.git
2 years ago[LV][RISCV] Disable vectorization of epilogue loops
Philip Reames [Tue, 25 Oct 2022 21:01:33 +0000 (14:01 -0700)]
[LV][RISCV] Disable vectorization of epilogue loops

Epilogue loop vectorization is a feature in the vectorize intended to avoid running fully scalar code when the vector length of the main loop turns out to be either longer than the trip count of the actual loop, or with a huge remainder.

In practice, this feature appears to not have been well tuned. I honestly don't think it should be on by default at all, but it definitely shouldn't be on for RISCV. Note that other targets have also disabled it, but they've done so via disabling interleaving - which is, well, completely unrelated - and we don't want to do that for RISCV.

In the near term, many examples I'm seeing have terrible codegen for epilogue vectorization. We are greatly increasing code size for little value at reasonable VLEN values for small types. In the long term, the cases that epilogue vectorization are intended to handle are likely better handled via tail folding on RISCV.

As an aside, I also don't really trust the correctness of epilogue vectorization. The code structure is such that otherwise straight forward changes sometimes break only epilogue vectorization. The reuse of an existing vplan without careful validation opens significant room for nasty bugs. Given how rarely the code is exercised, that is not a good combination.

As such, this patch introduces a TTI hook, and completely disables epilogue vectorization on RISCV.

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

2 years agoQuick fix for previous commit; small code change before commit
Jason Molenda [Tue, 25 Oct 2022 20:56:02 +0000 (13:56 -0700)]
Quick fix for previous commit; small code change before commit

2 years agoChange debugserver to clear PAC auth bits manually
Jason Molenda [Tue, 25 Oct 2022 20:47:14 +0000 (13:47 -0700)]
Change debugserver to clear PAC auth bits manually

debugserver is currently using kernel supplied macros,
arm_thread_state64_get_{pc,fp,sp,lr} which can crash on an authorization
failure when the inferior has crashed with an invalid pc value, for
instance.  debugserver needs to be resistant to crashing in this
scenario, and we're merely clearing the bits, so do it with a bit
mask operation instead.

Differential Revision: https://reviews.llvm.org/D136620
rdar://98073271
rdar://100663221

2 years ago[clang-doc] Fix typedef/using output.
Brett Wilson [Mon, 24 Oct 2022 20:48:55 +0000 (13:48 -0700)]
[clang-doc] Fix typedef/using output.

Provides an initializer for the TypedefInfo.IsUsing member. Previously
this member was uninitialized and would produce random output.

Adds the Description (code comments) to the bitcode reader/writer.
Previously the typedef/using descriptions were lost during the bitcode
round-trip. Adds a test for this.

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

2 years ago[lld-macho] Don't sort map file entries by name
Jez Ng [Tue, 25 Oct 2022 20:26:57 +0000 (16:26 -0400)]
[lld-macho] Don't sort map file entries by name

ld64 emits them in address order but not in alphabetical order. This
sorting is particularly expensive for dead-stripped symbols (which don't
need to be sorted at all, unlike live symbols that need to be sorted by
address).

Timings for chromium_framework_less_dwarf (with the `-map` flag added to
the response file) on my 16-core Mac Pro:

             base           diff           difference (95% CI)
  sys_time   1.997 ± 0.038  2.004 ± 0.028  [  -0.6% ..   +1.3%]
  user_time  8.698 ± 0.085  8.167 ± 0.070  [  -6.6% ..   -5.6%]
  wall_time  7.965 ± 0.114  7.715 ± 0.347  [  -5.1% ..   -1.2%]
  samples    25             23

Reviewed By: #lld-macho, thakis

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

2 years agoFix exception description in lldb-vscode
Jeffrey Tan [Wed, 19 Oct 2022 18:58:23 +0000 (11:58 -0700)]
Fix exception description in lldb-vscode

There is a bug in lldb-vscode that only shows stop reason ("exception") in
stopped event without showing the stop description of thrown exception. This
causes VSCode UI to only show "Paused on Exception" general message in
callstack window UI.

This patch fixes the bug so that VSCode callstack will show the detailed
exceptioni description, like "signal SIGABRT" or "EXC_BAD_ACCESS..." which
aligns with command line lldb experience.

I use C++ exception in testcase because the hardware exception description is
platform dependent and hard to verify.

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

2 years ago[Instrumentation] Remove legacy passes
Arthur Eubanks [Mon, 24 Oct 2022 16:26:16 +0000 (09:26 -0700)]
[Instrumentation] Remove legacy passes

Reviewed By: MaskRay

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

2 years ago[LoopPeeling] Add flag to disable support for peeling loops with non-latch exits
Alina Sbirlea [Mon, 24 Oct 2022 22:23:16 +0000 (15:23 -0700)]
[LoopPeeling] Add flag to disable support for peeling loops with non-latch exits

Add a flag to allow disabling the changes in
https://reviews.llvm.org/D134803.

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

2 years ago[Driver][Fuchsia] Make -mfix-cortex-a53-835769 default when targeting Fuchsia
Alex Brachet [Tue, 25 Oct 2022 19:17:52 +0000 (19:17 +0000)]
[Driver][Fuchsia] Make -mfix-cortex-a53-835769 default when targeting Fuchsia

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

2 years ago[wasm-ld] Add -mcpu=mvp to wasm-ld tests
Dan Gohman [Tue, 25 Oct 2022 19:13:49 +0000 (12:13 -0700)]
[wasm-ld] Add -mcpu=mvp to wasm-ld tests

Following up on D125729, add -mcpu-mvp to wasm-ld tests that use llc to
avoid test changes as a result of default target changes.

2 years ago[FuncSpec] Consider small noinline functions for specialisation
Momchil Velikov [Tue, 25 Oct 2022 17:56:31 +0000 (18:56 +0100)]
[FuncSpec] Consider small noinline functions for specialisation

Small functions with size under a given threshold are not
considered for specialisaion on the presumption that they
are easy to inline. This does not apply to `noinline`
functions, though.

Reviewed By: ChuanqiXu

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

2 years ago[JITLink][AArch64] Add a generic 'createAnonymousPointer' utility.
Lang Hames [Tue, 25 Oct 2022 18:31:48 +0000 (11:31 -0700)]
[JITLink][AArch64] Add a generic 'createAnonymousPointer' utility.

Adds a generic utility for creating anonymous aarch64 pointer blocks
(automatically adding an edge to initialize the pointer if given an
initial target).

Updates the aarch64 GOTTableManager to use the utility when building
GOT entries.

2 years ago[WebAssembly] Update supported features in the generic CPU configuration
Dan Gohman [Tue, 18 Oct 2022 17:50:37 +0000 (10:50 -0700)]
[WebAssembly] Update supported features in the generic CPU configuration

Enable sign-ext and mutable-globals in -mcpu=generic. This makes these features
enabled by default.

These features are all [finished proposals], and all major wasm engines
support them.

[finished proposals]: https://github.com/WebAssembly/proposals/blob/main/finished-proposals.md

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

2 years agoUpdate supported features in the generic CPU configuration
Dan Gohman [Tue, 18 Oct 2022 18:10:19 +0000 (11:10 -0700)]
Update supported features in the generic CPU configuration

Accompanying https://reviews.llvm.org/D125728, this updates LLVM
Codegen's "generic" CPU to enable the same new features.

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

2 years ago[M68k][Driver] Rename target features and macros test files
Min-Yih Hsu [Tue, 25 Oct 2022 17:38:50 +0000 (10:38 -0700)]
[M68k][Driver] Rename target features and macros test files

test/Driver/m68k-features.cpp -> test/Driver/m68k-macros.cpp
test/Driver/m68k-fixed-register.c -> test/Driver/m68k-features.cpp

The original m68k-features.cpp should really be called m68k-macros.cpp
since it's testing built-in macro definitions rather than sub-target
features. Which are part of what m68k-fixed-register.c was previously
doing. NFC.

2 years ago[flang] Add atomic_fetch_add to list of intrinsics
Katherine Rasmussen [Mon, 3 Oct 2022 17:57:26 +0000 (10:57 -0700)]
[flang] Add atomic_fetch_add to list of intrinsics

Add the atomic subroutine, atomic_fetch_add, to the list of
intrinsic subroutines, add its last dummy argument to a check
for coindexed-object, and update test.

Reviewed By: PeteSteinfeld

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

2 years ago[CUDA, NVPTX] Added basic __bf16 support for NVPTX.
Artem Belevich [Thu, 20 Oct 2022 01:49:32 +0000 (18:49 -0700)]
[CUDA, NVPTX] Added basic __bf16 support for NVPTX.

Recent Clang changes expose _bf16 types for SSE2-enabled host compilations and
that makes those types visible furing GPU-side compilation, where it currently
fails with Sema complaining that __bf16 is not supported.

Considering that __bf16 is a storage-only type, enabling it for NVPTX if it's
enabled on the host should pose no issues, correctness-wise.

Recent NVIDIA GPUs have introduced bf16 support, so we'll likely grow better
support for __bf16 on NVPTX going forward.

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

2 years ago[libc++] Add missing includes to xlocale helpers
Louis Dionne [Mon, 24 Oct 2022 22:23:59 +0000 (18:23 -0400)]
[libc++] Add missing includes to xlocale helpers

Also, make sure those are compatible with _LIBCPP_HAS_NO_WIDE_CHARACTERS.

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

2 years ago[libc] Add Linux implementations of time and clock functions.
Siva Chandra Reddy [Tue, 25 Oct 2022 06:45:45 +0000 (06:45 +0000)]
[libc] Add Linux implementations of time and clock functions.

Reviewed By: michaelrj

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

2 years ago[BOLT] Add mold-style PLT support
Maksim Panchenko [Tue, 25 Oct 2022 00:54:25 +0000 (17:54 -0700)]
[BOLT] Add mold-style PLT support

mold linker creates symbols for PLT entries and that caught BOLT by
surprise. Add the support for marked PLT entries.

Fixes: #58498

Reviewed By: yota9

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

2 years ago[docs] Update clang-formatted-files.txt after bindings/go removal (D135436)
Fangrui Song [Tue, 25 Oct 2022 17:57:19 +0000 (10:57 -0700)]
[docs] Update clang-formatted-files.txt after bindings/go removal (D135436)

2 years ago[LegacyPM] Remove DataFlowSanitizerLegacyPass
Fangrui Song [Tue, 25 Oct 2022 17:55:29 +0000 (10:55 -0700)]
[LegacyPM] Remove DataFlowSanitizerLegacyPass

Using the legacy PM for the optimization pipeline was deprecated in 13.0.0.
Following recent changes to remove non-core features of the legacy
PM/optimization pipeline, remove DataFlowSanitizerLegacyPass.

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

2 years ago[AArch64]SME2 single-multi and multi-multi INT dot product instructions[part2]
Caroline Concatto [Sat, 22 Oct 2022 14:55:02 +0000 (15:55 +0100)]
[AArch64]SME2 single-multi and multi-multi INT dot product  instructions[part2]

This patch adds the assembly/disassembly for the following instructions:
        SDOT: (4-way, multiple and single vector): Multi-vector signed integer dot-product by vector.
              SDOT (4-way, multiple vectors): Multi-vector signed integer dot-product.
        UDOT: (4-way, multiple and single vector): Multi-vector unsigned integer dot-product by vector.
              (4-way, multiple vectors): Multi-vector unsigned integer dot-product.
    for groups of 2 and 4 ZA registers

The reference can be found here:
                https://developer.arm.com/documentation/ddi0602/2022-09

Depends on: D135563

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

2 years ago[flang] Add check for constraints on synchronization-stmts
Katherine Rasmussen [Mon, 17 Oct 2022 19:39:21 +0000 (13:39 -0600)]
[flang] Add check for constraints on synchronization-stmts

In the CoarrayChecker, add checks for the constraints C1172 and
C1173, which constrain sync-stat-list. Add these checks to
sync-all-stmt, sync-images-stmt, sync-memory-stmt, and
sync-team-stmt. Also add a check for the constraint C1174 in
sync-images-stmt. Update semantics tests for these stmts.

Reviewed By: klausler

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

2 years ago[AArch64]SME2 single-multi and multi-multi INT/FP dot product instructions
Caroline Concatto [Sat, 22 Oct 2022 11:13:49 +0000 (12:13 +0100)]
[AArch64]SME2 single-multi and multi-multi INT/FP dot product instructions

This patch adds the assembly/disassembly for the following instruction:
INT:
  SDOT (2-way, multiple and single vector): Multi-vector signed integer dot-product by vector.
       (2-way, multiple vectors): Multi-vector signed integer dot-product.
  UDOT (2-way, multiple and single vector): Multi-vector unsigned integer dot-product by vector.
       (2-way, multiple vectors): Multi-vector unsigned integer dot-product.
  SUDOT (multiple and indexed vector): Multi-vector signed by unsigned integer dot-product by indexed elements.
        (multiple and single vector): Multi-vector signed by unsigned integer dot-product by vector.
  USDOT (multiple and single vector): Multi-vector unsigned by signed integer dot-product by vector.
        (multiple vectors): Multi-vector unsigned by signed integer dot-product.
FP:
  BFDOT(multiple and single vector): Multi-vector BFloat16 floating-point dot-product by vector.
        (multiple vectors): Multi-vector BFloat16 floating-point dot-product.

  FDOT (multiple and single vector): Multi-vector half-precision floating-point dot-product by vector.
       (multiple vectors): Multi-vector half-precision floating-point dot-product.
For set of 2 and 4 ZA registers

The reference can be found here:
        https://developer.arm.com/documentation/ddi0602/2022-09

Depends on:D135455

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

2 years ago[SelectionDAG] Add missing semicolon after return.
Craig Topper [Tue, 25 Oct 2022 17:18:46 +0000 (10:18 -0700)]
[SelectionDAG] Add missing semicolon after return.

I'm unsure what the code does without the semicolon. On the surface it
seems like the assert below it would be considered part of the if
and thus the assert would only execute if DestReg is 0. But 0 isn't
considered a virtual register so the assert should fail.

Found by PVS Studio.
Reported https://pvs-studio.com/en/blog/posts/cpp/1003/ (N7)

2 years ago[trace][intel pt] Simple detection of infinite decoding loops
Walter Erquinigo [Sun, 23 Oct 2022 17:04:46 +0000 (10:04 -0700)]
[trace][intel pt] Simple detection of infinite decoding loops

The low-level decoder might fall into an infinite decoding loop for
various reasons, the simplest being an infinite direct loop reached due
to wrong handling of self-modified code in the kernel, e.g. it might
reach

```
0x0A: pause
0x0C: jump to 0x0A
```

In this case, all the code is sequential and requires no packets to be
decoded. The low-level decoder would produce an output like the
following

```
0x0A: pause
0x0C: jump to 0x0A
0x0A: pause
0x0C: jump to 0x0A
0x0A: pause
0x0C: jump to 0x0A
... infinite amount of times
```

These cases require stopping the decoder to avoid infinite work and signal this
at least as a trace error.

- Add a check that breaks decoding of a single PSB once 500k instructions have been decoded since the last packet was processed.
- Add a check that looks for infinite loops after certain amount of instructions have been decoded since the last packet was processed.
- Add some `settings` properties for tweaking the thresholds of the checks above. This is also nice because it does the basic work needed for future settings.
- Add an AnomalyDetector class that inspects the DecodedThread and the libipt decoder in search for anomalies. These anomalies are then signaled as fatal errors in the trace.
- Add an ErrorStats class that keeps track of all the errors in a DecodedThread, with a special counter for fatal errors.
- Add an entry for decoded thread errors in the `dump info` command.

Some notes are added in the code and in the documention of the settings,
so please read them.

Besides that, I haven't been unable to create a test case in LLVM style, but
I've found an anomaly in the thread #12 of the trace
72533820-3eb8-4465-b8e4-4e6bf0ccca99 at Meta. We have to figure out how to
artificially create traces with this kind of anomalies in LLVM style.

With this change, that anomalous thread now shows:

```
(lldb)thread trace dump instructions 12 -e -i 23101

thread #12: tid = 8
    ...missing instructions
    23101: (error) anomalous trace: possible infinite loop detected of size 2
  vmlinux-5.12.0-0_fbk8_clang_6656_gc85768aa64da`panic_smp_self_stop + 5 [inlined] rep_nop at processor.h:13:2
    23100: 0xffffffff81342785    pause
  vmlinux-5.12.0-0_fbk8_clang_6656_gc85768aa64da`panic_smp_self_stop + 7 at panic.c:87:2
    23099: 0xffffffff81342787    jmp    0xffffffff81342785        ; <+5> [inlined] rep_nop at processor.h:13:2
  vmlinux-5.12.0-0_fbk8_clang_6656_gc85768aa64da`panic_smp_self_stop + 5 [inlined] rep_nop at processor.h:13:2
    23098: 0xffffffff81342785    pause
  vmlinux-5.12.0-0_fbk8_clang_6656_gc85768aa64da`panic_smp_self_stop + 7 at panic.c:87:2
    23097: 0xffffffff81342787    jmp    0xffffffff81342785        ; <+5> [inlined] rep_nop at processor.h:13:2
  vmlinux-5.12.0-0_fbk8_clang_6656_gc85768aa64da`panic_smp_self_stop + 5 [inlined] rep_nop at processor.h:13:2
    23096: 0xffffffff81342785    pause
  vmlinux-5.12.0-0_fbk8_clang_6656_gc85768aa64da`panic_smp_self_stop + 7 at panic.c:87:2
    23095: 0xffffffff81342787    jmp    0xffffffff81342785        ; <+5> [inlined] rep_nop at processor.h:13:2
```

It used to be in an infinite loop where the decoder never stopped.

Besides that, the dump info command shows

```
(lldb) thread trace dump info 12

 Errors:
    Number of individual errors: 32
      Number of fatal errors: 1
      Number of other errors: 31
```

and in json format

```
(lldb) thread trace dump info 12 -j

 "errors": {
      "totalCount": 32,
      "libiptErrors": {},
      "fatalErrors": 1,
      "otherErrors": 31
    }
```

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

2 years agoRevert "[mlir] Add vectorization tests for linalg.map,reduce,transpose."
Alexander Belyaev [Tue, 25 Oct 2022 17:17:17 +0000 (19:17 +0200)]
Revert "[mlir] Add vectorization tests for linalg.map,reduce,transpose."

This reverts commit 2f88268fc109a1845285e125dfc19b8b75c137a0.

I will take a look what's happening with vectorization.mlir and why it
works on my machine and not upstream. Reverting for now.

2 years ago[Tooling] Avoid StandardLibrary.h including Decl. NFC
Sam McCall [Tue, 25 Oct 2022 17:11:51 +0000 (19:11 +0200)]
[Tooling] Avoid StandardLibrary.h including Decl. NFC

So you can use the enum in a header without pulling in half the AST.

2 years ago[clang-format] Correctly annotate UDLs as OverloadedOperator
Emilia Dreamer [Thu, 29 Sep 2022 07:10:47 +0000 (10:10 +0300)]
[clang-format] Correctly annotate UDLs as OverloadedOperator

While the opening parenthesis of an user-defined literal operator was
correctly annotated as OverloadedOperatorLParen, the "" and its suffix
wasn't annotated as OverloadedOperator.

Fixes https://github.com/llvm/llvm-project/issues/58035

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

2 years ago[AMDGPU] Fix delay alu for VOPD with src2acc
Joe Nash [Thu, 20 Oct 2022 19:03:46 +0000 (15:03 -0400)]
[AMDGPU] Fix delay alu for VOPD with src2acc

V_FMAC_F32 and V_DOT2C_F32_F16 have a dummy src2 operand tied to vdst to
inform passes that the instructions read the dst operand. The VOPD
versions of these instructions lacked the dummy operand, which was a
problem for inserting s_delay_alu.
Introduce the dummy src2 operand on the VOPD versions, and fix the VOPD operand
tracking logic to account for it.

Reviewed By: dp

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

2 years ago[include-cleaner] Move vocabulary types into separate header for layering. NFC
Sam McCall [Tue, 25 Oct 2022 17:01:46 +0000 (19:01 +0200)]
[include-cleaner] Move vocabulary types into separate header for layering. NFC

2 years ago[SystemZInstPrinter] Introduce markup tags emission
Ulrich Weigand [Tue, 25 Oct 2022 16:58:33 +0000 (18:58 +0200)]
[SystemZInstPrinter] Introduce markup tags emission

SystemZ assembly syntax emission now leverages markup tags, if enabled.

Author: Antonio Frighetto

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

2 years ago[SDAG] refactor folds for scalar-to-vector; NFCI
Sanjay Patel [Tue, 25 Oct 2022 16:48:46 +0000 (12:48 -0400)]
[SDAG] refactor folds for scalar-to-vector; NFCI

Fix typos, add comments, improve variable names,
rearrange code, add early exits.

2 years ago[Clang][NFC] Fix UnicodeData.txt parsing.
Corentin Jabot [Tue, 25 Oct 2022 16:41:41 +0000 (18:41 +0200)]
[Clang][NFC] Fix UnicodeData.txt parsing.

Fix the UnicodeNameToCodepoint tool misshandling
the case of a line containing a single semi-colon
(which does not happens in practice)

2 years ago[lldb] Host::ShellExpandArguments - fix error check for valid dictionary
Simon Pilgrim [Tue, 25 Oct 2022 16:43:47 +0000 (17:43 +0100)]
[lldb] Host::ShellExpandArguments - fix error check for valid dictionary

Fix repeated check for a valid JSON parse and actually check the dictionary pointer

Reported here: https://pvs-studio.com/en/blog/posts/cpp/1003/ (N40)

2 years agoWhitespace fix in a comment; NFC
Aaron Ballman [Tue, 25 Oct 2022 16:35:18 +0000 (12:35 -0400)]
Whitespace fix in a comment; NFC

2 years ago[lit] Define keyword used by MCJIT test
Paul Robinson [Tue, 25 Oct 2022 16:22:35 +0000 (09:22 -0700)]
[lit] Define keyword used by MCJIT test

test/ExecutionEngine/MCJIT/2005-12-02-TailCallBug.ll has
'XFAIL: mcjit-ia32' but that feature isn't defined anywhere, so
the XFAIL can't have any effect.  This has not been a problem
because apparently there are no 32-bit x86 bots out there.

I found this as part of other work to clean up lit keywords, so
I figured I would go ahead and fix it.  Verified by hacking my
lit.site.cfg.py so host_triple = target_triple = "i686-pc-windows-msvc"
and the test correctly reported XFAIL.

2 years ago[Transforms] classifyArgUse - don't deference pointer before null test
Simon Pilgrim [Tue, 25 Oct 2022 16:23:25 +0000 (17:23 +0100)]
[Transforms] classifyArgUse - don't deference pointer before null test

Reported here: https://pvs-studio.com/en/blog/posts/cpp/1003/ (N11)

2 years agoRevert "[clang] Fix missing diagnostic of declaration use when accessing TypeDecls...
Nico Weber [Tue, 25 Oct 2022 16:23:10 +0000 (12:23 -0400)]
Revert "[clang] Fix missing diagnostic of declaration use when accessing TypeDecls through typename access"

This reverts commit dc170433137aeda5e5276bd292cac12aa93fee7c.
Breaks building LLVM on mac when targeting macOS before 10.15, see
comments on https://reviews.llvm.org/D136533

2 years agoRevert "reland e5581df60a35 [SimplifyCFG] accumulate bonus insts cost"
Yaxun (Sam) Liu [Tue, 25 Oct 2022 16:15:39 +0000 (12:15 -0400)]
Revert "reland e5581df60a35 [SimplifyCFG] accumulate bonus insts cost"

This reverts commit bd7949bcd86633bd4203b2ba6f891aea00fce4d1.

Revert this patch since reviwers have different opinions regarding
the approach in post-commit review.

Will open RFC for further discussion.

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

2 years ago[ORC] Allow EPCDebugObjectRegistrar clients to specify registration fn dylib.
Lang Hames [Tue, 25 Oct 2022 15:44:32 +0000 (08:44 -0700)]
[ORC] Allow EPCDebugObjectRegistrar clients to specify registration fn dylib.

Similar to the EPCEHFrameRegistrar change in c977251ef6f, this allows clients
who have sourced a dylib handle via a side-channel to search that dylib to
find the registration functions.

This patch defaults to the existing behavior in the case where the client does
not specify a handle to use.

2 years ago[ORC] Update SelfExecutorProcessControl to allow user-supplied handles.
Lang Hames [Tue, 25 Oct 2022 15:23:27 +0000 (08:23 -0700)]
[ORC] Update SelfExecutorProcessControl to allow user-supplied handles.

SelfExecutorProcessControl no longer requires that handles passed to
lookupSymbols be ones that were previously returned from loadDylib. This brings
SelfExecutorPRocessControl into alignment with SimpleRemoteEPC, which was
updated in 6613f4aff85.

2 years agoSpeculatively fix the test bots
Aaron Ballman [Tue, 25 Oct 2022 15:34:46 +0000 (11:34 -0400)]
Speculatively fix the test bots

This should hopefully fix the issues found on Linux hosts like:
https://lab.llvm.org/buildbot#builders/109/builds/49321
https://lab.llvm.org/buildbot/#/builders/139/builds/30061

2 years ago[mlgo] More wildcarding in extra features logging for regalloc
Mircea Trofin [Tue, 25 Oct 2022 15:19:58 +0000 (08:19 -0700)]
[mlgo] More wildcarding in extra features logging for regalloc

May need a different testing approach for opcodes.

2 years ago[OpenMP] [OMPIRBuilder] Create a new datatype to hold the unique target region info
Jan Sjodin [Mon, 24 Oct 2022 13:36:30 +0000 (09:36 -0400)]
[OpenMP] [OMPIRBuilder] Create a new datatype to hold the unique target region info

This patch puts the individual target region information attributes into a
struct so that the nested mappings are not needed and passing the information
around is simplified.

Reviewed By: jdoerfert, mikerice

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

2 years agoAdd more C99 DR test cases and update the status page
Aaron Ballman [Tue, 25 Oct 2022 15:13:55 +0000 (11:13 -0400)]
Add more C99 DR test cases and update the status page

This mostly completes the C99 set of DRs, though there are a few still
marked as "unknown".

2 years ago[mlir] Add lower-to-loops tests for linalg.map/reduce/transpose.
Alexander Belyaev [Tue, 25 Oct 2022 15:05:40 +0000 (17:05 +0200)]
[mlir] Add lower-to-loops tests for linalg.map/reduce/transpose.

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

2 years ago[mlir] Add vectorization tests for linalg.map,reduce,transpose.
Alexander Belyaev [Tue, 25 Oct 2022 15:04:44 +0000 (17:04 +0200)]
[mlir] Add vectorization tests for linalg.map,reduce,transpose.

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

2 years ago[llvm-lit][test] Fix regex to capture scientific notation
gbreynoo [Tue, 25 Oct 2022 14:29:58 +0000 (15:29 +0100)]
[llvm-lit][test] Fix regex to capture scientific notation

We were seeing an intermittent local test failure of
utils\lit\tests\test-output.py in which the elapsed time output was
being given in scientific notation. Python automatically represents
small floating-point values in scientific notation so I have altered
these tests regex to capture output in that format.

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

2 years ago[InstCombine] Fold series of instructions into mull for more types
zhongyunde [Tue, 25 Oct 2022 15:02:08 +0000 (23:02 +0800)]
[InstCombine] Fold series of instructions into mull for more types

Relax the constraint of wide/vectors types.
Address the comment https://reviews.llvm.org/D136015?id=469189#inline-1314520

Reviewed By: spatel, chfast
Differential Revision: https://reviews.llvm.org/D136661

2 years ago[LLDB] Fix RISCV build
Emmmer [Tue, 25 Oct 2022 11:18:24 +0000 (19:18 +0800)]
[LLDB] Fix RISCV build

After https://reviews.llvm.org/D135670

Reviewed By: DavidSpickett

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

2 years ago[X86] combineConcatVectorOps - fold v4i64/v8x32 concat(broadcast(),broadcast()) ...
Simon Pilgrim [Tue, 25 Oct 2022 14:34:23 +0000 (15:34 +0100)]
[X86] combineConcatVectorOps - fold v4i64/v8x32 concat(broadcast(),broadcast()) -> permilps(concat())

Extend the existing v4f64 fold to handle v4i64/v8f32/v8i32 as well

Fixes #58585

2 years ago[lit][REQUIRES] Fix llvm-debuginfod.test so it will run
Paul Robinson [Mon, 24 Oct 2022 16:13:17 +0000 (09:13 -0700)]
[lit][REQUIRES] Fix llvm-debuginfod.test so it will run

The test was added in D114846 but missed one place to introduce the
'httplib' feature keyword, so it has been UNSUPPORTED everywhere.

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

2 years ago[gn build] Port a3be778ed09b
LLVM GN Syncbot [Tue, 25 Oct 2022 14:17:26 +0000 (14:17 +0000)]
[gn build] Port a3be778ed09b

2 years ago[gn build] Port 791fe26d7581
LLVM GN Syncbot [Tue, 25 Oct 2022 14:17:24 +0000 (14:17 +0000)]
[gn build] Port 791fe26d7581

2 years ago[DebugInfo] getMergedLocation: Maintain the line number if they match
Juan Manuel MARTINEZ CAAMAÑO [Tue, 25 Oct 2022 07:29:30 +0000 (07:29 +0000)]
[DebugInfo] getMergedLocation: Maintain the line number if they match

getMergedLocation returns a 'line 0' DILocaiton if the two locations
being merged don't perfecly match, even if they are in the same line but
a different column.

This commit adds support to keep the line number if it matches (but only
the column differs). The merged column number is the leftmost between the
two.

Reviewed By: dblaikie, orlando

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

2 years ago[AMDGPU] Use Register in more places in SIInstrInfo. NFC.
Jay Foad [Tue, 25 Oct 2022 13:47:35 +0000 (14:47 +0100)]
[AMDGPU] Use Register in more places in SIInstrInfo. NFC.

Also avoid using AMDGPU::NoRegister when it's not neeeded.

2 years ago[X86] Add v4i64 test coverage for #58585
Simon Pilgrim [Tue, 25 Oct 2022 14:02:59 +0000 (15:02 +0100)]
[X86] Add v4i64 test coverage for #58585

Turns out we fail to do this for concat_v4i64(broadcast_v2i64,broadcast_v2i64) as well

2 years ago[AArch64][ARM] Alter v8.3a complex neon intrinsics to be target-based, not preprocess...
David Green [Tue, 25 Oct 2022 13:35:11 +0000 (14:35 +0100)]
[AArch64][ARM] Alter v8.3a complex neon intrinsics to be target-based, not preprocessor based

This alters the 8.3 complex intrinsics to be target-gated, as opposed to
hidden behind preprocessor macros. This is the last of arm_neon.h, and
follows the same formula as before.

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

2 years ago[X86] Add test coverage for #58585
Simon Pilgrim [Tue, 25 Oct 2022 13:33:43 +0000 (14:33 +0100)]
[X86] Add test coverage for #58585

2 years ago[mlir][llvm] Don't return a dangling reference in getCallableResults().
Johannes de Fine Licht [Tue, 25 Oct 2022 12:52:59 +0000 (15:52 +0300)]
[mlir][llvm] Don't return a dangling reference in getCallableResults().

Use the `getReturnTypes()` API (which returns an `ArrayRef<Type>`)
rather than the `getReturnType()` API (which returns a `Type`) to avoid
returning a dangling reference in `LLVMFuncOp::getCallableResults()`.

Reviewed By: ftynse

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

2 years ago[X86] Fold vbroadcast(bitcast(vbroadcast(src))) -> bitcast(vbroadcast(vbroadcast...
Simon Pilgrim [Tue, 25 Oct 2022 13:03:35 +0000 (14:03 +0100)]
[X86] Fold vbroadcast(bitcast(vbroadcast(src))) -> bitcast(vbroadcast(vbroadcast(src)))

If the inner broadcast scalar type is smaller/same width as the outer broadcast scalar type then we can broadcast using the same inner type directly. Works for vbroadcast_load as well.

2 years ago[LLDB] [LoongArch] Add minimal LoongArch support
Tiezhu Yang [Tue, 25 Oct 2022 12:19:06 +0000 (12:19 +0000)]
[LLDB] [LoongArch] Add minimal LoongArch support

Add as little code as possible to allow compiling lldb on LoongArch.
Actual functionality will be implemented later.

Reviewed By: SixWeining, DavidSpickett

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

2 years agoRevert "[PGO] Make emitted symbols hidden"
Nico Weber [Tue, 25 Oct 2022 12:54:47 +0000 (08:54 -0400)]
Revert "[PGO] Make emitted symbols hidden"

This reverts commit 04877284b4592e9286cab43467662c1b4ff81861.
Looks like this is still breaking the test
Profile-x86_64 :: instrprof-darwin-dead-strip.c
(see comment on https://reviews.llvm.org/D135340).

2 years ago[LLDB][Docs][NFC] Fix formatting in -gmodules documentation
Michael Buch [Tue, 25 Oct 2022 11:32:49 +0000 (12:32 +0100)]
[LLDB][Docs][NFC] Fix formatting in -gmodules documentation

2 years ago[LLDB][RISCV] Add RV64C instruction support for EmulateInstructionRISCV
Emmmer [Thu, 20 Oct 2022 15:05:37 +0000 (23:05 +0800)]
[LLDB][RISCV] Add RV64C instruction support for EmulateInstructionRISCV

Add:

- RV64C instructions sets.
- corresponding unittests.
- `c.break` code for lldb and lldb-server

Fix:
- wrong decoding of imm in `DecodeSType`

Reviewed By: DavidSpickett

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

2 years ago[libc] Switch to new implementation of mem* functions
Guillaume Chatelet [Mon, 24 Oct 2022 13:10:53 +0000 (13:10 +0000)]
[libc] Switch to new implementation of mem* functions

The new framework makes it explicit which processor feature is being
used and allows for easier per platform customization:
 - ARM cpu now uses trivial implementations to reduce code size.
 - Memcmp, Bcmp and Memmove have been optimized for x86
 - Bcmp has been optimized for aarch64.

This is a reland of https://reviews.llvm.org/D135134 (b3f1d58)

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

2 years ago[clang][ExtractAPI] Allow users to specify a list of symbols to ignore
Daniel Grumberg [Fri, 21 Oct 2022 13:49:46 +0000 (14:49 +0100)]
[clang][ExtractAPI] Allow users to specify a list of symbols to ignore

Adds a `--extract-api-ignores=` command line option that allows users to
provide a file containing a new line separated list of symbols to
unconditionally ignore when extracting API information.

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

2 years ago[AArch64][SVE2] Add the SVE2.1 signed and unsigned 2-way dot instructions
David Sherwood [Wed, 19 Oct 2022 13:59:58 +0000 (13:59 +0000)]
[AArch64][SVE2] Add the SVE2.1 signed and unsigned 2-way dot instructions

This patch adds the assembly/disassembly for the following instructions:

SDOT : Signed integer 2-way dot product indexed and non-indexed
UDOT : Unsigned integer 2-way dot product, indexed and non-indexed

The reference can be found here:
https://developer.arm.com/documentation/ddi0602/2022-09

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

2 years ago[LLDB] Add missing breaks to current frame row in command map
David Spickett [Tue, 25 Oct 2022 10:19:29 +0000 (10:19 +0000)]
[LLDB] Add missing breaks to current frame row in command map

Without these it was rendering as one line for all three commands.

2 years ago[Clang][AArch64] Add TargetParser support for defining CPU aliases
Sjoerd Meijer [Mon, 24 Oct 2022 15:32:26 +0000 (21:02 +0530)]
[Clang][AArch64] Add TargetParser support for defining CPU aliases

This adds AArch64 TargetParser support to define CPU aliases, and
ports the definition of Grace over to that. This is following up
on D136425.

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

2 years ago[AArch64] Add precommit test for bcmp; NFC
chenglin.bi [Tue, 25 Oct 2022 09:23:03 +0000 (17:23 +0800)]
[AArch64] Add precommit test for bcmp; NFC

2 years ago[clang-format] Move bracket to correct line.
Adrian Kuegel [Tue, 25 Oct 2022 09:04:59 +0000 (11:04 +0200)]
[clang-format] Move bracket to correct line.

2 years ago[AArch64][SVE] Use more flag-setting instructions
Cullen Rhodes [Tue, 25 Oct 2022 08:29:09 +0000 (08:29 +0000)]
[AArch64][SVE] Use more flag-setting instructions

If OP in PTEST(PG, OP(PG, ...)) has a flag-setting variant change the
opcode so the PTEST becomes redundant. This patch extends this existing
optimization in AArch64::optimizePTestInstr to cover all flag-setting
opcodes.

Reviewed By: peterwaller-arm

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

2 years ago[AArch64][SVE] NFC: extend tests for flag-setting predicate instructions
Cullen Rhodes [Tue, 25 Oct 2022 08:28:12 +0000 (08:28 +0000)]
[AArch64][SVE] NFC: extend tests for flag-setting predicate instructions

A follow on patch will extend existing

  PTEST(PG, OP(PG, ...)) -> OP_FLAG_SETTING(PG, ...)

optimization in AArch64InstrInfo::optimizePTestInstr to cover more of
the flag-setting instructions

Reviewed By: peterwaller-arm

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

2 years ago[NFC][AMDGPU] Pre-commit test for D136432
Thomas Symalla [Tue, 25 Oct 2022 08:51:37 +0000 (10:51 +0200)]
[NFC][AMDGPU] Pre-commit test for D136432

Nested BFI instruction with multiple uses.

2 years ago[AArch64][SVE2] Add the SVE2.1 bfmlslb and bfmlslt instructions
David Sherwood [Wed, 19 Oct 2022 11:53:21 +0000 (11:53 +0000)]
[AArch64][SVE2] Add the SVE2.1 bfmlslb and bfmlslt instructions

This patch adds the assembly/disassembly for the following instructions:

BFMLSLB : BFloat16 floating-point multiply-subtract long
          from single-precision (bottom)
BFMLSLT : BFloat16 floating-point multiply-subtract long
          from single-precision (top)

Both the vector and indexed forms are added for each.

The reference can be found here:
https://developer.arm.com/documentation/ddi0602/2022-09

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

2 years ago[AArch64]SME2 Multi-vector ternary indexed DOT and FMLA instructions
Caroline Concatto [Fri, 21 Oct 2022 16:09:35 +0000 (17:09 +0100)]
[AArch64]SME2 Multi-vector ternary indexed DOT and FMLA instructions

This patch adds the assembly/disassembly for the following instruction:
FP:
  FMLA (multiple and indexed vector): Multi-vector floating-point fused multiply-add by indexed element.
  FMLS(multiple and indexed vector): Multi-vector floating-point fused multiply-subtract by indexed element.

  BFDOT (multiple and indexed vector): Multi-vector BFloat16 floating-point dot-product by indexed element.
  FDOT (multiple and indexed vector): Multi-vector half-precision floating-point dot-product by indexed element.
  BFVDOT: Multi-vector BFloat16 floating-point vertical dot-product by indexed element.
  FVDOT: Multi-vector half-precision floating-point vertical dot-product by indexed element.

INT:
  SDOT (2-way, multiple and indexed vector): Multi-vector signed integer dot-product by indexed element.
       (4-way, multiple and indexed vector): Multi-vector signed integer dot-product by indexed element.
  SUDOT (multiple and indexed vector): Multi-vector signed by unsigned integer dot-product by indexed elements.
  SUVDOT: Multi-vector signed by unsigned integer vertical dot-product by indexed element.
  UDOT (2-way, multiple and indexed vector): Multi-vector unsigned integer dot-product by indexed element.
       (4-way, multiple and indexed vector): Multi-vector unsigned integer dot-product by indexed element.
  USDOT (multiple and indexed vector): Multi-vector unsigned by signed integer dot-product by indexed element.
  USVDOT: Multi-vector unsigned by signed integer vertical dot-product by indexed element.

For the multi-vec ternary indexed with 2 and 4 ZA single-vectors for
32 and 64 bits according to the instruction

The reference can be found here:
    https://developer.arm.com/documentation/ddi0602/2022-09

Depends on:D135563

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

2 years ago[MachineVerifier] Try harder to verify LiveVariables
Jay Foad [Wed, 6 Jul 2022 13:00:32 +0000 (14:00 +0100)]
[MachineVerifier] Try harder to verify LiveVariables

Verify the LiveVariables analysis after a pass that claims to preserve
it, even if there are no further passes (apart from the verifier itself)
that would use the analysis.

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

2 years ago[X86] Update LiveVariables in more cases in convertToThreeAddress
Jay Foad [Mon, 24 Oct 2022 14:00:36 +0000 (15:00 +0100)]
[X86] Update LiveVariables in more cases in convertToThreeAddress

Following on from D129634, this patch fixes more X86 CodeGen test
failures with D129213 applied, which adds verification of LiveIntervals
after the TwoAddressInstruction pass runs. These failures only showed up
with LLVM_ENABLE_EXPENSIVE_CHECKS=ON which adds the equivalent of an
implicit -verify-machineinstrs on all tests.

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

2 years ago[AArch64][SME] Fix chain for arm_locally_streaming functions.
Sander de Smalen [Tue, 25 Oct 2022 07:53:31 +0000 (07:53 +0000)]
[AArch64][SME] Fix chain for arm_locally_streaming functions.

The Chain wasn't set correctly in the DAG for functions marked
with aarch64_pstate_sm_body, which meant that SelectionDAG would
dead-code some of the CopyToReg's. This didn't show up in the
existing tests because all uses were in the same block, but when
adding some control-flow, suddenly things would break.

Reviewed By: kmclaughlin

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

2 years ago[AArch64]SME2 Multiple vectors Int/FP clamp instructions for two/four registers
Caroline Concatto [Fri, 21 Oct 2022 15:44:23 +0000 (16:44 +0100)]
[AArch64]SME2 Multiple vectors Int/FP clamp instructions for two/four registers

This patch adds the assembly/disassembly for the following instruction:
Int:
  SCLAMP:Multi-vector signed clamp to minimum/maximum vector.
  UCLAMP:Multi-vector unsigned clamp to minimum/maximum vector.
FP:
  FCLAMP: Multi-vector floating-point clamp to minimum/maximum number.

  The reference can be found here:

    https://developer.arm.com/documentation/ddi0602/2022-09

    Depends on: D135563

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

2 years ago[NFC] Fix merge mistake in TokenAnnotator.cpp
Tobias Hieta [Tue, 25 Oct 2022 08:08:28 +0000 (10:08 +0200)]
[NFC] Fix merge mistake in TokenAnnotator.cpp

2 years ago[AArch64]SME2 Single and multiple vectors SVE Destructive two/four registers[part2]
Caroline Concatto [Fri, 21 Oct 2022 14:59:18 +0000 (15:59 +0100)]
[AArch64]SME2 Single and multiple vectors SVE Destructive two/four registers[part2]

This patch adds the assembly/disassembly for the following instruction:
INT:
  SMAX (multiple and single vector): Multi-vector signed maximum by vector.
       (multiple vectors): Multi-vector signed maximum.
  SMIN (multiple and single vector): Multi-vector signed minimum by vector.
       (multiple vectors): Multi-vector signed minimum.
  UMAX (multiple and single vector): Multi-vector unsigned maximum by vector.
       (multiple vectors): Multi-vector unsigned maximum.
  UMIN (multiple and single vector): Multi-vector unsigned minimum by vector.
       (multiple vectors): Multi-vector unsigned minimum.
  SRSHL (multiple and single vector): Multi-vector signed rounding shift left by vector.
        (multiple vectors): Multi-vector signed rounding shift left.
  URSHL (multiple and single vector): Multi-vector unsigned rounding shift left by vector.
        (multiple vectors): Multi-vector unsigned rounding shift left.
FP:
  FMAX (multiple and single vector): Multi-vector floating-point maximum by vector.
       (multiple vectors): Multi-vector floating-point maximum.
  FMAXNM (multiple and single vector): Multi-vector floating-point maximum number by vector.
         (multiple vectors): Multi-vector floating-point maximum number.
  FMIN (multiple and single vector): Multi-vector floating-point minimum by vector.
       (multiple vectors): Multi-vector floating-point minimum.
  FMINNM (multiple and single vector): Multi-vector floating-point minimum number by vector.
         (multiple vectors): Multi-vector floating-point minimum number.

The reference can be found here:

https://developer.arm.com/documentation/ddi0602/2022-09

It also updates ADD and SQDMULH

Depends on: D135563

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

2 years ago[AArch64][ARM] Alter v8.1a neon intrinsics to be target-based, not preprocessor based
David Green [Tue, 25 Oct 2022 08:02:52 +0000 (09:02 +0100)]
[AArch64][ARM] Alter v8.1a neon intrinsics to be target-based, not preprocessor based

As a continuation of D132034, this switches the QRDMX v8.1a neon
intrinsics over from preprocessor defines to be target-gated. As there
is no "rdma" or "qrdmx" target feature, they use the "v8.1a"
architecture feature directly.

This works well for AArch64, but something needs to be done for Arm at
the same time, as they both use the same header and tablegen emitter.
This patch opts for adding "v8.1a" and all dependant target features to
the Arm TargetParser, similar to what was recently done for AArch64 but
through initFeatureMap when the Architecture is parsed. I attempted to
make the code similar to the AArch64 backend.

Otherwise this is similar to the changes made in D132034.

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

2 years ago[clang-format] Mark pragma region lines as StringLiterals
Tobias Hieta [Tue, 25 Oct 2022 07:59:10 +0000 (09:59 +0200)]
[clang-format] Mark pragma region lines as StringLiterals

In our code-base we auto-generate pragma regions the regions
look like method signatures like:

`#pragma region MYREGION(Foo: bar)`

The problem here was that the rest of the line after region
was not marked as stringliteral as in the case of pragma mark
so clang-format tried to change the formatting based on the
method signature.

Added test and mark it similar as pragma mark.

Reviewed By: owenpan

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

2 years ago[IncludeCleaner] Handle more C++ constructs
Kadir Cetinkaya [Wed, 17 Aug 2022 14:54:04 +0000 (16:54 +0200)]
[IncludeCleaner] Handle more C++ constructs

Summary:
This brings IncludeCleaner's reference discovery from AST to the parity
with current implementation in clangd. Some highlights:
- Handling of MemberExprs, only the member declaration is marked as
  referenced and not the container, unlike clangd.
- Constructor calls, only the constructor and not the container, unlike
  clangd.
- All the possible candidates for unresolved overloads, same as clangd.
- All the shadow decls for using-decls, same as clangd.
- Declarations for definitions of enums with an underlying type and
  functions, same as clangd.
- Using typelocs, using templatenames and typedefs only reference the
  found decl, same as clangd.
- Template specializations only reference the primary template, not the
  explicit specializations, to be fixed.
- Expr types aren't marked as used, unlike clangd.

Going forward, we can consider having signals to indicate type of a
reference (e.g. `implicit` signal for type of an expr) so that the
applications can perform a filtering based on their needs.
At the moment the biggest discrepancy is around type of exprs, i.e. not
marking containers for member/constructor accesses. I believe this is
the right model since the declaration of the member and the container
should be available in a single file (modulo macros).

Reviewers: sammccall

Subscribers:

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

2 years ago[clang] Replace BACKEND_PACKAGE_STRING with LLVM_VERSION_STRING
Fangrui Song [Tue, 25 Oct 2022 07:24:25 +0000 (00:24 -0700)]
[clang] Replace BACKEND_PACKAGE_STRING with LLVM_VERSION_STRING

420d7ccbac0f499a6ff9595bdbfa99cd3376df22 introduced BACKEND_PACKAGE_STRING to
replace `PACKAGE_VERSION` (llvm/Config/config.h) to support standalone builds.
This is used in the output of `clang -cc1 -v`.

Since llvm-config.h is available for both standalone and non-standalone builds,
we can just use `LLVM_VERSION_STRING` from llvm-config.h.

clang/cmake/modules/AddClang.cmake uses `VERSION_STRING "${CLANG_VERSION} (${BACKEND_PACKAGE_STRING})"`.
Just simplify it to `"${CLANG_VERSION}"` so that we can remove the CMake
variable BACKEND_PACKAGE_STRING.

Reviewed By: tstellar

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

2 years ago[ObjCARC][NFC] Fix defined but not used warning from D135041
LiaoChunyu [Tue, 25 Oct 2022 07:01:57 +0000 (15:01 +0800)]
[ObjCARC][NFC] Fix defined but not used warning from D135041

Reviewed By: MaskRay

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

2 years ago[gn build] Port fdac4c4e92e5
LLVM GN Syncbot [Tue, 25 Oct 2022 06:57:59 +0000 (06:57 +0000)]
[gn build] Port fdac4c4e92e5

2 years ago[X86] Add CMPCCXADD instructions.
Freddy Ye [Tue, 25 Oct 2022 05:49:14 +0000 (13:49 +0800)]
[X86] Add CMPCCXADD instructions.

For more details about these instructions, please refer to the latest ISE document: https://www.intel.com/content/www/us/en/develop/download/intel-architecture-instruction-set-extensions-programming-reference.html

Reviewed By: pengfei, skan

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

2 years ago[flang] Allow all OSes in fir::CodeGenSpecifics::get
Fangrui Song [Tue, 25 Oct 2022 05:45:28 +0000 (22:45 -0700)]
[flang] Allow all OSes in fir::CodeGenSpecifics::get

This allows all ELF operating systems to use target specifics tuned for Linux,
since they use mostly the same ABIs. If some triples are to excluded, it's
better done at the driver layer.

Reviewed By: emaste

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

2 years agollvm-reduce: Remove unnecessary arguments from test
Matt Arsenault [Mon, 24 Oct 2022 19:24:45 +0000 (12:24 -0700)]
llvm-reduce: Remove unnecessary arguments from test

2 years agollvm-reduce: Remove pointless template arguments
Matt Arsenault [Mon, 24 Oct 2022 17:55:29 +0000 (10:55 -0700)]
llvm-reduce: Remove pointless template arguments

2 years ago[mlir:LLVM] Rewrite the LLVMIR export to use the debug info attributes
River Riddle [Sat, 22 Oct 2022 23:28:32 +0000 (16:28 -0700)]
[mlir:LLVM] Rewrite the LLVMIR export to use the debug info attributes

This has been a long standing TODO, and actually enables users to generate
debug information for LLVM using the LLVM dialect; as opposed to our
dummy placeholder that generated just enough for line table information.

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

2 years ago[ompd] Fix gdb-plugin warnings after D100185
Fangrui Song [Tue, 25 Oct 2022 05:28:27 +0000 (22:28 -0700)]
[ompd] Fix gdb-plugin warnings after D100185

2 years ago[RISCV] Add shift amount operands of shift, rotate, and Zbs instructions to hasAllNBi...
Craig Topper [Tue, 25 Oct 2022 05:02:48 +0000 (22:02 -0700)]
[RISCV] Add shift amount operands of shift, rotate, and Zbs instructions to hasAllNBitUsers.

2 years agoAdd a document on side effects & speculation in MLIR
Sanjoy Das [Thu, 13 Oct 2022 18:08:04 +0000 (11:08 -0700)]
Add a document on side effects & speculation in MLIR

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

2 years ago[RISCV] Add ORI to hasAllNBitUsers.
Craig Topper [Tue, 25 Oct 2022 04:32:48 +0000 (21:32 -0700)]
[RISCV] Add ORI to hasAllNBitUsers.

If the immediate is negative with sufficient leading ones, then
the upper bits of the other operand aren't demanded.