Commit Graph

414002 Commits

Author SHA1 Message Date
Fangrui Song 53fc5d9b9a [ELF] Support R_PPC_NONE/R_PPC64_NONE in getImplicitAddend
Similar to f457863ae3
2022-02-04 15:13:37 -08:00
Fangrui Song c161b30f5c [yaml2obj] Support R_PPC_* relocation types 2022-02-04 15:11:50 -08:00
David Goldman fb7ddd0628 Revert "[clangd] Properly compute framework-style include spelling"
This reverts commit 4dfd11324e
due to the failures on Linux CI:
https://lab.llvm.org/buildbot/#/builders/188/builds/9296
2022-02-04 18:02:32 -05:00
Róbert Ágoston cd4ed08b5a [GlobalISel] Don't combine instructions which are fed by memory instructions using different size
Memory instructions like extending loads from the same address are not equal if
their size is not equal.

This fixes https://github.com/llvm/llvm-project/issues/53524.

Differential Revision: https://reviews.llvm.org/D118805
2022-02-04 15:00:47 -08:00
Joseph Huber 6b78526b1b [OpenMP] Emit remark on the captured call instead of the variable
Changes the remark to emit on the function call that captures the globalized
variable instead of the globalized variable itself. The user should be able to
see which variable it was in the argument list of the function.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D106980
2022-02-04 17:50:53 -05:00
David Goldman 6abb70c2d0 Attempt forward fix after 4dfd113
If this doesn't work will just revert the change,
can't seem to repro on macOS.
2022-02-04 17:47:38 -05:00
River Riddle c64655c78c [mlir:NFC] Move BaseOpWithOffsetSizesAndStrides out of OpBase.td
This is not a general construct, and shouldn't have been defined in OpBase.
This moves a copy to both MemRefOps+TensorOps, which are the only
users.
2022-02-04 14:31:59 -08:00
Matt Arsenault 8b8b491379 AMDGPU/GlobalISel: Fix assertions on invalid addrspacecasts
Fixes some assert on invalid situations and starts directly emitting
the error.
2022-02-04 17:28:49 -05:00
Louis Dionne 78205faf54 [libc++][Docker] Don't actually start using a newer compiler in the CI
To ensure a smooth transition without breaking CI, we should use explicitly
versioned Clangs in the CI jobs definition instead, since that's a change
we can actually test in the CI.

So instead of bumping the compiler version from the Docker image, use
the same version as before by default, and we can bump it from the CI
job definition once all the nodes are running the new image.
2022-02-04 17:17:17 -05:00
Arthur O'Dwyer ea2206d70d [libc++] Replace includes of <utility> with specific detail headers
Basically a rebase of D104980; most of that patch had already happened
via gradual drive-by changes, but this finishes it up.
Don't touch the inclusions from `<__functional_base>`, `<__hash_table>`,
or `<__locale>`; those could be removed if we propagated the
inclusions up to the includers of those files, but there are lots
of those includers.

`<algorithm>`, `<functional>`, and `<memory>` already include `<utility>`
at the top level. `<iterator>` did not, so I've added it there.

Differential Revision: https://reviews.llvm.org/D119020
2022-02-04 17:08:32 -05:00
Louis Dionne a27304c50f [libc++] Bump the version of Clang we use in the CI
Differential Revision: https://reviews.llvm.org/D118830
2022-02-04 17:05:38 -05:00
Lei Zhang 9dd4c2dcb6 [mlir][vector] Add constant folder for vector.shuffle ops
Reviewed By: ThomasRaoux

Differential Revision: https://reviews.llvm.org/D119032
2022-02-04 16:59:32 -05:00
Fangrui Song 3fd30958b7 [ELF][test] Test getImplicitAddend for R_ARM_NONE/R_RISCV_NONE/R_386_NONE/R_X86_64_NONE
Similar to f457863ae3
2022-02-04 13:59:18 -08:00
Joseph Huber 5966c2ec02 [OpenMP] Fix mismatched device runtime name
Summary:
The new runtime was deleted. AMD's old runtime used the triple name
`amdgcn` while the new runtime used `amdgpu`. This was not updated when
the old runtime was removed causing the library to not be found on
AMDGPU.
2022-02-04 16:54:31 -05:00
Matt Arsenault f1f15d0285 AMDGPU: Fix failing test 2022-02-04 16:54:09 -05:00
Lei Zhang 6699572705 [mlir][spirv] Fix missing dependencies in BUILD.bazel 2022-02-04 16:51:43 -05:00
David Goldman 4dfd11324e [clangd] Properly compute framework-style include spelling
With this change, clangd now computes framework-style includes
for framework headers at indexing time.

Differential Revision: https://reviews.llvm.org/D117056
2022-02-04 16:40:56 -05:00
Byoungchan Lee da08d50fd6 [lld][macho] Add more skip platform check for libSystem re-exports
Xcode 13 comes with a mismatched platform in libcompiler_rt.dylib,
so this creates a linker error on mac catalyst.
Fix it by adding it to the skip list.

Reviewed By: MaskRay, #lld-macho, int3

Differential Revision: https://reviews.llvm.org/D117925
2022-02-04 16:34:56 -05:00
Lei Zhang 36e68c11ad [mlir][spirv] Add support for converting vector.shuffle
Reviewed By: ThomasRaoux

Differential Revision: https://reviews.llvm.org/D119030
2022-02-04 16:31:11 -05:00
Masoud Ataei 8ce13bc93b [PowerPC] Option controling scalar MASS convertion
differential: https://reviews.llvm.org/D119035

reviewer: bmahjour
2022-02-04 13:24:22 -08:00
Fangrui Song f457863ae3 [ELF] Support REL-format R_AARCH64_NONE relocation
-fprofile-use=/-fprofile-sample-use= compiles may produce REL-format
.rel.llvm.call-graph-profile even if the prevailing format is RELA on AArch64.
Add R_AARCH64_NONE to getImplicitAddend to fix this linker error:

```
ld.lld: error: internal linker error: cannot read addend for relocation R_AARCH64_NONE
PLEASE submit a bug report to https://crbug.com and run tools/clang/scripts/process_crashreports.py (only works inside Google) which will upload a report and include the crash backtrace.
```
2022-02-04 13:20:49 -08:00
Benjamin Kramer fc604825ec [bazel] Port dbed14d215 2022-02-04 22:14:45 +01:00
Arthur O'Dwyer cc1d02ba2d [libc++] No longer support ranges::begin(x) when x is an array of incomplete type.
var-const points out that `ranges::begin` is (non-normatively
but explicitly) always supposed to return a `std::input_or_output_iterator`,
and `Incomplete*` is not a `std::input_or_output_iterator` because it
has no `operator++`. Therefore, we should never return `Incomplete*`
from `ranges::begin(x)`, even when `x` is `Incomplete(&)[]`. Instead,
just SFINAE away.

Differential Revision: https://reviews.llvm.org/D118963
2022-02-04 16:11:39 -05:00
Paulo Matos c67c9cfe3f [WebAssembly] Refactor and fix emission of external IR global decls
Reland of 00bf4755.

This patches fixes the visibility and linkage information of symbols
referring to IR globals.

Emission of external declarations is now done in the first execution
of emitConstantPool rather than in emitLinkage (and a few other
places). This is the point where we have already gathered information
about used symbols (by running the MC Lower PrePass) and not yet
started emitting any functions so that any declarations that need to
be emitted are done so at the top of the file before any functions.

This changes the order of a few directives in the final asm file which
required an update to a few tests.

Reviewed By: sbc100

Differential Revision: https://reviews.llvm.org/D118995
2022-02-04 22:01:46 +01:00
Aaron Ballman be3d811e2c Rename this file to fix the typo in its name; NFC 2022-02-04 15:59:59 -05:00
Matt Arsenault 4622afa94c AMDGPU: Convert AMDGPUResourceUsageAnalysis to a Module pass
This is more precise in the face of indirect calls and aliases, still
assuming the call target is defined somewhere in the current module.

This sometimes changes the order the functions are printed, and also
changes the point where context errors are printed relative to
stdout. This also likely has negative consequences for compile time
and memory usage.
2022-02-04 15:56:04 -05:00
Matt Arsenault 935abab65c AMDGPU: Use module level register maximums for unknown callees
Compute the theoretical register budget based on the IR function
signature/attributes, and use the global maximum register budgets for
unknown callees.

This should fix the kernel reported register usage in the presence of
indirect calls. The previous fix in
2b08f6af62 was incorrect becauset it was
only taking the maximum in the known call graph, and missing something
that was either outside of it or codegened later.

This fixes a second case I discovered where calls to aliases also did
not work as expected. CallGraphAnalysis misses these, so functions
called through aliases were not codegened ahead of callers as
expected. CallGraphAnalysis should probably be fixed to understand
this case, and there's likely a bug with IPRA here. This fixes
numerous failures in the conformance test at -O0.
2022-02-04 15:56:03 -05:00
Nikolas Klauser 679f8a885b [libc++] Move fpos into its own header
For some reason `<string>` defines `std::fpos`, which should be defined in `<ios>`.

Reviewed By: Quuxplusone, Mordante, #libc

Spies: libcxx-commits, mgorny

Differential Revision: https://reviews.llvm.org/D118914
2022-02-04 21:53:43 +01:00
Arthur Eubanks 69873633bd [gn build] Port dbed14d 2022-02-04 12:52:33 -08:00
Louis Dionne abcbe87311 [libc++] Remove unused code paths for non-existent builtins
It looks like we added some checks to try and use builtin type traits
in https://reviews.llvm.org/D67900, but some of those type traits are
never implemented as builtins, so this is essentially dead code.

Fixes llvm-project#53569

Differential Revision: https://reviews.llvm.org/D118923
2022-02-04 15:51:42 -05:00
minglotus-6 d70bd7a148 Clean up a test case.
The test case is added to demonstrate diff before and after patch D114832.

The solution is

Differential Revision: https://reviews.llvm.org/D118846
2022-02-04 12:49:13 -08:00
Simon Pilgrim 78c6b90000 [APInt] Update APInt::isShiftedMask() description. NFC.
Make it clear that it matches a non-empty sequence of ones, matches the descriptions for isShiftedMask_32/64 as suggested on D119019
2022-02-04 20:39:05 +00:00
Paul Robinson 0d54457f8a [IntrospectionTest] Replace "return" with "GTEST_SKIP"
If a test simply returns, it gets mis-reported as a pass; being
reported as SKIPPED is correct.

Found by the Rotten Green Tests project.
2022-02-04 12:35:44 -08:00
Florian Mayer 02dbed4b7f [mte] [nfc] do not keep Tag in AllocaInfo
this is to get the implementation closer to HWASan

Reviewed By: eugenis

Differential Revision: https://reviews.llvm.org/D118960
2022-02-04 12:34:22 -08:00
Joseph Huber 034adaf5be [OpenMP] Completely remove old device runtime
This patch completely removes the old OpenMP device runtime. Previously,
the old runtime had the prefix `libomptarget-new-` and the old runtime
was simply called `libomptarget-`. This patch makes the formerly new
runtime the only runtime available. The entire project has been deleted,
and all references to the `libomptarget-new` runtime has been replaced
with `libomptarget-`.

Reviewed By: JonChesterfield

Differential Revision: https://reviews.llvm.org/D118934
2022-02-04 15:31:33 -05:00
Philip Reames 0cc6165d05 [SLP] Strengthen internal asserts about scheduled node state [NFC]
All members of a scheduled bundle must have valid dependencies, with no unscheduled ones, and only the lead element gets marked scheduled.
2022-02-04 12:22:52 -08:00
Aaron Ballman 8c5edb59cf Use functions with prototypes when appropriate; NFC
A significant number of our tests in C accidentally use functions
without prototypes. This patch converts the function signatures to have
a prototype for the situations where the test is not specific to K&R C
declarations. e.g.,

  void func();

becomes

  void func(void);

This is the second batch of tests being updated (there are a significant
number of other tests left to be updated).
2022-02-04 15:20:36 -05:00
Joseph Huber eeb29c8477 [OpenMP] Add -Bsymbolic to arguments for GNU linker
This patch adds the '-Bsymbolic' flag when we perform linking for the
offloading device. We already pass '-fvisibility=protected' but this is
not properly handled when using the bfd linker as is described in
https://maskray.me/blog/2021-05-16-elf-interposition-and-bsymbolic.
Previously this caused linker errors when creating the shared library.

Reviewed By: JonChesterfield

Differential Revision: https://reviews.llvm.org/D119018
2022-02-04 15:13:32 -05:00
Shilei Tian b8ec430de7 [Clang][Sema][OpenMP] Fix uninitialized variable Op
This can fix the case atomic_messages
2022-02-04 15:00:43 -05:00
Konstantin Varlamov 254ee89c7a [libc++][ranges][NFC] On the Ranges status page, fix some broken links. 2022-02-04 11:58:35 -08:00
wren romano 4998b1a6cd [mlir][sparse] Updating sparse-compiler pipeline for python usage
Explicitly nests passes for FuncOp, adds more options to the sparse-compiler pipeline, and updates python integration tests.  This should be sufficient to close https://github.com/llvm/llvm-project/issues/51751

Reviewed By: aartbik

Differential Revision: https://reviews.llvm.org/D118658
2022-02-04 11:39:48 -08:00
Owen Pan 35f7dd601d [clang-format][NFC] Fix a bug in setting type FunctionLBrace
The l_brace token in a macro definition should not be set to
TT_FunctionLBrace.

This patch could have fixed #42087.

Differential Revision: https://reviews.llvm.org/D118969
2022-02-04 11:36:30 -08:00
Eugene Zhulenev 2cff9ee46b [mlir] Use SetVector to deduplicate shape ops operands
Do not use quadratic complexity algorithm to find unique operands

Reviewed By: jpienaar

Differential Revision: https://reviews.llvm.org/D119021
2022-02-04 11:34:13 -08:00
gysit b5ea288d13 [mlir][linalg] Let tile and fuse fail for tile sizes zero.
Adapt `tileConsumerAndFuseProducers` to return failure if the generated tile loop nest is empty since all tile sizes are zero. Additionally, fix `LinalgTileAndFuseTensorOpsPattern` to return success if the pattern applied successfully.

Reviewed By: mravishankar

Differential Revision: https://reviews.llvm.org/D118878
2022-02-04 19:19:21 +00:00
Devin Jeanpierre 56d46b36fc [clang] roll-forward "[clang] Mark `trivial_abi` types as "trivially relocatable"".
This reverts commit 852afed5e0.

Changes since D114732:

On PS4, we reverse the expectation that classes whose constructor is deleted are not trivially relocatable. Because, at the moment, only classes which are passed in registers are trivially relocatable, and PS4 allows passing in registers if the copy constructor is deleted, the original assertions were broken on PS4.

(This is kinda similar to DR1734.)

Reviewed By: gribozavr2

Differential Revision: https://reviews.llvm.org/D119017
2022-02-04 20:17:34 +01:00
Sanjay Patel fff3e1dbaa [x86] enable fast sqrtss/sqrtps tuning for AMD Zen cores
As discussed in D118534, all of the recent AMD CPUs have
relatively fast (<14 cycle latency) "sqrtss" and "sqrtps"
instructions:
https://uops.info/table.html?search=sqrtps&cb_lat=on&cb_tp=on&cb_SNB=on&cb_SKL=on&cb_ZENp=on&cb_ZEN2=on&cb_ZEN3=on&cb_measurements=on&cb_avx=on&cb_sse=on

So we should set this tuning flag to alter codegen of plain
"sqrt(X)" expansion (as opposed to reciprocal-sqrt - there
is other test coverage for that pattern). The expansion is
both slower and less accurate than the hardware instruction.

Differential Revision: https://reviews.llvm.org/D119001
2022-02-04 13:59:20 -05:00
Keith Smiley dbed14d215 [llvm-libtool-darwin] Fix crash with bitcode asm module
When using llvm-libtool-darwin with LTO building llvm itself, it crashed
on a file with an asm module in the bitcode. This fixes that by
correctly registering the targets for this.

Differential Revision: https://reviews.llvm.org/D118575
2022-02-04 10:54:27 -08:00
LLVM GN Syncbot e55ace6c37 [gn build] Port 1d8bbe3d25 2022-02-04 18:44:32 +00:00
Craig Topper 1d8bbe3d25 [RISCV] Implement a basic version of AArch64RedundantCopyElimination pass.
Using AArch64's original implementation for reference, this patch
implements a pass to remove unneeded copies of X0. This pass runs
after register allocation and looks to see if a register is implied
to be 0 by a branch in the predecessor basic block.

Reviewed By: asb

Differential Revision: https://reviews.llvm.org/D118160
2022-02-04 10:43:46 -08:00
Jonas Devlieghere edbb0f6df7 [lldb] Rename DemangleWithRichManglingInfo to GetRichManglingInfo (NFC)
This addresses Pavel's comment from D118814.
2022-02-04 10:40:33 -08:00