Simon Pilgrim [Sat, 16 Oct 2021 10:07:00 +0000 (11:07 +0100)]
[ConstantFolding] Use getValueAPF const ref value where possible. NFC.
Don't copy the value if we can avoid it.
Simon Pilgrim [Sat, 16 Oct 2021 10:02:13 +0000 (11:02 +0100)]
[ConstantFolding] ConstantFoldScalarCall1 - early-out if getLibFunc fails. NFC.
Roman Lebedev [Sat, 16 Oct 2021 09:25:08 +0000 (12:25 +0300)]
[X86][LV] X86 does *not* prefer vectorized addressing
And another attempt to start untangling this ball of threads around gather.
There's `TTI::prefersVectorizedAddressing()`hoop, which confusingly defaults to `true`,
which tells LV to try to vectorize the addresses that lead to loads,
but X86 generally can not deal with vectors of addresses,
the only instructions that support that are GATHER/SCATTER,
but even those aren't available until AVX2, and aren't really usable until AVX512.
This specializes the hook for X86, to return true only if we have AVX512 or AVX2 w/ fast gather.
Reviewed By: RKSimon
Differential Revision: https://reviews.llvm.org/D111546
Ben Shi [Tue, 12 Oct 2021 09:03:16 +0000 (09:03 +0000)]
[AArch64] Optimize add/sub with immediate
Optimize ([add|sub] r, imm) -> ([ADD|SUB] ([ADD|SUB] r, #imm0, lsl #12), #imm1),
if imm == (imm0<<12)+imm1. and both imm0 and imm1 are non-zero 12-bit unsigned
integers.
Optimize ([add|sub] r, imm) -> ([SUB|ADD] ([SUB|ADD] r, #imm0, lsl #12), #imm1),
if imm == -(imm0<<12)-imm1, and both imm0 and imm1 are non-zero 12-bit unsigned
integers.
Reviewed By: jaykang10, dmgreen
Differential Revision: https://reviews.llvm.org/D111034
Carlos Galvez [Tue, 28 Sep 2021 08:37:32 +0000 (08:37 +0000)]
[clang-tidy] Fix false positive in cppcoreguidelines-virtual-class-destructor
Incorrectly triggers for template classes that inherit
from a base class that has virtual destructor.
Any class inheriting from a base that has a virtual destructor
will have their destructor also virtual, as per the Standard:
https://timsong-cpp.github.io/cppwp/n4140/class.dtor#9
> If a class has a base class with a virtual destructor,
> its destructor (whether user- or implicitly-declared) is virtual.
Added unit tests to prevent regression.
Fixes bug https://bugs.llvm.org/show_bug.cgi?id=51912
Differential Revision: https://reviews.llvm.org/D110614
Matthias Springer [Sat, 16 Oct 2021 08:08:00 +0000 (17:08 +0900)]
[mlir][linalg][bufferize] Relax rules for extract_slice/insert_slice matching
The rules were too restrictive, causing out-of-place bufferization when the result of two ExtractSliceOp is fed into an InsertSliceOp.
Differential Revision: https://reviews.llvm.org/D111861
Craig Topper [Sat, 16 Oct 2021 07:26:59 +0000 (00:26 -0700)]
[TableGen] Replace static_cast with llvm's cast. NFC
These all appear next to an isa<> and cast<> is much more
common in these cases.
Juneyoung Lee [Sat, 16 Oct 2021 07:20:14 +0000 (16:20 +0900)]
Fix missing failures in clang-ppc64be* and retry fixing clang-x64-windows-msvc
Groverkss [Sat, 16 Oct 2021 06:45:31 +0000 (12:15 +0530)]
[MLIR] Generalize Affine dependence analysis using Affine Relations
This patch removes code very specific to affine dependence analysis and
refactors it as a FlatAfffineRelation.
A FlatAffineRelation represents a set of ordered pairs (domain -> range) where
"domain" and "range" are tuples of identifiers. These relations are used to
represent an "access relation" for memory access on a memref. An access
relation maps elements of an iteration domain to the element(s) of an array
domain accessed by that iteration of the associated statement through some
array reference. The dependence relation representing the dependence
constraints between two memory accesses can be built by composing the access
relation of the destination access by the inverse of the access relation of
source access.
This patch does not change the functionality of the existing dependence
analysis in checkMemrefAccessDependence, but refactors it to use
FlatAffineRelations to deduplicate code and enable code reuse for future
development of features like scheduling, value-based dependence analysis, etc.
Reviewed By: bondhugula
Differential Revision: https://reviews.llvm.org/D110563
Juneyoung Lee [Sat, 16 Oct 2021 05:33:59 +0000 (14:33 +0900)]
Fix lit test failures in clang-ppc* and clang-x64-windows-msvc
Juneyoung Lee [Sat, 16 Oct 2021 04:51:50 +0000 (13:51 +0900)]
Resolve lit failures in clang after 8ca4b3e's land
Juneyoung Lee [Fri, 15 Oct 2021 10:45:30 +0000 (19:45 +0900)]
[Clang/Test]: Rename enable_noundef_analysis to disable-noundef-analysis and turn it off by default (2)
This patch updates test files after D105169.
Autogenerated test codes are changed by `utils/update_cc_test_checks.py,` and non-autogenerated test codes are changed as follows:
(1) I wrote a python script that (partially) updates the tests using regex: {
F18594904} The script is not perfect, but I believe it gives hints about which patterns are updated to have `noundef` attached.
(2) The remaining tests are updated manually.
Reviewed By: eugenis
Differential Revision: https://reviews.llvm.org/D108453
Juneyoung Lee [Fri, 15 Oct 2021 10:26:07 +0000 (19:26 +0900)]
[Clang/Test]: Rename enable_noundef_analysis to disable-noundef-analysis and turn it off by default
Turning on `enable_noundef_analysis` flag allows better codegen by removing freeze instructions.
I modified clang by renaming `enable_noundef_analysis` flag to `disable-noundef-analysis` and turning it off by default.
Test updates are made as a separate patch: D108453
Reviewed By: eugenis
Differential Revision: https://reviews.llvm.org/D105169
Michael Kruse [Sat, 16 Oct 2021 02:11:23 +0000 (21:11 -0500)]
[Polly][docs] Fix Sphinx warning.
ReStructured Text is not Markdown.
Craig Topper [Sat, 16 Oct 2021 00:39:00 +0000 (17:39 -0700)]
[X86] Add more tests for D111858. NFC
Add tests with sub instead of neg.
Zhi An Ng [Sat, 16 Oct 2021 00:45:08 +0000 (17:45 -0700)]
[WebAssembly] Add prototype relaxed laneselect instructions
Add i8x16, i16x8, i32x4, i64x2 laneselect instructions. These are only
exposed as builtins, and require user opt-in.
Jacques Pienaar [Sat, 16 Oct 2021 00:30:17 +0000 (17:30 -0700)]
[mlir] Add folder for shape.add
Aart Bik [Fri, 15 Oct 2021 17:07:45 +0000 (10:07 -0700)]
[mlir][sparse] run less combinations of SpMM in test (to reduce runtime)
This revision also adds a few passes to the sparse compiler part to unify the transformation sequence with all other paths we currently use.
Reviewed By: nicolasvasilache
Differential Revision: https://reviews.llvm.org/D111900
Geoffrey Martin-Noble [Fri, 15 Oct 2021 22:40:42 +0000 (15:40 -0700)]
[MLIR][TOSA] Drop "OnTensors" suffix
This is the only lowering to Linalg Tosa has, so it's needlessly
verbose. Likely this was a carry over from IREE's usage where we
originally lowered to linalg on buffers (the only linalg that existed at
the time), so the everything on tensors needed the suffix. We're dropping
it in IREE also, having transitioned entirely to using Linalg on
tensors.
Reviewed By: sjarus
Differential Revision: https://reviews.llvm.org/D111911
Fangrui Song [Fri, 15 Oct 2021 22:36:30 +0000 (15:36 -0700)]
[ELF] Require two-dash form for --pack-dyn-relocs
LLD specific options can be more rigid.
Also add a test.
Matheus Izvekov [Thu, 14 Oct 2021 19:49:22 +0000 (21:49 +0200)]
[clang] fix typo correction not looking for candidates in base classes.
RecordMemberExprValidator was not looking through ElaboratedType
nodes when looking for candidates which occur in base classes.
Signed-off-by: Matheus Izvekov <mizvekov@gmail.com>
Reviewed By: rsmith
Differential Revision: https://reviews.llvm.org/D111830
Anshil Gandhi [Fri, 15 Oct 2021 22:15:45 +0000 (16:15 -0600)]
Revert "[HIP] [AlwaysInliner] Disable AlwaysInliner to eliminate undefined symbols"
This reverts commit
03375a3fb33b11e1249d9c88070b7f33cb97802a.
Lawrence D'\''Anna [Fri, 15 Oct 2021 22:05:46 +0000 (15:05 -0700)]
Fix Xcode project for debugserver
It seems StringConvert.cpp was moved, and the Xcode project file
wasn't updated.
Reviewed By: JDevlieghere
Differential Revision: https://reviews.llvm.org/D111910
Nikita Popov [Fri, 15 Oct 2021 19:25:39 +0000 (21:25 +0200)]
[ConstantRange] Compute precise shl range for single elements
For the common case where the shift amount is constant (a single
element range) we can easily compute a precise range (up to
unsigned envelope), so do that.
Anshil Gandhi [Fri, 15 Oct 2021 21:16:32 +0000 (15:16 -0600)]
[HIP] Relax conditions for address space cast in builtin args
Allow (implicit) address space casting between LLVM-equivalent
target address spaces.
Reviewed By: yaxunl, tra
Differential Revision: https://reviews.llvm.org/D111734
Arthur Eubanks [Fri, 15 Oct 2021 21:33:13 +0000 (14:33 -0700)]
[NFC] Make Assume2KnowledgeMap's typedef more precise
Sanjay Patel [Fri, 15 Oct 2021 21:09:02 +0000 (17:09 -0400)]
[InstCombine] generalize fold for mask-with-signbit-splat, part 2
This removes an over-specified fold. The more general transform
was added with:
727e642e970d
There's a difference on an existing test that shows a potentially
unnecessary use limit on an icmp fold.
That fold is in InstCombinerImpl::foldICmpSubConstant(), and IIRC
there was some back-and-forth on it and similar folds because they
could cause analysis/passes (SCEV, LSR?) to miss optimizations.
Differential Revision: https://reviews.llvm.org/D111410
Stanislav Mekhanoshin [Fri, 15 Oct 2021 20:50:23 +0000 (13:50 -0700)]
[AMDGPU] Precommit fused-bitlogic.ll test. NFC.
Nikita Popov [Fri, 15 Oct 2021 20:44:52 +0000 (22:44 +0200)]
[ConstantRange] Support checking optimality for subset of inputs (NFC)
We always want to check correctness, but for some operations we
can only guarantee optimality for a subset of inputs. Accept an
additional predicate that determines whether optimality for a
given pair of ranges should be checked.
Anshil Gandhi [Fri, 15 Oct 2021 20:41:41 +0000 (14:41 -0600)]
Revert "[HIP] Relax conditions for address space cast in builtin args"
This reverts commit
3b48e1170dc623a95ff13a1e34c839cc094bf321.
Sanjay Patel [Fri, 15 Oct 2021 20:22:59 +0000 (16:22 -0400)]
[InstCombine] generalize fold for mask-with-signbit-splat
(iN X s>> (N-1)) & Y --> (X < 0) ? Y : 0
https://alive2.llvm.org/ce/z/qeYhdz
I was looking at a missing abs() transform and found my way to this
generalization of an existing fold that was added with D67799.
As discussed in that review, we want to make sure codegen handles
this difference well, and for all of the targets/types that I
spot-checked, it looks good.
I am leaving the existing fold in place in this commit because
it covers a potentially missing icmp fold, but I plan to remove
that as a follow-up commit as suggested during review.
Differential Revision: https://reviews.llvm.org/D111410
Anshil Gandhi [Fri, 15 Oct 2021 19:44:38 +0000 (13:44 -0600)]
[HIP] Relax conditions for address space cast in builtin args
Allow (implicit) address space casting between LLVM-equivalent
target address spaces.
Reviewed By: yaxunl
Differential Revision: https://reviews.llvm.org/D111734
Nikita Popov [Fri, 15 Oct 2021 19:56:54 +0000 (21:56 +0200)]
[BasicAA] Rename ExtendedValue to CastedValue (NFC)
As suggested on D110977, rename ExtendedValue to CastedValue,
because it will contain more than just extensions in the future.
Nikita Popov [Fri, 15 Oct 2021 19:35:57 +0000 (21:35 +0200)]
[ConstantRange] Better diagnostic for correctness test failure (NFC)
Print a friendly error message including the inputs, result and
not-contained element if an exhaustive correctness test fails,
same as we do if the optimality test fails.
Volodymyr Sapsai [Sat, 9 Oct 2021 00:10:18 +0000 (17:10 -0700)]
[modules] Make a module map referenced by a system map a system one too.
Mimic the behavior of including headers where a system includer makes an
includee a system header too.
rdar://
84049469
Differential Revision: https://reviews.llvm.org/D111476
Florian Hahn [Fri, 15 Oct 2021 18:27:23 +0000 (19:27 +0100)]
[VectorCombine] Add option to only run scalarization transforms.
This patch adds a pass option to only run transforms that scalarize
vector operations and do not create new vector instructions.
When running VectorCombine early in the pipeline introducing new vector
operations can have negative effects, like blocking loop or SLP
vectorization. To avoid regressions, restrict the early VectorCombine
run (when using -enable-matrix) to only perform scalarization and not
introduce new vector operations.
This is done as option to the pass directly, which is then set when
adding the pass to the pipeline. This is done for the new pass manager
only.
Reviewed By: spatel
Differential Revision: https://reviews.llvm.org/D111800
Pirama Arumuga Nainar [Fri, 15 Oct 2021 18:56:16 +0000 (11:56 -0700)]
[compiler-rt/profile] Hide __llvm_profile_raw_version
Hide __llvm_profile_raw_version so as not to resolve reference from a
dependent shared object. Since libclang_rt.profile is added later in
the command line, a definition of __llvm_profile_raw_version is not
included if it is provided from an earlier object, e.g. from a shared
dependency.
This causes an extra dependence edge where if libA.so depends on libB.so
and both are coverage-instrumented, libA.so uses libB.so's definition of
__llvm_profile_raw_version. This leads to a runtime link failure if the
libB.so available at runtime does not provide this symbol (but provides
the other dependent symbols). Such a scenario can occur in Android's
mainline modules.
E.g.:
ld -o libB.so libclang_rt.profile-x86_64.a
ld -o libA.so -l B libclang_rt.profile-x86_64.a
libB.so has a global definition of __llvm_profile_raw_version. libA.so
uses libB.so's definition of __llvm_profile_raw_version. At runtime,
libB.so may not be coverage-instrumented (i.e. not export
__llvm_profile_raw_version) so runtime linking of libA.so will fail.
Marking this symbol as hidden forces each binary to use the definition
of __llvm_profile_raw_version from libclang_rt.profile.
Differential Revision: https://reviews.llvm.org/D111759
Sam Clegg [Thu, 7 Oct 2021 19:17:15 +0000 (12:17 -0700)]
[WebAssembly] Add import info to `dylink` section of shared libraries
See https://github.com/WebAssembly/tool-conventions/pull/175
Differential Revision: https://reviews.llvm.org/D111345
Mingming Liu [Fri, 15 Oct 2021 18:27:40 +0000 (11:27 -0700)]
[SelectionDAG] Fix typo in option help
Reviewed By: MaskRay
Differential Revision: https://reviews.llvm.org/D111867
Anshil Gandhi [Fri, 15 Oct 2021 17:13:12 +0000 (11:13 -0600)]
[HIP] [AlwaysInliner] Disable AlwaysInliner to eliminate undefined symbols
By default clang emits complete contructors as alias of base constructors if they are the same.
The backend is supposed to emit symbols for the alias, otherwise it causes undefined symbols.
@yaxunl observed that this issue is related to the llvm options `-amdgpu-early-inline-all=true`
and `-amdgpu-function-calls=false`. This issue is resolved by only inlining global values
with internal linkage. The `getCalleeFunction()` in AMDGPUResourceUsageAnalysis also had
to be extended to support aliases to functions. inline-calls.ll was corrected appropriately.
Reviewed By: yaxunl, #amdgpu
Differential Revision: https://reviews.llvm.org/D109707
Nico Weber [Thu, 14 Oct 2021 22:32:10 +0000 (18:32 -0400)]
[lld/mac] Mark private externs with GOT relocs as LOCAL in indirect symbtab
prepareSymbolRelocation() in Writer.cpp adds both symbols that need binding and
symbols relocated with a pointer relocation to the got.
Pointer relocations are emitted for non-movq GOTPCREL(%rip) loads. (movqs
become GOT_LOADs so that the linker knows they can be relaxed to leaqs, while
others, such as addq, become just GOT -- a pointer relocation -- since they
can't be relaxed in that way).
For example, this C file produces a private_extern GOT relocation when
compiled with -O2 with clang:
extern const char kString[];
const char* g(int a) { return kString + a; }
Linkers need to put pointer-relocated symbols into the GOT, but ld64 marks them
as LOCAL in the indirect symbol table. This matters, since `strip -x` looks at
the indirect symbol table when deciding what to strip.
The indirect symtab emitting code was assuming that only symbols that need
binding are in the GOT, but pointer relocations where there too. Hence, the
code needs to explicitly check if a symbol is a private extern.
Fixes https://crbug.com/1242638, which has some more information in comments 14
and 15. With this patch, the output of `nm -U` on Chromium Framework after
stripping now contains just two symbols when using lld, just like with ld64.
Differential Revision: https://reviews.llvm.org/D111852
Michael Liao [Thu, 14 Oct 2021 20:10:15 +0000 (16:10 -0400)]
[amdgpu] Fix a crash case when preserving MDT in SILowerControlFlow
- When a redundant MBB is being erased from MDT, check whether its
single successor is dominiated by it. If yes, update that successor's
idom before erasing MBB; otherwise, it implies MBB is a leaf node and
could be erased directly.
Reviewed By: foad
Differential Revision: https://reviews.llvm.org/D111831
Vitaly Buka [Fri, 15 Oct 2021 02:04:23 +0000 (19:04 -0700)]
[ubsan] Remove REQUIRED from some TestCases
It's not obvious why they are needed, and tests pass.
Reviewed By: lebedev.ri
Differential Revision: https://reviews.llvm.org/D111859
Arthur Eubanks [Wed, 6 Oct 2021 20:57:29 +0000 (13:57 -0700)]
[clang] Pass -clear-ast-before-backend in Clang::ConstructJob()
This clears the memory used for the Clang AST before we run LLVM passes.
https://llvm-compile-time-tracker.com/compare.php?from=
d0a5f61c4f6fccec87fd5207e3fcd9502dd59854&to=
b7437fee79e04464dd968e1a29185495f3590481&stat=max-rss
shows significant memory savings with no slowdown (in fact -O0 slightly speeds up).
For more background, see
https://lists.llvm.org/pipermail/cfe-dev/2021-September/068930.html.
Turn this off for the interpreter since it does codegen multiple times.
Differential Revision: https://reviews.llvm.org/D111270
Jonas Paulsson [Fri, 15 Oct 2021 15:43:39 +0000 (17:43 +0200)]
[SystemZ] Handle huge immediates in SystemZInstrInfo::loadImmediate().
This is needed during isel pseudo expansion in order not to crash on huge
immediates.
Review: Ulrich Weigand
Kazu Hirata [Fri, 15 Oct 2021 17:07:08 +0000 (10:07 -0700)]
[clang] Use llvm::is_contained (NFC)
Jessica Paquette [Fri, 15 Oct 2021 16:59:00 +0000 (09:59 -0700)]
NFC: Remove wayward MIR tests from lib/Target
These were put in lib/Target instead of tests.
Thankfully dupes of them already existed in the tests directory.
So, just delete them.
Raphael Isemann [Fri, 15 Oct 2021 16:48:17 +0000 (18:48 +0200)]
[lldb] Harden TestCompletion against new settings in 'target.process'
This test starts failing when people add a setting starting with
`target.process.t` which of course can easily happen. Make it a bit more
resistant by only requiring that `target.process.thr` has a unique completion.
Alexey Bataev [Fri, 15 Oct 2021 16:42:14 +0000 (09:42 -0700)]
[SLP]Add a test for shrink shuffle after reorder, NFC.
Ellis Hoag [Fri, 15 Oct 2021 16:37:12 +0000 (12:37 -0400)]
[DebugInfo] retainedTypes should not have subprograms
After D80369, the retainedTypes in CU's should not have any subprograms
so we should not handle that case when emitting debug info.
Differential Revision: https://reviews.llvm.org/D111593
Stephen Tozer [Tue, 21 Sep 2021 14:11:22 +0000 (15:11 +0100)]
[DebugInfo] Limit the size of DIExpressions that we will salvage up to
Fixes: https://bugs.llvm.org/show_bug.cgi?id=51841
This patch places an arbitrary limit on the size of DIExpressions that
we will produce via salvaging, for performance reasons. This helps to
fix a performance issue observed in the bug above, in which debug values
would be salvaged hundreds of times, producing expressions with over
1000 elements and causing the compiler to hang. Limiting the size of
debug values that we will produce to 128 largely fixes this issue.
Reviewed By: dblaikie, jmorse
Differential Revision: https://reviews.llvm.org/D110332
Aart Bik [Thu, 14 Oct 2021 01:33:53 +0000 (18:33 -0700)]
[mlir][sparse] implement sparse tensor init operation
Next step towards supporting sparse tensors outputs.
Also some minor refactoring of enum constants as well
as replacing tensor arguments with proper buffer arguments
(latter is required for more general sizes arguments for
the sparse_tensor.init operation, as well as more general
spares_tensor.convert operations later)
Reviewed By: wrengr
Differential Revision: https://reviews.llvm.org/D111771
Jinsong Ji [Fri, 15 Oct 2021 15:29:55 +0000 (15:29 +0000)]
[AIX] Enable int128 in 64 bit mode
This patch remove the override in AIX target,
so the int128 is enabled in 64 bit mode or with ForceEnableInt128.
Reviewed By: lkail
Differential Revision: https://reviews.llvm.org/D111078
Craig Topper [Fri, 15 Oct 2021 16:14:04 +0000 (09:14 -0700)]
[IR] Fix a few incorrect paths in file header comments. NFC
Cyndy Ishida [Fri, 15 Oct 2021 15:12:54 +0000 (08:12 -0700)]
[clang] Capture Framework when HeaderSearch is resolved via headermap
When building frameworks, headermaps responsible for mapping angle-included headers to their source file location are passed via
`-I` and not `-index-header-map`. Also, `-index-header-map` is only used for indexing purposes and not during most builds.
This patch holds on to the framework's name in HeaderFileInfo as this is retrieveable for cases outside of IndexHeaderMaps and
still represents the framework that is being built.
resolves: rdar://
84046893
Reviewed By: jansvoboda11
Differential Revision: https://reviews.llvm.org/D111468
Craig Topper [Fri, 15 Oct 2021 16:01:02 +0000 (09:01 -0700)]
[ARM] Don't use TARGET_HEADER_BUILTIN in arm_mve_builtins.inc or arm_cde_builtins.inc
The attributes string doesn't include 'f' or 'h'. I don't think
any code looks at the header name without those.
Reviewed By: simon_tatham
Differential Revision: https://reviews.llvm.org/D111755
Nicolas Vasilache [Fri, 15 Oct 2021 15:56:58 +0000 (15:56 +0000)]
[mlir][vector] NFC - Refactor and extract a helper StructuredGenerator class
Differential Revision: https://reviews.llvm.org/D111893
Konstantin Varlamov [Fri, 15 Oct 2021 15:40:42 +0000 (17:40 +0200)]
[libc++] LWG3266: delete the to_chars(bool) overload.
This PR only updates the synopsis in `<charconv>` -- the current
implementation already [deletes](https://github.com/llvm/llvm-project/blob/
e9e6266c704df43e2c52308e1b653dccefa89e04/libcxx/include/charconv#L108)
the overload and has a [test](https://github.com/llvm/llvm-project/blob/main/libcxx/test/std/utilities/charconv/charconv.to.chars/integral.bool.fail.cpp)
for it (and this has been the case from the first [commit](https://reviews.llvm.org/D41458)
where `<charconv>` was added).
Reviewed By: #libc, Mordante
Differential Revision: https://reviews.llvm.org/D111845
Joachim Protze [Fri, 15 Oct 2021 15:16:07 +0000 (17:16 +0200)]
[OpenMP][Tools][NFC] Make an Archer test more robust
The execution order of the tasks is not fixed, so there is no ordering
for the write accesses. Enforce the ordering that is expected in the check.
Mark de Wever [Fri, 8 Oct 2021 19:01:55 +0000 (21:01 +0200)]
[libc++][doc] Use issue labels.
During the review of D111166 I had a private discussion with @ldionne to
avoid the duplication of the C++2b issues in the Ranges and Format
status pages. The main reason for duplicating them is to make it easier to
find them. The title of the paper may not always make it clear to which
project the paper belongs.
This commit removes all LWG-issues from the Ranges and Format status page
and adds labels for these issue in the C++20/C++23 issues list.
A quick scan revealed there are some issues that are missing a label since
they weren't on the ranges issue list. These can be labelled in a separate
commit. In that commit I'll also look for issues for the spaceship operator
and chrono.
Reviewed By: Quuxplusone, ldionne, #libc
Differential Revision: https://reviews.llvm.org/D111458
gbreynoo [Fri, 15 Oct 2021 15:27:53 +0000 (16:27 +0100)]
[llvm-readelf] Make -W an alias of --wide
Currently -W and --wide are treated as two options as they are only
included for gnu readelf compatibility and ignored. This change makes -W
an alias of --wide to be consistent with other option aliases.
Differential Revision: https://reviews.llvm.org/D111731
Sanjay Patel [Fri, 15 Oct 2021 12:37:33 +0000 (08:37 -0400)]
[VectorCombine] add tests for shuffle of binops; NFC
Raphael Isemann [Fri, 15 Oct 2021 13:01:27 +0000 (15:01 +0200)]
[lldb] Add test for struct merging in scratch ASTContext
Tomas Matheson [Fri, 15 Oct 2021 15:09:54 +0000 (16:09 +0100)]
[AArch64] Fix failing test target-invalid-cpu-note.c
Frederic Cambus [Fri, 15 Oct 2021 14:36:19 +0000 (16:36 +0200)]
[Driver][NetBSD] Use Triple reference instead of ToolChain.getTriple().
Differential Revision: https://reviews.llvm.org/D111805
Abinav Puthan Purayil [Fri, 15 Oct 2021 03:59:58 +0000 (09:29 +0530)]
[AMDGPU] Avoid redundant calls to numBits in AMDGPUCodeGenPrepare::replaceMulWithMul24().
The isU24() and isI24() calls numBits to make its decision. This change
replaces them with the internal numBits call so that we can use its
result for the > 32 bit width cases.
Differential Revision: https://reviews.llvm.org/D111864
Max Fan [Fri, 15 Oct 2021 13:45:28 +0000 (08:45 -0500)]
[Polly] Remove checkIslAstExprInt and use RAII instead of manually freeing Expr. NFC.
Polly is trying to move towards using isl::ast_expr / isl-noexceptions.h
(which implements RAII) where possible instead of manually managing memory.
checkIslAstExprInt manually frees Expr, so it has been removed to be
more idiomatic and consistent.
Reviewed By: Meinersbur
Differential Revision: https://reviews.llvm.org/D111769
Michał Górny [Fri, 15 Oct 2021 14:03:44 +0000 (16:03 +0200)]
[lldb] [test] Add TestGDBServerTargetXML tests for x86 duplicate subregs
Aaron Ballman [Fri, 15 Oct 2021 13:56:54 +0000 (09:56 -0400)]
Fix a crash on an invalid templated UDL declaration
We were missing a null pointer check that a template parameter existed
at all.
Guillaume Chatelet [Fri, 15 Oct 2021 09:26:12 +0000 (09:26 +0000)]
[libc] Memory function benchmarks: rename MemcmpConfiguration in MemcmpOrBcmpConfiguration
This will help make sense of the double use of the same type in https://reviews.llvm.org/D111622#inline-1065560.
Differential Revision: https://reviews.llvm.org/D111868
Dávid Bolvanský [Fri, 15 Oct 2021 13:37:11 +0000 (15:37 +0200)]
[X86] Enable promotion of i16 popcnt (PR52056)
Solves https://bugs.llvm.org/show_bug.cgi?id=52056
Reviewed By: RKSimon
Differential Revision: https://reviews.llvm.org/D111507
Mubashar Ahmad [Fri, 15 Oct 2021 13:29:57 +0000 (14:29 +0100)]
[AArch64]Enabling Cortex-A510 Support
This patch enables support for Cortex-A510 CPUs.
Reviewed By: MarkMurrayARM, dmgreen
Differential Revision: https://reviews.llvm.org/D109825
Abinav Puthan Purayil [Thu, 14 Oct 2021 17:03:24 +0000 (22:33 +0530)]
[AMDGPU] Fix width check for signed mul24 generation.
This changes fixes a case in which the highest set bit of the original
result is at bit 31 and sign-extending the mul24 for it would make the
result negative.
Differential Revision: https://reviews.llvm.org/D111823
Mikhail Dvorskiy [Fri, 15 Oct 2021 12:36:07 +0000 (15:36 +0300)]
[pstl] Initial implementation of OpenMP backend, on behalf of Christopher Nelson nadiasvertex@gmail.com
Phabricator Review:
https://reviews.llvm.org/D99836
A couple of parallel patterns still remains serial - "Parallel partial sort", and "Parallel transform scan" - there are //TODOs in the code.
Michał Górny [Fri, 15 Oct 2021 12:15:50 +0000 (14:15 +0200)]
[lldb] [test] Simplify X86 TestGDBServerTargetXML logic to match AArch64
Michał Górny [Fri, 15 Oct 2021 11:58:27 +0000 (13:58 +0200)]
[lldb] [ABI/AArch64] Do not add subregs if some of them are present
Fix a bug introduced while refactoring ABIAArch64::AugmentRegisterInfo()
that caused subregisters to be added even if they were already present.
Instead, abort immediately if at least one subregister is found
(following ABIX86). While at it, add a test for that.
Differential Revision: https://reviews.llvm.org/D111881
Bogdan Graur [Fri, 15 Oct 2021 10:29:48 +0000 (12:29 +0200)]
Adds //mlir:GPUTransforms dependency to //llvm:MC as the former includes
headers from the latter.
Differential Revision: https://reviews.llvm.org/D111876
Andrew Savonichev [Wed, 10 Mar 2021 17:23:41 +0000 (20:23 +0300)]
Reland [clang] Check unsupported types in expressions
This was committed as
ec6c847179fd, but then reverted after a failure
in: https://lab.llvm.org/buildbot/#/builders/84/builds/13983
I was not able to reproduce the problem, but I added an extra check
for a NULL QualType just in case.
Original comit message:
The patch adds missing diagnostics for cases like:
float F3 = ((__float128)F1 * (__float128)F2) / 2.0f;
Sema::checkDeviceDecl (renamed to checkTypeSupport) is changed to work
with a type without the corresponding ValueDecl. It is also refactored
so that host diagnostics for unsupported types can be added here as
well.
Differential Revision: https://reviews.llvm.org/D109315
Michał Górny [Wed, 25 Aug 2021 19:59:27 +0000 (21:59 +0200)]
[lldb] [ABI/X86] Add pseudo-registers if missing
Differential Revision: https://reviews.llvm.org/D108831
Michał Górny [Sat, 9 Oct 2021 13:16:49 +0000 (15:16 +0200)]
[lldb] [DynamicRegisterInfo] Support value_regs with offset
Support specifying an offset for value_regs[0], and add the offset
to the computed derived register offset. This makes it possible to
e.g. create the "ah" register on x86.
Differential Revision: https://reviews.llvm.org/D111489
Anton Afanasyev [Sat, 9 Oct 2021 08:18:31 +0000 (11:18 +0300)]
[InstCombine] Support arbitrary const shift amount for `lshr (sext i1 ...)`
Add lshr (sext i1 X to iN), C --> select (X, -1 >> C, 0) case. This expands
C == N-1 case to arbitrary C.
Fixes PR52078.
Reviewed By: spatel, RKSimon, lebedev.ri
Differential Revision: https://reviews.llvm.org/D111330
Anton Afanasyev [Sat, 9 Oct 2021 08:16:25 +0000 (11:16 +0300)]
[Test][InstCombine] Precommit tests for PR52078
David Green [Fri, 15 Oct 2021 10:37:53 +0000 (11:37 +0100)]
[AArch64] Improve fptosi.sat vector lowering
Similar to D111236, this improves the lowering of vector fptosi.sat and
fptoui.sat, using legal converts and further saturating from there with
min/max. f64 are excluded for the moment due to producing worse code in
places compared to the unrolling.
Differential Revision: https://reviews.llvm.org/D111787
djtodoro [Fri, 15 Oct 2021 09:20:36 +0000 (11:20 +0200)]
[llvm-dwarfdump] Fix unsigned overflow when calculating stats
This fixes https://bugs.llvm.org/show_bug.cgi?id=51652.
The idea is to bump all the stat fields to 64-bit wide
unsigned integers. I've confirmed this resolves
the use case for chromium.
Differential Revision: https://reviews.llvm.org/D109217
David Green [Fri, 15 Oct 2021 10:12:23 +0000 (11:12 +0100)]
[AArch64] Improve fptosi.sat lowering
Improve the lowering of scalar fptosi.sat and fptoui.sat for saturating
widths smaller than legal types by using the fact that the legal type
will saturate under aarch64, and saturating the result further using
min/max.
Differential Revision: https://reviews.llvm.org/D111236
Louis Dionne [Fri, 15 Oct 2021 04:21:26 +0000 (00:21 -0400)]
[libc++] Use apple-install-libcxx.sh in the Apple/system CI job
That script is what we (need to) use to build libc++ for the system
configuration, so that's what we should test against. At some point
we may be able to fold all of that logic into the CMake build, and
when that happens the CI can go back to running CMake directly.
As a fly-by fix, stop mentioning x86_64 in the names of the Apple
jobs since they are not truly tied to any architecture.
Differential Revision: https://reviews.llvm.org/D111865
John Brawn [Wed, 13 Oct 2021 12:59:42 +0000 (13:59 +0100)]
[ARM] Fix MOVCC peephole to not use an incorrect register class
The MOVCC peephole eliminates a MOVCC by making one of its inputs a
conditional instruction, but when doing this it should be using both
inputs of the MOVCC to decide on the register class to use as
otherwise we can get an error when using -verify-machineinstrs.
Differential Revision: https://reviews.llvm.org/D111714
djtodoro [Mon, 13 Sep 2021 08:15:45 +0000 (10:15 +0200)]
[JSON] Handle uint64_t type
There was no handling of uint64_t in the LLVM JSON library.
This patch adds support for that. The motivation is
the https://reviews.llvm.org/D109217.
Differential Revision: https://reviews.llvm.org/D109347
Pavel Labath [Fri, 15 Oct 2021 09:03:18 +0000 (11:03 +0200)]
[lldb] Fix an include in HostTest.cpp
The previous include was too broad, and its better if the host tests do
not depend on non-host libraries.
Roland Fischer [Fri, 15 Oct 2021 08:56:20 +0000 (09:56 +0100)]
[git-clang-format] Add --diffstat parameter
[git-clang-format][PR46815] Add diffstat functionality
Adding a --diffstat parameter to git-clang-format that essentially uses git diff --stat, i.e. lists the files needing
formatting. This is useful for CI integration or manual usage where one wants to list the files not properly formatted.
I use it for the Suricata project's github action (CI) integration that verifies proper formatting of a pull request
according to project guidelines where it's very helpful to say which files are not properly formatted. I find the list
of files much more useful than e.g. showing the diff in this case using git-clang-format --diff.
An alternative would be to take an additional parameter to diff, e.g. git-clang-format --diff --stat
The goal is not to provide the whole git diff --stat=... parameter functionality, just plain git diff --stat.
Reviewed By: MyDeveloperDay, JakeMerdichAMD
Differential Revision: https://reviews.llvm.org/D84375
mydeveloperday [Fri, 15 Oct 2021 08:46:35 +0000 (09:46 +0100)]
[clang-format] [PR42014,PR52021] don't let clang-format assert/crash when file being formatted is read-only/locked
This is a bug which gets reported from time to time and we've had multiple attempts to fix it, but don't want to fix it by adding frontEnd to the mix.
This patch aim to find a trivial, but not that sophisticated way of emitting the error without the additional impact of adding libFrontEnd to clang-format.
See {D90121} for analysis of why we don't want those previous attempts
Reviewed By: HazardyKnusperkeks
Differential Revision: https://reviews.llvm.org/D111815
guopeilin [Fri, 15 Oct 2021 07:32:41 +0000 (15:32 +0800)]
[AArch64ISelLowering] Avoid duplane in some cases when sve enabled
Reviewed By: david-arm, sdesmalen
Differential Revision: https://reviews.llvm.org/D110524
Dan Liew [Fri, 15 Oct 2021 07:19:56 +0000 (00:19 -0700)]
Fix another test not using the standard separator for sanitizer options.
rdar://
83637067
Jim Lin [Fri, 15 Oct 2021 06:54:47 +0000 (14:54 +0800)]
[RISCV] Add invalid match case for uimm2, uimm3 and uimm7
Reviewed By: craig.topper, jrtc27
Differential Revision: https://reviews.llvm.org/D110308
Andrew Young [Tue, 12 Oct 2021 20:29:29 +0000 (13:29 -0700)]
[MLIR] Add `KeywordOrString` handling to AsmParser
This adds a new parser and printer for text which may be a keyword or a
string. When printing, it will attempt to print the text as a keyword,
but if it has any special or non-printable characters, it will be
printed as an escaped string. When parsing, it will parse either a
valid keyword or a potentially escaped string. The printer allows for an
empty string, in which case it prints `""`.
This new function is used for printing the name in NamedAttributes, and
for printing the symbol name after the `@`. In CIRCT we are using this
to print module port names, which are conceptually similar to named
function arguments.
Reviewed By: rriddle
Differential Revision: https://reviews.llvm.org/D111683
Jason Molenda [Fri, 15 Oct 2021 06:55:37 +0000 (23:55 -0700)]
Use Module's FileSpec for limiting binaries to set dyld breakpoint in
When DynamicLoaderMacOS::SetNotificationBreakpoint sets the breakpoint
for new binaries being loaded/unloaded, it limits the scope of that
breakpoint to just dyld, so we don't re-evaluate the breakpoint for
every new binary loaded. I wrote this to get the module's ObjectFile
FileSpec in an earlier change, but this is not correct. If lldb
is debugging a remote system, and it had to read dyld out of memory
from the remote system, it will have no FileSpec on the lldb debugger
host. We need to grab the Module's FileSpec, which in this case is
actually falling back to the PlatformFileSpec, the binary path on the
target system.
rdar://
84199646
Shao-Ce SUN [Fri, 15 Oct 2021 06:51:49 +0000 (14:51 +0800)]
[NFC] fix a typo
Ben Shi [Fri, 15 Oct 2021 06:44:28 +0000 (06:44 +0000)]
[RISCV] Optimize immediate materialisation with SH*ADD
Use SH1ADD/SH2ADD/SH3ADD along with LUI+ADDI to compose int32*3,
int32*5 and int32*9.
Reviewed By: craig.topper, luismarques
Differential Revision: https://reviews.llvm.org/D111484
Kazu Hirata [Fri, 15 Oct 2021 05:44:08 +0000 (22:44 -0700)]
[llvm] Use llvm::is_contained (NFC)
Max Kazantsev [Fri, 15 Oct 2021 04:01:28 +0000 (11:01 +0700)]
[SCEV] Prove implication of predicates to their sign-flipped counterparts
This patch teaches SCEV two implication rules:
x <u y && y >=s 0 --> x <s y,
x <s y && y <s 0 --> x <u y.
And all equivalents with signs/parts swapped.
Differential Revision: https://reviews.llvm.org/D110517
Reviewed By: nikic