Nikolas Klauser [Wed, 13 Jul 2022 16:07:26 +0000 (18:07 +0200)]
[libc++] Implement ranges::find_end, ranges::search{, _n}
Reviewed By: var-const, #libc, huixie90
Spies: thakis, h-vetinari, huixie90, libcxx-commits, mgorny
Differential Revision: https://reviews.llvm.org/
D124079
Steve Scalpone [Wed, 13 Jul 2022 18:21:01 +0000 (11:21 -0700)]
[flang] Document the Intrinsic Types
Describe the built-in integer, real, complex and logical
types implemented in flang, capturing the as-implemented
characteristics.
Differential Revision: https://reviews.llvm.org/
D129658
Florian Hahn [Wed, 13 Jul 2022 18:13:21 +0000 (11:13 -0700)]
[GlobalOpt] Add more tests with large number of stores to globals.
Add a few more test cases for
D129525.
Peicong Wu [Wed, 29 Jun 2022 18:42:14 +0000 (11:42 -0700)]
[trace][intel pt] Measure the time it takes to decode a thread in per-cpu mode
This metric was missing. We were only measuring in per-thread mode, and
this completes the work.
For a sample trace I have, the `dump info` command shows
```
Timing for this thread:
Decoding instructions: 0.12s
```
I also improved a bit the TaskTime function so that callers don't need to
specify the template argument
Differential Revision: https://reviews.llvm.org/
D129249
Philip Reames [Tue, 12 Jul 2022 20:47:07 +0000 (13:47 -0700)]
[RISCV] Exploit fact that vscale is always power of two to replace urem sequence
When doing scalable vectorization, the loop vectorizer uses a urem in the computation of the vector trip count. The RHS of that urem is a (possibly shifted) call to @llvm.vscale.
vscale is effectively the number of "blocks" in the vector register. (That is, types such as <vscale x 8 x i8> and <vscale x 1 x i8> both fill one 64 bit block, and vscale is essentially how many of those blocks there are in a single vector register at runtime.)
We know from the RISCV V extension specification that VLEN must be a power of two between ELEN and 2^16. Since our block size is 64 bits, the must be a power of two numbers of blocks. (For everything other than VLEN<=32, but that's already broken.)
It is worth noting that AArch64 SVE specification explicitly allows non-power-of-two sizes for the vector registers and thus can't claim that vscale is a power of two by this logic.
Differential Revision: https://reviews.llvm.org/
D129609
rnofenko [Tue, 12 Jul 2022 17:05:14 +0000 (10:05 -0700)]
[trace][intel pt] Add a nice parser for the trace size
Thanks to rnofenko@fb.com for coming up with these changes.
This diff adds support for passing units in the trace size inputs. For example,
it's now possible to specify 64KB as the trace size, instead of the
problematic 65536. This makes the user experience a bit friendlier.
Differential Revision: https://reviews.llvm.org/
D129613
V Donaldson [Tue, 12 Jul 2022 16:27:40 +0000 (09:27 -0700)]
[flang] Intrinsic module file update
Use symbolic iostat values in iso_fortran_env.f90.
Add generic names to the interfaces in __fortran_ieee_exceptions.f90.
Fangrui Song [Wed, 13 Jul 2022 17:14:25 +0000 (10:14 -0700)]
[docs][llvm-objcopy] Fix unpaired `<align>``
Fangrui Song [Wed, 13 Jul 2022 17:04:21 +0000 (10:04 -0700)]
[llvm-objcopy][ELF] Add --set-section-type
The request is mentioned on
D129053. I feel that having this functionality is
mildly useful (not strong).
* Rename .ctors to .init_array and change sh_type to SHT_INIT_ARRAY (GNU objcopy
detects the special name but we don't).
* Craft tests for a new SHT_LLVM_* extension
Reviewed By: jhenderson
Differential Revision: https://reviews.llvm.org/
D129337
Alex Brachet [Wed, 13 Jul 2022 16:53:39 +0000 (16:53 +0000)]
[libc][NFC] Make explicit casts for gcc
Alex Brachet [Wed, 13 Jul 2022 16:52:13 +0000 (16:52 +0000)]
[libc] Add explicit casts for gcc
Simon Pilgrim [Wed, 13 Jul 2022 16:35:38 +0000 (17:35 +0100)]
[DAG] SimplifyDemandedVectorElts - adjust demanded elements for selection mask for known zero results
If an element is known zero from both selections then it shouldn't matter what the selection mask element is.
Joseph Huber [Wed, 13 Jul 2022 16:31:29 +0000 (12:31 -0400)]
[LinkerWrapper] Fix linker-wrapper not working with host-LTO
Benoit Jacob [Mon, 4 Jul 2022 20:25:24 +0000 (20:25 +0000)]
lowerParallel is also called on unit-size, one-sided reduction dims
See: https://gist.github.com/bjacob/
d8be8ec7e70ed0be4b3a5794ced2a7e8
Differential Revision: https://reviews.llvm.org/
D129096
Jonas Devlieghere [Wed, 13 Jul 2022 16:11:45 +0000 (09:11 -0700)]
Revert "[clang] Implement ElaboratedType sugaring for types written bare"
This reverts commit
bdc6974f92304f4ed542241b9b89ba58ba6b20aa because it
breaks all the LLDB tests that import the std module.
import-std-module/array.TestArrayFromStdModule.py
import-std-module/deque-basic.TestDequeFromStdModule.py
import-std-module/deque-dbg-info-content.TestDbgInfoContentDequeFromStdModule.py
import-std-module/forward_list.TestForwardListFromStdModule.py
import-std-module/forward_list-dbg-info-content.TestDbgInfoContentForwardListFromStdModule.py
import-std-module/list.TestListFromStdModule.py
import-std-module/list-dbg-info-content.TestDbgInfoContentListFromStdModule.py
import-std-module/queue.TestQueueFromStdModule.py
import-std-module/stack.TestStackFromStdModule.py
import-std-module/vector.TestVectorFromStdModule.py
import-std-module/vector-bool.TestVectorBoolFromStdModule.py
import-std-module/vector-dbg-info-content.TestDbgInfoContentVectorFromStdModule.py
import-std-module/vector-of-vectors.TestVectorOfVectorsFromStdModule.py
https://green.lab.llvm.org/green/view/LLDB/job/lldb-cmake/45301/
Fraser Cormack [Wed, 13 Jul 2022 10:10:41 +0000 (11:10 +0100)]
[llvm-reduce] Fix crash when reducing integer vectors to 1
Integer vectors were previously ignored when reducing operands. When
6b8bd0f72 introduced support for reducing floating-point
scalars/vectors, the vector case was written to only handle
floating-point values. It would crash when creating an invalid
ConstantFP from the integer element type.
Instead of reinstating the old integer vector behaviour, we might as
well reduce integer vectors to all-one splats.
A couple of existing tests has also been renamed from "remove" to
"reduce" to better reflect the deltas they test.
Reviewed By: arsenm
Differential Revision: https://reviews.llvm.org/
D129629
Jacques Pienaar [Wed, 13 Jul 2022 16:05:04 +0000 (09:05 -0700)]
[mlir] Plumb through default attribute populate for extensible dialect.
Mitch Phillips [Wed, 13 Jul 2022 15:39:35 +0000 (08:39 -0700)]
Update sanitize_* IR documentation.
sanitize_none was never actually committed, and should be removed.
no_sanitize_memtag is to be removed in
D128950.
sanitize_memtag is new in
D128950.
Also update the comments on other no_sanitize_* to indicate that they're
impacted by the sanitizer ignorelist and the global-disable attribute.
Reviewed By: eugenis
Differential Revision: https://reviews.llvm.org/
D129410
Mitch Phillips [Wed, 13 Jul 2022 15:39:31 +0000 (08:39 -0700)]
Add missing sanitizer metadata plumbing from CFE.
clang misses attaching sanitizer metadata for external globals.
Reviewed By: eugenis
Differential Revision: https://reviews.llvm.org/
D129492
Mitch Phillips [Wed, 13 Jul 2022 15:39:26 +0000 (08:39 -0700)]
Remove 'no_sanitize_memtag'. Add 'sanitize_memtag'.
For MTE globals, we should have clang emit the attribute for all GV's
that it creates, and then use that in the upcoming AArch64 global
tagging IR pass. We need a positive attribute for this sanitizer (rather
than implicit sanitization of all globals) because it needs to interact
with other parts of LLVM, including:
1. Suppressing certain global optimisations (like merging),
2. Emitting extra directives by the ASM writer, and
3. Putting extra information in the symbol table entries.
While this does technically make the LLVM IR / bitcode format
non-backwards-compatible, nobody should have used this attribute yet,
because it's a no-op.
Reviewed By: eugenis
Differential Revision: https://reviews.llvm.org/
D128950
Alex Brachet [Wed, 13 Jul 2022 15:42:47 +0000 (15:42 +0000)]
[libc] Reset rounding mode after fsetround tests
Differential Revision: https://reviews.llvm.org/
D129619
Kai Nacke [Wed, 13 Jul 2022 14:08:44 +0000 (10:08 -0400)]
[SystemZ] Enable `-mtune=` option in clang.
https://reviews.llvm.org/
D128910 enabled handling of
attribute "tune-cpu" in LLVM. This PR now enables
option `-mtune` in clang, which then generates the
new attribute.
Reviewed By: uweigand
Differential Revision: https://reviews.llvm.org/
D129562
Mark de Wever [Sat, 9 Jul 2022 14:14:40 +0000 (16:14 +0200)]
[libc++][format] Improves parsing speed.
A format string like "{}" is quite common. In this case avoid parsing
the format-spec when it's not present. Before the parsing was always
called, therefore some refactoring is done to make sure the formatters
work properly when their parse member isn't called.
From the wording it's not entirely clear whether this optimization is
allowed
[tab:formatter]
```
and the range [pc.begin(), pc.end()) from the last call to f.parse(pc).
```
Implies there's always a call to `f.parse` even when the format-spec
isn't present. Therefore this optimization isn't done for handle
classes; it's unclear whether that would break user defined formatters.
The improvements give a small reduciton is code size:
719408 12472 488 732368 b2cd0 before
718824 12472 488 731784 b2a88 after
The performance benefits when not using a format-spec are:
```
Comparing ./formatter_int.libcxx.out-baseline to ./formatter_int.libcxx.out
Benchmark Time CPU Time Old Time New CPU Old CPU New
----------------------------------------------------------------------------------------------------------------------------------------------------
BM_Basic<uint32_t> -0.0688 -0.0687 67 62 67 62
BM_Basic<int32_t> -0.1105 -0.1107 73 65 73 65
BM_Basic<uint64_t> -0.1053 -0.1049 95 85 95 85
BM_Basic<int64_t> -0.0889 -0.0888 93 85 93 85
BM_BasicLow<__uint128_t> -0.0655 -0.0655 96 90 96 90
BM_BasicLow<__int128_t> -0.0693 -0.0694 97 90 97 90
BM_Basic<__uint128_t> -0.0359 -0.0359 256 247 256 247
BM_Basic<__int128_t> -0.0414 -0.0414 239 229 239 229
```
For the cases where a format-spec is used the results remain similar,
some are faster some are slower, differing per run.
Reviewed By: ldionne, #libc
Differential Revision: https://reviews.llvm.org/
D129426
Philip Reames [Wed, 13 Jul 2022 00:22:55 +0000 (17:22 -0700)]
[DAGCombine] fold (urem x, (lshr pow2, y)) -> (and x, (add (lshr pow2, y), -1))
We have the same fold in InstCombine - though implemented via OrZero flag on isKnownToBePowerOfTwo. The reasoning here is that either a) the result of the lshr is a power-of-two, or b) we have a div-by-zero triggering UB which we can ignore.
Differential Revision: https://reviews.llvm.org/
D129606
Dylan Fleming [Wed, 13 Jul 2022 14:20:59 +0000 (14:20 +0000)]
[Flang] Fix path strings in CreateFIRLangRef.py
In
D129186, CreateFIRLangRef.py was created to help fix
formatting problems with FIRLangRef.md.
However, due to an error while rebasing, the last edit was lost,
as such the current path variables are Unix-style.
This patch addresses what was discussed in the previous patch and
now uses os.path.join instead.
Differential Revision: https://reviews.llvm.org/
D129644
Martin Sebor [Wed, 13 Jul 2022 15:18:00 +0000 (09:18 -0600)]
[InstCombine] Enable strtol folding with nonnull endptr
Reviewed By: nikic
Differential Revision: https://reviews.llvm.org/
D129593
Mark de Wever [Sun, 26 Jun 2022 08:58:02 +0000 (10:58 +0200)]
[libc++][chrono] Adds operator<=> for day.
Since the calendar classes were introduced in C++20 there's no need to
keep the old comparison operators.
This commit does the day calender class, the other calendar classes will
be in a followup commit.
Implements parts of:
- P1614R2 The mothership has landed
Reviewed By: #libc, ldionne
Differential Revision: https://reviews.llvm.org/
D128603
Sam McCall [Tue, 12 Jul 2022 21:08:17 +0000 (23:08 +0200)]
[clangd] Enable designator inlay hints by default.
Differential Revision: https://reviews.llvm.org/
D129595
Nikita Popov [Wed, 13 Jul 2022 14:22:40 +0000 (16:22 +0200)]
[SCCP] Fix typo in previous commit
Ooops, I tested a build from the wrong checkout.
Nikita Popov [Wed, 13 Jul 2022 14:20:34 +0000 (16:20 +0200)]
[SCCP] Avoid ConstantExpr::get() call
Use ConstantFoldUnaryOpOperand() API instead. This is in
preparation for removing fneg constant expressions.
Nikita Popov [Wed, 13 Jul 2022 13:35:13 +0000 (15:35 +0200)]
[TargetFolder] Use DL-aware folding for icmp
The Fold() call was accidentally dropped in
138fcc5f7619b5f066b9529a41ed47695149c8df, though it doesn't seem
to make a difference in practice (no test changes).
Nikita Popov [Wed, 13 Jul 2022 12:51:04 +0000 (14:51 +0200)]
[IRBuilder] Migrate fneg to fold infrastructure
Make use of a single FoldUnOpFMF() API, though in practice FNeg
is the only unary operation that exists.
This is likely NFC in practice, because users of InstSimplifyFolder
don't create fneg.
serge-sans-paille [Wed, 13 Jul 2022 12:53:04 +0000 (14:53 +0200)]
[clang] Ignore DependentSizeArray in -Warray-parameter
Acknowledge we don't know how to handle those yet.
Simon Pilgrim [Wed, 13 Jul 2022 12:52:07 +0000 (13:52 +0100)]
[AArch64] Regenerate arm64-vshuffle.ll test checks
Not quite ready to use the update script, but can clean it up slightly so the diffs aren't so great.
Simon Pilgrim [Wed, 13 Jul 2022 12:50:30 +0000 (13:50 +0100)]
[AArch64] Regenerate arm64-vselect.ll test checks
The ushll -> sshll FIXME had been fixed long ago, but nobody noticed because the test wasn't checking for either.....
Simon Pilgrim [Wed, 13 Jul 2022 12:48:46 +0000 (13:48 +0100)]
[ARM] Regenerate select_xform.ll test checks
Antonio Frighetto [Wed, 13 Jul 2022 12:36:04 +0000 (08:36 -0400)]
[Fixed Point] Fix C++20 compilation error
Due to how operator== changed after operator<=> landing in C++20
(error: use of overloaded operator '==' is ambiguous (with operand
types 'const llvm::APSInt' and 'const unsigned long')),
CheckIntPartMin/CheckIntPartMax interfaces are now leveraging
APSInt::compareValues.
Differential Revision: https://reviews.llvm.org/
D129567
David Green [Wed, 13 Jul 2022 12:28:11 +0000 (13:28 +0100)]
Revert "Move instruction predicate verification to emitInstruction"
This reverts commit
e2fb8c0f4b940e0285ee36c112469fa75d4b60ff as it does
not build for Release builds, and some buildbots are giving more warning
than I saw locally. Reverting to fix those issues.
Max Kazantsev [Wed, 13 Jul 2022 12:03:03 +0000 (19:03 +0700)]
[IndVars][NFC] Make IVOperand parameter an instruction
Jun Zhang [Wed, 13 Jul 2022 10:00:06 +0000 (18:00 +0800)]
[CodeGen] Keep track of decls that were deferred and have been emitted.
This patch adds a new field called EmittedDeferredDecls in CodeGenModule
that keeps track of decls that were deferred and have been emitted.
The intention of this patch is to solve issues in the incremental c++,
we'll lose info of decls that are lazily emitted when we undo their
usage.
See example below:
clang-repl> inline int foo() { return 42;}
clang-repl> int bar = foo();
clang-repl> %undo
clang-repl> int baz = foo();
JIT session error: Symbols not found: [ _Z3foov ]
error: Failed to materialize symbols: { (main, { baz, $.incr_module_2.inits.0,
orc_init_func.incr_module_2 }) }
Signed-off-by: Jun Zhang <jun@junz.org>
Differential Revision: https://reviews.llvm.org/
D128782
Wei Yi Tee [Tue, 12 Jul 2022 18:38:52 +0000 (18:38 +0000)]
[clang][dataflow] Generate readable form of input and output of satisfiability checking.
Differential Revision: https://reviews.llvm.org/
D129548
Max Kazantsev [Wed, 13 Jul 2022 11:53:29 +0000 (18:53 +0700)]
[SCEV][NFC] Make getStrengthenedNoWrapFlagsFromBinOp return optional
David Green [Wed, 13 Jul 2022 11:53:32 +0000 (12:53 +0100)]
Move instruction predicate verification to emitInstruction
D25618 added a method to verify the instruction predicates for an
emitted instruction, through verifyInstructionPredicates added into
<Target>MCCodeEmitter::encodeInstruction. This is a very useful idea,
but the implementation inside MCCodeEmitter made it only fire for object
files, not assembly which most of the llvm test suite uses.
This patch moves the code into the <Target>_MC::verifyInstructionPredicates
method, inside the InstrInfo. The allows it to be called from other
places, such as in this patch where it is called from the
<Target>AsmPrinter::emitInstruction methods which should trigger for
both assembly and object files. It can also be called from other places
such as verifyInstruction, but that is not done here (it tends to catch
errors earlier, but in reality just shows all the mir tests that have
incorrect feature predicates). The interface was also simplified
slightly, moving computeAvailableFeatures into the function so that it
does not need to be called externally.
The ARM, AMDGPU (but not R600), AVR, Mips and X86 backends all currently
show errors in the test-suite, so have been disabled with FIXME
comments.
Differential Revision: https://reviews.llvm.org/
D129506
Vladislav Khmelevsky [Wed, 6 Jul 2022 21:01:33 +0000 (00:01 +0300)]
[BOLT][AArch64] Handle gold linker veneers
The gold linker veneers are written between functions without symbols,
so we to handle it specially in BOLT.
Vladislav Khmelevsky,
Advanced Software Technology Lab, Huawei
Differential Revision: https://reviews.llvm.org/
D129260
Muhammad Omair Javaid [Wed, 13 Jul 2022 11:44:19 +0000 (16:44 +0500)]
[LLDB] Fix TestConvenienceVariables.test AArch64/Windows
This patch fixes TestConvenienceVariables.test for AArch64 Windows.
Clang/LLD was unable to find printf apparently available as a macro
definition in stdio.h.
Nikolas Klauser [Wed, 13 Jul 2022 11:41:25 +0000 (13:41 +0200)]
Revert "[libc++] Implement ranges::find_end, ranges::search{, _n}"
This reverts commit
76a76518507ccc59ccdad5b83f44dc8c3d9593c7.
Wei Yi Tee [Tue, 12 Jul 2022 18:38:36 +0000 (18:38 +0000)]
[clang][dataflow] Rename `Status` field in a `Solver::Result` struct to `SATCheckStatus`.
Previously, `Status` was named after the enum type `Status` which caused the enum to be hidden by the non-type declaration of the `Status` field. This patch fixes this issue by using different names for the field and type.
Differential Revision: https://reviews.llvm.org/
D129568
Muhammad Omair Javaid [Wed, 13 Jul 2022 11:28:25 +0000 (16:28 +0500)]
[LLDB] Fix TestThreadAPI.py for AArch64/Windows
This patch fixes TestThreadAPI for AArch64 windows by switching over to
PDB debug info instead of DWARF. This is needed to step over library
functions like printf as there is debug info mismatch between DWARF and
PDB. PDB DWARF interworking is not fully supported by LLDB at the
moment.
Nicolas Vasilache [Wed, 13 Jul 2022 10:14:58 +0000 (03:14 -0700)]
[mlir][Linalg] Retire TestLinalgCodegenStrategy pass.
This pass tests patterns that are already tested elsewhere by applying them in a semi-targeted
fashion using anchor function and op names.
From now on, targeted tests should use the transform dialect interpreter.
Differential Revision: https://reviews.llvm.org/
D129627
Muhammad Omair Javaid [Wed, 13 Jul 2022 11:15:11 +0000 (16:15 +0500)]
[LLDB] XFail TestLoadUnload.test_static_init_during_load AArch64/Windows
This patch fixes marks TestLoadUnload.test_static_init_during_load as
xfail for AArch64 windows. It is failing similar to Linux and already
marked xfail for linux.
Nikolas Klauser [Tue, 12 Jul 2022 19:28:40 +0000 (21:28 +0200)]
[libc++] Implement ranges::find_end, ranges::search{, _n}
Reviewed By: var-const, #libc, huixie90
Spies: h-vetinari, huixie90, libcxx-commits, mgorny
Differential Revision: https://reviews.llvm.org/
D124079
Max Kazantsev [Wed, 13 Jul 2022 11:01:09 +0000 (18:01 +0700)]
[Test] Add test showing that we can make a check loop-invariant
Muhammad Omair Javaid [Wed, 13 Jul 2022 10:52:33 +0000 (15:52 +0500)]
[LLDB] Fix pointers.test for AArch64/Windows
pointers.test started failing again for AArch64 windows after
D125509
This patch fixes the test to make it pass on AArch64 windows again.
LLDB AArch64 Windows buildbot running at:
https://lab.llvm.org/staging/#/builders/207
David Green [Wed, 13 Jul 2022 10:42:21 +0000 (11:42 +0100)]
[ARM] Fix subtarget features for Thumb2 tests. NFC
These mir tests were using instructions that require feature predicates
that were not enabled.
LLVM GN Syncbot [Wed, 13 Jul 2022 10:35:56 +0000 (10:35 +0000)]
[gn build] Port
c9666d2339e5
Wei Yi Tee [Tue, 12 Jul 2022 18:36:26 +0000 (18:36 +0000)]
[clang][dataflow] Generate readable form of boolean values.
Differential Revision: https://reviews.llvm.org/
D129547
Wei Yi Tee [Tue, 12 Jul 2022 18:35:34 +0000 (18:35 +0000)]
[clang][dataflow] Refactor boolean creation as a test utility.
Differential Revision: https://reviews.llvm.org/
D129546
Daniel Bertalan [Sat, 9 Jul 2022 10:17:29 +0000 (12:17 +0200)]
[lld-macho] Add LOH_ARM64_ADRP_LDR_GOT_LDR optimization hint support
This hint instructs the linker to relax a GOT-indirect load.
If the referenced symbol is external and its GOT entry is within +/- 1
MiB, the GOT entry can be loaded with a single literal ldr instruction.
If the referenced symbol is local, its address may be loaded directly if
it's close enough, or with an adr(p) + ldr pair if it's not.
This type accounts for more than half of all LOHs in chromium_framework.
This commit moves the eligibility checks into helper functions to
improve the readability of the LOH processing code. Ho functional
changes are intended to the previously implemented LOH types.
Differential Revision: https://reviews.llvm.org/
D129427
Wei Yi Tee [Tue, 12 Jul 2022 18:47:18 +0000 (18:47 +0000)]
[clang][dataflow] Refactor boolean creation as a test utility.
Differential Revision: https://reviews.llvm.org/
D129546
Peter Waller [Mon, 11 Jul 2022 10:56:15 +0000 (10:56 +0000)]
[InstCombine][SVE] Bail out of isSafeToLoadUnconditionally for scalable types
`isSafeToLoadUnconditionally` currently assumes sized types. Bail out for now.
This fixes a TypeSize warning reachable from instcombine via (load (select
cond, ptr, ptr)).
Differential Revision: https://reviews.llvm.org/
D129477
Max Kazantsev [Wed, 13 Jul 2022 10:02:02 +0000 (17:02 +0700)]
[Test] Fix bailout blocks
Simon Pilgrim [Wed, 13 Jul 2022 10:01:26 +0000 (11:01 +0100)]
[PowerPC] Regenerate pr35402.ll test checks
Martin Storsjö [Wed, 13 Jul 2022 09:53:31 +0000 (12:53 +0300)]
[lldb] Fix build with GCC 9 after "[ADT] Use Empty Base Optimization for Allocators"
This fixes this compilation error, after
a565509308f9372c4de1c4c32afde461a42e81c8:
In file included from ../tools/lldb/include/lldb/Host/Host.h:14,
from ../tools/lldb/source/Host/common/File.cpp:28:
../tools/lldb/include/lldb/Utility/Environment.h: In copy constructor ‘lldb_private::Environment::Environment(const lldb_private::Environment&)’:
../tools/lldb/include/lldb/Utility/Environment.h:60:49: error: call of overloaded ‘StringMap(const lldb_private::Environment&)’ is ambiguous
60 | Environment(const Environment &RHS) : Base(RHS) {}
| ^
In file included from ../include/llvm/Support/YAMLTraits.h:16,
from ../tools/lldb/include/lldb/Utility/ConstString.h:15,
from ../tools/lldb/include/lldb/Utility/FileSpec.h:15,
from ../tools/lldb/include/lldb/Host/FileSystem.h:14,
from ../tools/lldb/source/Host/common/File.cpp:27:
../include/llvm/ADT/StringMap.h:137:3: note: candidate: ‘llvm::StringMap<ValueTy, AllocatorTy>::StringMap(const llvm::StringMap<ValueTy, AllocatorTy>&) [with ValueTy = std::__cxx11::basic_string<char>; AllocatorTy = llvm::MallocAllocator]’
137 | StringMap(const StringMap &RHS)
| ^~~~~~~~~
../include/llvm/ADT/StringMap.h:122:12: note: candidate: ‘llvm::StringMap<ValueTy, AllocatorTy>::StringMap(AllocatorTy) [with ValueTy = std::__cxx11::basic_string<char>; AllocatorTy = llvm::MallocAllocator]’
122 | explicit StringMap(AllocatorTy A)
| ^~~~~~~~~
Simon Pilgrim [Wed, 13 Jul 2022 09:49:56 +0000 (10:49 +0100)]
[X86] Regenerate fp_constant_op.ll test checks
Graham Hunter [Tue, 12 Jul 2022 14:13:46 +0000 (15:13 +0100)]
[LAA] Precommit some extra tests for forked pointers
* Converted tests to use opaque pointers
* Added suggested test for inbounds GEP
* Added a test for forks on both the base and offset terms of a GEP
* Added a test for a select of a select
* Added a test for a GEP with >2 operands
* Added a test for vector GEPs
Kazu Hirata [Wed, 13 Jul 2022 08:58:03 +0000 (01:58 -0700)]
Use has_value instead of hasValue (NFC)
Cullen Rhodes [Fri, 8 Jul 2022 15:18:27 +0000 (15:18 +0000)]
[AArch64][SVE] Prefer SIMD&FP variant of clast[ab]
The scalar variant with GPR source/dest has considerably higher latency
than the SIMD&FP scalar variant across a variety of micro-architectures:
Core Scalar SIMD&FP
--------------------------------
Neoverse V1 9 cyc 3 cyc
Neoverse N2 8 cyc 3 cyc
Cortex A510 8 cyc 4 cyc
A64FX 29 cyc 6 cyc
Kazu Hirata [Wed, 13 Jul 2022 08:52:53 +0000 (01:52 -0700)]
[AsmParser] Fix a warning
This patch fixes:
llvm/lib/AsmParser/LLParser.cpp:466:34: error: moving a temporary
object prevents copy elision [-Werror,-Wpessimizing-move]
David Sherwood [Mon, 11 Jul 2022 14:31:37 +0000 (15:31 +0100)]
[LoopVectorize] Ensure the VPReductionRecipe is placed after all it's inputs
When vectorising ordered reductions we call a function
LoopVectorizationPlanner::adjustRecipesForReductions to replace the
existing VPWidenRecipe for the fadd instruction with a new
VPReductionRecipe. We attempt to insert the new recipe in the same
place, but this is wrong because createBlockInMask may have
generated new recipes that VPReductionRecipe now depends upon. I
have changed the insertion code to append the recipe to the
VPBasicBlock instead.
Added a new RUN with tail-folding enabled to the existing test:
Transforms/LoopVectorize/AArch64/scalable-strict-fadd.ll
Differential Revision: https://reviews.llvm.org/
D129550
Nikita Popov [Thu, 7 Jul 2022 15:04:37 +0000 (17:04 +0200)]
[IndVars] Simplify instructions after replacing header phi with preheader value
After replacing a loop phi with the preheader value, it's usually
possible to simplify some of the using instructions, so do that as
part of replaceLoopPHINodesWithPreheaderValues().
Doing this as part of IndVars is valuable, because it may make GEPs
in the loop have constant offsets and allow the following SROA run
to succeed (as demonstrated in the PhaseOrdering test).
Differential Revision: https://reviews.llvm.org/
D129293
Nikita Popov [Wed, 13 Jul 2022 08:15:51 +0000 (10:15 +0200)]
[AsmParser] Report invalid data layout more gracefully
Report this as a normal LLParser error, rather than a fatal error.
Corentin Jabot [Fri, 17 Jun 2022 14:23:41 +0000 (16:23 +0200)]
[Clang] Add a warning on invalid UTF-8 in comments.
Introduce an off-by default `-Winvalid-utf8` warning
that detects invalid UTF-8 code units sequences in comments.
Invalid UTF-8 in other places is already diagnosed,
as that cannot appear in identifiers and other grammar constructs.
The warning is off by default as its likely to be somewhat disruptive
otherwise.
This warning allows clang to conform to the yet-to be approved WG21
"P2295R5 Support for UTF-8 as a portable source file encoding"
paper.
Reviewed By: aaron.ballman, #clang-language-wg
Differential Revision: https://reviews.llvm.org/
D128059
Nikita Popov [Wed, 13 Jul 2022 08:04:06 +0000 (10:04 +0200)]
[AsmParser] Use toString() (NFC)
Fraser Cormack [Wed, 13 Jul 2022 05:41:27 +0000 (06:41 +0100)]
[RISCV] Add early-exit to RVV stack computation. NFCI.
This patch was split off from
D126465, where an early-exit is necessary
as it checks the VLEN and that asserts that V instructions are present.
Since this makes logical sense on its own, I think it's worth landing
regardless of
D126465.
Reviewed By: kito-cheng
Differential Revision: https://reviews.llvm.org/
D129617
Kazu Hirata [Wed, 13 Jul 2022 07:57:02 +0000 (00:57 -0700)]
[mlir] Use has_value instead of hasValue (NFC)
Nikita Popov [Wed, 6 Jul 2022 15:08:05 +0000 (17:08 +0200)]
[IndVars] Call replaceLoopPHINodesWithPreheaderValues() for already constant exits
Currently we only call replaceLoopPHINodesWithPreheaderValues() if
optimizeLoopExits() replaces the exit with an unconditional exit.
However, it is very common that this already happens as part of
eliminateIVComparison(), in which case we're leaving behind the
dead header phi.
Tweak the early bailout for already-constant exits to also call
replaceLoopPHINodesWithPreheaderValues().
Differential Revision: https://reviews.llvm.org/
D129214
esmeyi [Wed, 13 Jul 2022 07:39:08 +0000 (03:39 -0400)]
[AIX] follow-up of
D124654.
Report an error when alias symbols are not emitted all.
Fangrui Song [Wed, 13 Jul 2022 07:28:29 +0000 (00:28 -0700)]
[ELF][RISCV] Use unshifted value for overflow check
The unshifted value indicates an displacement in bytes which is more meaningful.
gonglingqin [Wed, 13 Jul 2022 07:14:09 +0000 (15:14 +0800)]
[LoongArch] Add codegen support for atomic fence, atomic load and atomic store
Differential Revision: https://reviews.llvm.org/
D128901
gonglingqin [Wed, 13 Jul 2022 07:11:23 +0000 (15:11 +0800)]
[LoongArch] Add codegen support for converting between unsigned integer and floating-point
Differential Revision: https://reviews.llvm.org/
D128900
gonglingqin [Wed, 13 Jul 2022 07:03:12 +0000 (15:03 +0800)]
[LoongArch] Add codegen support for fpround, fpextend and converting between signed integer and floating-point
Differential Revision: https://reviews.llvm.org/
D128899
Chenbing Zheng [Wed, 13 Jul 2022 07:18:48 +0000 (15:18 +0800)]
[InstCombine] add tests for xor_of_icmps. nfc
Fangrui Song [Wed, 13 Jul 2022 07:17:17 +0000 (00:17 -0700)]
[ELF] Fix displacement computation for intra-section branch after
D127611
D127611 computed st_value is inaccurate:
* For a backward branch, the destination address may be wrong if there is no
relaxable relocation between it and the current location due to `if (remove)`.
We may incorrectly relax a branch to c.j which ends up an overflow.
* For a forward branch, the destination address may be overestimated
and lose relaxation opportunities.
To fix the issues,
* Don't reset st_value to the original value.
* Save the st_value delta from the previous iteration into valueDelta, and use
`sa[0].d->value -= delta - valueDelta.find(sa[0].d)->second`.
Adrian Kuegel [Wed, 13 Jul 2022 06:52:38 +0000 (08:52 +0200)]
[mlir] Allow empty lists for DenseArrayAttr.
Differential Revision: https://reviews.llvm.org/
D129552
Siva Chandra Reddy [Wed, 13 Jul 2022 07:07:56 +0000 (07:07 +0000)]
[libc][NFC] Move thread platform data pointer to thread attributes.
Along the way, added constexpr constructors to the Thread data
structures.
jacquesguan [Tue, 12 Jul 2022 07:57:28 +0000 (15:57 +0800)]
[RISCV][test] Add test of binop followed by extractelement.
Reviewed By: reames
Differential Revision: https://reviews.llvm.org/
D129544
Monk Chiang [Thu, 30 Jun 2022 06:17:57 +0000 (23:17 -0700)]
[RISCV] Add scheduling resources for vector segment instructions.
Add scheduling resources for vector segment instructions
Reviewed By: craig.topper
Differential Revision: https://reviews.llvm.org/
D128886
Kazu Hirata [Wed, 13 Jul 2022 05:47:41 +0000 (22:47 -0700)]
[clang, clang-tools-extra] Use has_value instead of hasValue (NFC)
Kazu Hirata [Wed, 13 Jul 2022 05:25:42 +0000 (22:25 -0700)]
[llvm] Use has_value instead of hasValue (NFC)
Fangrui Song [Wed, 13 Jul 2022 04:08:52 +0000 (21:08 -0700)]
[ELF][test] Remove unneeded --mcpu=future from llvm-objdump commands
Fangrui Song [Wed, 13 Jul 2022 04:07:45 +0000 (21:07 -0700)]
[ELF][test] Remove unneeded --mcpu=pwr10 from llvm-objdump commands
llvm-objdump has defaulted to decode all known instructions for PPC64.
Anlun Xu [Wed, 6 Jul 2022 23:03:33 +0000 (16:03 -0700)]
[mlir][sparse]Replace redundant indices checks in sparse_tensor.conversion
Replace some redundant indices checks with the correct checks
Reviewed By: aartbik
Differential Revision: https://reviews.llvm.org/
D129101
Jonas Devlieghere [Tue, 12 Jul 2022 21:18:19 +0000 (14:18 -0700)]
Re-land "[dsymutil] Account for DW_OP_convert being CU relative"
Currently, dsymutil treats the DW_OP_convert operand as absolute instead
of CU relative, as described by in the DWARFv5 spec, 2.5.1.6:
"[DW_OP_convert] takes one operand, which is an unsigned LEB128 integer
that represents the offset of a debugging information entry in the current
compilation unit"
This patch makes dsymutil correctly treat the offset as CU relative,
preventing a crash when there are multiple compilation units.
Big thanks to Akira Hatanaka for figuring out this issue and providing
both a reduced test case and a proposed fix.
Jorge Gorbe Moya [Wed, 13 Jul 2022 01:13:17 +0000 (18:13 -0700)]
[bazel] add missing gmock dependency to //clang/unittests:format_tests
Konstantin Varlamov [Wed, 13 Jul 2022 00:52:14 +0000 (17:52 -0700)]
[lib++][ranges][NFC] Refactor `iterator_operations.h` to use tags.
Change the mechanism in `iterator_operations.h` to pass around a generic
policy tag indicating whether an internal function is being invoked from
a "classic" STL algorithm or a ranges algorithm. `IterOps` is now
a template class specialized on the policy tag.
The advantage is that this mechanism is more generic and allows defining
arbitrary conditions in a clean manner.
Also add a few more iterator functions to `IterOps`.
Differential Revision: https://reviews.llvm.org/
D129390
Jorge Gorbe Moya [Wed, 13 Jul 2022 00:40:41 +0000 (17:40 -0700)]
[NFCI] Fix unused variable warning with asserts off in clang/lib/Sema/TypeLocBuilder.cpp
Matheus Izvekov [Mon, 11 Oct 2021 16:15:36 +0000 (18:15 +0200)]
[clang] Implement ElaboratedType sugaring for types written bare
Without this patch, clang will not wrap in an ElaboratedType node types written
without a keyword and nested name qualifier, which goes against the intent that
we should produce an AST which retains enough details to recover how things are
written.
The lack of this sugar is incompatible with the intent of the type printer
default policy, which is to print types as written, but to fall back and print
them fully qualified when they are desugared.
An ElaboratedTypeLoc without keyword / NNS uses no storage by itself, but still
requires pointer alignment due to pre-existing bug in the TypeLoc buffer
handling.
Signed-off-by: Matheus Izvekov <mizvekov@gmail.com>
Differential Revision: https://reviews.llvm.org/
D112374
Jorge Gorbe Moya [Tue, 12 Jul 2022 23:46:07 +0000 (16:46 -0700)]
[NFCI] Fix unused variable/function warnings in MacroCallReconstructorTest.cpp when asserts are disabled.
Joseph Huber [Tue, 12 Jul 2022 23:40:54 +0000 (19:40 -0400)]
[LinkerWrapper] Tweak save-temps output name
Summary:
A previous patch added the Task to the output filename when doing
`save-temps` the majority of cases there is only a single task so we
only add the task explicitly to differentiate it from the first one.
Nico Weber [Tue, 12 Jul 2022 23:36:21 +0000 (19:36 -0400)]
Revert "[dsymutil] Account for DW_OP_convert being CU relative"
This reverts commit
7f3000fa8b321f7fae169a615734de74a737b5d4.
Breaks tests on Windows, see commits on https://reviews.llvm.org/rG7f3000fa