Commit Graph

426364 Commits

Author SHA1 Message Date
David Spickett c8db406127 Revert "[libcxx] Temporarily skip Arm configs"
This reverts commit d4220af527.

Linaro bots are back online.
2022-06-06 08:25:51 +00:00
Shao-Ce SUN 84bacb18c6 [RISCV] Use check-prefixes to reduce check lines
Reviewed By: frasercrmck

Differential Revision: https://reviews.llvm.org/D125083
2022-06-06 15:59:15 +08:00
yanming bc93d51d36 [NFC][RISCV][format] Blank line between functions, remove unnecessary semicolon. 2022-06-06 15:38:14 +08:00
Kazu Hirata 8daf23d364 [Scalar] Use llvm::make_early_inc_range (NFC) 2022-06-05 23:53:18 -07:00
yanming 8d9d8f866a [RISCV] Define risc-v's own register class to model FP Register.
The default RegisterClass is not enough to model RISCV Register.
We define risc-v's own register class to model FP Register.
This helps to better estimate the register pressure in the loop-vectorize.

Reviewed By: kito-cheng

Differential Revision: https://reviews.llvm.org/D126854
2022-06-06 14:43:52 +08:00
Qingyuan Zheng c119a17e7f [AST] Fix clang RecursiveASTVisitor for definition of XXXTemplateSpecializationDecl
Fixes https://github.com/clangd/clangd/issues/1132
where clangd's semantic highlighting is missing for symbols of a template
specialization definition. It turns out the visitor didn't traverse the
base classes of Class/Var##TemplateSpecializationDecl, i.e.
CXXRecordDecl/VarDecl. This patch adds them back as what is done in
DEF_TRAVERSE_TMPL_PART_SPEC_DECL.

Reviewed By: rsmith

Differential Revision: https://reviews.llvm.org/D126757
2022-06-06 02:35:34 -04:00
Kazu Hirata 7c009d2c31 [PDB] Remove truncate* (NFC)
- truncateQuotedNameFront: The last use was removed on Jul 10, 2017 in
  commit a9d944fd6f.

- truncateQuotedNameBack: The last use was removed on Mar 26, 2018 in
  commit 7b84b678a9.

- truncateStringMiddle: The last use was removed on Mar 26, 2018 in
  commit 7b84b678a9.

- truncateStringBack: The last use is in truncateQuotedNameBack being
  removed above.

- truncateStringFront: The last use is in truncateQuotedNameFront
  being removed above.
2022-06-05 23:33:51 -07:00
Chuanqi Xu 448995c521 [NFC] [Coroutines] Add test for ambiguous allocation functions in
promise_type

Address the post-commit comment in
https://reviews.llvm.org/D125517#inline-1217244
2022-06-06 14:23:35 +08:00
Chris Bieneman f06abbb393 LLVM Driver Multicall tool
This patch adds an llvm-driver multicall tool that can combine multiple
LLVM-based tools. The build infrastructure is enabled for a tool by
adding the GENERATE_DRIVER option to the add_llvm_executable CMake
call, and changing the tool's main function to a canonicalized
tool_name_main format (i.e. llvm_ar_main, clang_main, etc...).

As currently implemented llvm-driver contains dsymutil, llvm-ar,
llvm-cxxfilt, llvm-objcopy, and clang (if clang is included in the
build).

llvm-driver can be enabled from builds by setting
LLVM_TOOL_LLVM_DRIVER_BUILD=On.

There are several limitations in the current implementation, which can
be addressed in subsequent patches:

(1) the multicall binary cannot currently properly handle
multi-dispatch tools. This means symlinking llvm-ranlib to llvm-driver
will not properly result in llvm-ar's main being called.
(2) the multicall binary cannot be comprised of tools containing
conflicting cl::opt options as the global cl::opt option list cannot
contain duplicates.

These limitations can be addressed in subsequent patches.

Differential revision: https://reviews.llvm.org/D109977
2022-06-06 04:27:32 +00:00
Brad Smith c2d27c8959 [BPF] Enable IAS in backend
Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D123845
2022-06-05 23:28:53 -04:00
Kazu Hirata 5c06f7168f [CodeGen] Remove splitCanCauseEvictionChain and its helpers (NFC)
The last use was removed on Mar 7, 2022 in commit
294eca35a0.
2022-06-05 20:22:47 -07:00
jacquesguan ad44495ad3 [mlir][NFC] Replace some llvm::find with llvm::is_contained.
This patch replaces some llvm::find with llvm::is_contained, it should be more clear.

Differential Revision: https://reviews.llvm.org/D127077
2022-06-06 03:01:14 +00:00
Kazu Hirata 43d4585e64 [GlobalISel] Remove widenWithUnmerge (NFC)
The last use was removed on Dec 23, 2021 in commit
29f88b93fd.
2022-06-05 19:58:18 -07:00
Kazu Hirata 61abcb0b37 [GlobalISel] Remove valueIsSplit (NFC)
The last use was removed on Jun 27, 2019 in commit
8138996128.
2022-06-05 19:51:03 -07:00
Lian Wang 20cf77f776 [LegalizeTypes][VP] Add widen and split support for vp.fptrunc and vp.fpext
Reviewed By: frasercrmck

Differential Revision: https://reviews.llvm.org/D126439
2022-06-06 02:28:01 +00:00
chenglin.bi 2e7d4b6619 [InstCombine] Add more tests for shl+lshr transforms; NFC 2022-06-06 10:15:48 +08:00
chenglin.bi cfdd2b1aef [InstCombine] Fix tests const value for shl+lshr transforms; NFC 2022-06-06 10:08:56 +08:00
chenglin.bi 0cbd5d3ded [InstCombine] Add more tests for shl+lshr transforms; NFC 2022-06-06 09:59:41 +08:00
Phoebe Wang 52818fd97f [Clang][FP16] Add 4 builtins for _Float16
We are lacking builtins support for `_Float16`. In most cases, we can use other floating-type builtins and truncate them to `_Float16`.
But it's a problem to SNaN, e.g., https://gcc.godbolt.org/z/cqr5nG1jh
This patch adds `__builtin_nansf16` support as well as other 3 ones since they are usually used together.

Reviewed By: LuoYuanke

Differential Revision: https://reviews.llvm.org/D127050
2022-06-06 09:00:26 +08:00
Kazu Hirata d93728978b [clang] Use llvm::is_contained (NFC) 2022-06-05 17:56:40 -07:00
Sanjay Patel 3f33d67d8a [InstCombine] fold mul with masked low bit operand to trunc+select
https://alive2.llvm.org/ce/z/o7rQ5q

This shows an extra instruction in some cases, but that is
caused by an existing canonicalization of trunc -> and+icmp.

Codegen should be better for any target where a multiply is
more costly than the most simple ALU op.

This ends up producing the requested x86 asm from issue #55618,
but it's not the same IR. We are missing a canonicalization
from the negate+mask pattern to the trunc+select created here.
2022-06-05 20:07:18 -04:00
Sanjay Patel abb21b54bc [ConstProp] add tests for APFloat truncate miscompile; NFC
issue #55838
2022-06-05 20:07:18 -04:00
Fangrui Song 332d5204c5 [Driver][test] Remove unneeded -no-canonical-prefixes and -o %t.o
Similar to 980679981f
2022-06-05 16:06:09 -07:00
owenca fc1c160f73 [clang-format] Handle attributes for for/while loops
Fixes #55853.

Differential Revision: https://reviews.llvm.org/D127054
2022-06-05 15:45:25 -07:00
Fangrui Song 77e300ffdf [MC] Change EndOfStatement "unexpected tokens in .xxx directive " to "expected newline" 2022-06-05 15:11:01 -07:00
Fangrui Song 8c911f8e9a [ARM][MC] Change EndOfStatement "unexpected tokens in .xxx directive " to "expected newline"
The directive name is not useful because the next line replicates the error line
which includes the directive. The prevailing style uses "expected newline".
2022-06-05 14:53:59 -07:00
Aditya Kumar 8f7b14898f [NFC] Make comment consistent with allow|ignore list renamings
Reviewed By: thakis
Differential Revision: https://reviews.llvm.org/D123640
2022-06-05 14:49:01 -07:00
Fangrui Song c56f5c71cf [AArch64][MC] Change "unexpected tokens in .xxx directive " to "expected newline"
The directive name is not useful because the next line replicates the error line
which includes the directive. The prevailing style uses "expected newline".
2022-06-05 14:32:31 -07:00
Peter Collingbourne a739f4d083 gn build: Fix build when not building the native target.
Differential Revision: https://reviews.llvm.org/D127068
2022-06-05 14:12:51 -07:00
Fangrui Song b92436efcb [bolt] Remove unneeded cl::ZeroOrMore for cl::opt options 2022-06-05 13:29:49 -07:00
Joe Loser 3583826bb5
[libc++][test] Mark ranges.transform.pass.cpp UNSUPPORTED for AIX
The `ranges.transform.pass.cpp` often times out on CI for AIX (32-bit and 64-bit)
only. Mark the test as `UNSUPPORTED` for `AIX` for now. It should be looked into in
the future.

Differential Revision: https://reviews.llvm.org/D127051
2022-06-05 13:45:29 -06:00
Stella Laurenzo 768a251587 [mlir] Tunnel LLVM_USE_LINKER through to the standalone example build.
When building in debug mode, the link time of the standalone sample is excessive, taking upwards of a minute if using BFD. This at least allows lld to be used if the main invocation was configured that way. On my machine, this gets a standalone test that requires a relink to run in ~13s for Debug mode. This is still a lot, but better than it was. I think we may want to do something about this test: it adds a lot of latency to a normal compile/test cycle and requires a bunch of arg fiddling to exclude.

I think we may end up wanting a `check-mlir-heavy` target that can be used just prior to submit, and then make `check-mlir` just run unit/lite tests. More just thoughts for the future (none of that is done here).

Reviewed By: bondhugula, mehdi_amini

Differential Revision: https://reviews.llvm.org/D126585
2022-06-05 12:31:41 -07:00
Kazu Hirata 3b9707dbc0 [llvm] Convert for_each to range-based for loops (NFC) 2022-06-05 12:07:14 -07:00
Kazu Hirata 4c78386f44 [Sparc] Fix a warning
This patch fixes:

  llvm/lib/Target/Sparc/AsmParser/SparcAsmParser.cpp:910:5: error:
  default label in switch which covers all enumeration values
  [-Werror,-Wcovered-switch-default]
2022-06-05 11:49:13 -07:00
Matheus Izvekov f62433f17c
[NFC] Add test cases reported in PR54341
Signed-off-by: Matheus Izvekov <mizvekov@gmail.com>

Differential Revision: https://reviews.llvm.org/D127074
2022-06-05 20:34:28 +02:00
Alexey Lapshin 501d5b24db [Debuginfo][DWARF][NFC] Refactor DwarfStringPoolEntryRef - remove isIndexed().
This patch is extraction from the https://reviews.llvm.org/D126883.
It removes DwarfStringPoolEntryRef::isIndexed() and isIndexed bit
since they are not used.

Differential Revision: https://reviews.llvm.org/D126958
2022-06-05 21:18:31 +03:00
LemonBoy 1bfc5e720c [SPARC][MC] Support more relocation types
This patch introduces support for %hix, %lox, %gdop_hix22, %gdop_lox10 and %gdop.

An extra test is introduced to make sure the fixups are correctly applied.

Reviewed By: dcederman

Differential Revision: https://reviews.llvm.org/D102575
2022-06-05 14:09:39 -04:00
Peter Klausler 4daa33f6d1 [flang][runtime] Use __float128 where possible & needed in runtime
On targets with __float128 available and distinct from long double,
use it to support more kind=16 entry points.  This affects mostly
x86-64 targets.  This means that more runtime entry points are
defined for lowering to call.

Delete Common/long-double.h and its LONG_DOUBLE macro in favor of
testing the standard macro LDBL_MANT_DIG.

Differential Revision: https://reviews.llvm.org/D127025
2022-06-05 09:16:57 -07:00
Kazu Hirata 30f19382c6 [Scalar] Remove isValidSingle (NFC)
The last use was removed on Feb 18, 2022 in commit
00ab91b70d.
2022-06-05 08:45:11 -07:00
Nathan James a13b61f7f0
[ADT] Add edit_distance_insensitive to StringRef
In some instances its advantageous to calculate edit distances without worrying about casing.
Currently to achieve this both strings need to be converted to the same case first, then edit distance can be calculated.

Reviewed By: dblaikie

Differential Revision: https://reviews.llvm.org/D126159
2022-06-05 12:03:09 +01:00
Fangrui Song 95a134254a Remove unneeded cl::ZeroOrMore for cl::opt/cl::list options 2022-06-05 01:07:51 -07:00
Fangrui Song d86a206f06 Remove unneeded cl::ZeroOrMore for cl::opt/cl::list options 2022-06-05 00:31:44 -07:00
Kazu Hirata 2c4d52467a [Transforms/Utils] Use predecessors (NFC) 2022-06-05 00:16:14 -07:00
Christian Sigg 400fef081a Recommit: "[MLIR][NVVM] Replace fdiv on fp16 with promoted (fp32) multiplication with reciprocal plus one (conditional) Newton iteration."
This change rolls bcfc0a9051 forward (i.e., reverting 369ce54bb3) with fixed CMakeLists.txt.
2022-06-05 09:11:43 +02:00
Fangrui Song d0d1c416cb Remove unneeded cl::ZeroOrMore for cl::list options 2022-06-04 23:51:13 -07:00
Kazu Hirata e0039b8d6a Use llvm::less_second (NFC) 2022-06-04 22:48:32 -07:00
Kazu Hirata 9a8e65de8c [Target] Use MachineBasicBlock::erase (NFC) 2022-06-04 22:41:24 -07:00
Kazu Hirata bcf4fa458a [CodeGen] Use a range-based for loop (NFC) 2022-06-04 22:26:55 -07:00
Kazu Hirata 8cc9fa6f78 Use static_cast from SmallString to std::string (NFC) 2022-06-04 22:09:27 -07:00
Kazu Hirata 4969a6924d Use llvm::less_first (NFC) 2022-06-04 21:23:18 -07:00