Kazu Hirata [Sat, 11 Jun 2022 18:15:52 +0000 (11:15 -0700)]
Use isa instead of dyn_cast (NFC)
Dave Lee [Thu, 9 Jun 2022 15:37:02 +0000 (08:37 -0700)]
[lldb][bindings] Implement __repr__ instead of __str__
When using the `script` Python repl, SB objects are printed in a way that gives
the user no information. The simplest example is:
```
(lldb) script lldb.debugger
<lldb.SBDebugger; proxy of <Swig Object of type 'lldb::SBDebugger *' at 0x1097a5de0> >
```
This output comes from the Python repl printing the `repr()` of an object.
None of the SB classes implement `__repr__`, and all print like the above.
However, many (most?, all?) SB classes implement `__str__`. Because they
implement `__str__`, a more detailed output can be had by `print`ing the
object, for example:
```
(lldb) script print(lldb.debugger)
Debugger (instance: "debugger_1", id: 1)
```
For convenience, this change switches all SB classes that implement to
`__str__` to instead implement `__repr__`. **The result is that `str()` and
`repr()` will produce the same output**. This is because `str` calls `__repr__`
for classes that have no `__str__` method.
The benefit being that when writing a `script` invocation, you don't need to
remember to wrap in `print()`. If that isn't enough motivation, consider the
case where your Python expression results in a list of SB objects, in that case
you'd have to `map` or use a list comprehension like `[str(x) for x in <expr>]`
in order to see the details of the objects in the list.
For reference, the docs for `repr` say:
> repr(object)
> Return a string containing a printable representation of an object. For
> many types, this function makes an attempt to return a string that would
> yield an object with the same value when passed to eval(); otherwise, the
> representation is a string enclosed in angle brackets that contains the
> name of the type of the object together with additional information often
> including the name and address of the object. A class can control what this
> function returns for its instances by defining a __repr__() method.
and the docs for `__repr__` say:
> object.__repr__(self)
> Called by the repr() built-in function to compute the “official” string
> representation of an object. If at all possible, this should look like a
> valid Python expression that could be used to recreate an object with the
> same value (given an appropriate environment). If this is not possible, a
> string of the form <...some useful description...> should be returned. The
> return value must be a string object. If a class defines __repr__() but not
> __str__(), then __repr__() is also used when an “informal” string
> representation of instances of that class is required.
>
> This is typically used for debugging, so it is important that the
> representation is information-rich and unambiguous.
Even if it were convenient to construct Python expressions for SB classes so
that they could be `eval`'d, however for typical lldb usage, I can't think of a
motivating reason to do so. As it stands, the only action the docs say to do,
that this change doesn't do, is wrap the `repr` string in `<>` angle brackets.
An alternative implementation is to change lldb's python repl to apply `str()`
to the top level result. While this would work well in the case of a single SB
object, it doesn't work for a list of SB objects, since `str([x])` uses `repr`
to convert each list element to a string.
Differential Revision: https://reviews.llvm.org/D127458
Chia-hung Duan [Sat, 11 Jun 2022 15:56:21 +0000 (15:56 +0000)]
[mlir:MultiOpDriver] Add operands to worklist should be checked
Operand's defining op may not be valid for adding to the worklist under
stict mode
Reviewed By: rriddle
Differential Revision: https://reviews.llvm.org/D127180
Craig Topper [Sat, 11 Jun 2022 15:28:41 +0000 (08:28 -0700)]
[X86] Add __extension__ to f16c macro intrinsics to suppress warnings about compound literals
This had previously been fixed, but was lost 4 years ago when __extension__
was removed from many intrinsic macros.
Refixes PR32491.
ksyx [Sat, 11 Jun 2022 14:59:51 +0000 (10:59 -0400)]
[Clang][Doc][SafeStack] Fix deadlink (NFC)
Simon Pilgrim [Sat, 11 Jun 2022 14:29:18 +0000 (15:29 +0100)]
[DAG] visitINSERT_VECTOR_ELT - fold insert_vector_elt(scalar_to_vector(x),v,i) -> build_vector()
Allow scalar_to_vector nodes to be used for the start of a build_vector creation
Nikolas Klauser [Sat, 11 Jun 2022 14:20:47 +0000 (16:20 +0200)]
[libc++][NFC] Update ranges algorithms status page
Simon Pilgrim [Sat, 11 Jun 2022 14:12:45 +0000 (15:12 +0100)]
[PowerPC] Regenerate pre-inc-disable.ll checks
Simon Pilgrim [Sat, 11 Jun 2022 13:30:27 +0000 (14:30 +0100)]
[X86] Replace X32 check prefix with X86
We try to use X32 only for gnux32 triple cases
Mark de Wever [Sat, 2 Oct 2021 10:38:46 +0000 (12:38 +0200)]
[libc++][format] Implement format-string.
Implements the compile-time checking of the formatting arguments.
Completes:
- P2216 std::format improvements
Reviewed By: #libc, ldionne
Differential Revision: https://reviews.llvm.org/D121530
David Green [Sat, 11 Jun 2022 13:16:37 +0000 (14:16 +0100)]
[AArch64] Generate FADDP from shuffled fadd
As a follow up to D126686, this does the same fold for floating point
add and shuffle. In this case it is limited to reassoc either x[0]+x[1]
or x[1]+x[0] for both result[0] and results[1].
Differential Revision: https://reviews.llvm.org/D127087
David Green [Sat, 11 Jun 2022 11:57:48 +0000 (12:57 +0100)]
[AArch64] Add extra faddp codegen tests. NFC
Simon Pilgrim [Sat, 11 Jun 2022 11:01:13 +0000 (12:01 +0100)]
[DAG] visitINSERT_VECTOR_ELT - refactor BUILD_VECTOR insertion to remove early-out. NFCI.
Remove the early-out cases so we can more easily add additional folds in the future.
Paul Walker [Mon, 6 Jun 2022 03:07:52 +0000 (04:07 +0100)]
[SelectionDAG] Remove invalid TypeSize conversion from WidenVecOp_BITCAST.
Differential Revision: https://reviews.llvm.org/D127322
Simon Pilgrim [Sat, 11 Jun 2022 08:28:38 +0000 (09:28 +0100)]
[clang][docs] Fix typo in code-block declaration
Simon Pilgrim [Thu, 9 Jun 2022 21:18:23 +0000 (22:18 +0100)]
[X86] combineTargetShuffle - break if-else chain. NFC.
(style) Both cases always continue.
Simon Pilgrim [Thu, 9 Jun 2022 21:15:08 +0000 (22:15 +0100)]
[X86] emitOrXorXorTree - break if-else chain. NFC.
(style) Both cases always return.
owenca [Fri, 10 Jun 2022 20:01:27 +0000 (13:01 -0700)]
[clang-format] Fix a bug in RemoveBracesLLVM
Remove the braces of an else block only if the r_brace of the block
is followed by an if.
Differential Revision: https://reviews.llvm.org/D127532
Sheng [Sat, 11 Jun 2022 07:59:05 +0000 (15:59 +0800)]
[NFC][clang] Fix typo
Change 'otuer' to 'outer'.
Mohammed Keyvanzadeh [Mon, 9 May 2022 01:02:26 +0000 (05:32 +0430)]
[github] format and refactor GitHub workflows
Format and refactor the GitHub workflow for consistency.
Differential Revision: https://reviews.llvm.org/D125197
Kazu Hirata [Sat, 11 Jun 2022 06:09:01 +0000 (23:09 -0700)]
[Scalar] Use llvm::append_range (NFC)
Kazu Hirata [Sat, 11 Jun 2022 05:59:48 +0000 (22:59 -0700)]
[CodeGen] Use llvm::erase_value (NFC)
Kazu Hirata [Sat, 11 Jun 2022 05:51:30 +0000 (22:51 -0700)]
[ProfileData] Use llvm::erase_if (NFC)
Fangrui Song [Sat, 11 Jun 2022 05:50:55 +0000 (22:50 -0700)]
[MC] De-capitalize SwitchSection. NFC
Add SwitchSection to return switchSection. The API will be removed soon.
Kazu Hirata [Sat, 11 Jun 2022 05:45:26 +0000 (22:45 -0700)]
[clang] Construct SmallVector with iterator ranges (NFC)
Kazu Hirata [Sat, 11 Jun 2022 05:39:45 +0000 (22:39 -0700)]
[clang] Convert for_each to range-based for loops (NFC)
Siva Chandra Reddy [Sat, 4 Jun 2022 14:33:49 +0000 (14:33 +0000)]
[libc] Add pthread_detach and thrd_detach.
Tests for pthread_detach and thrd_detach have not been added. Instead, a
test for the underlying implementation has been added as it makes use of
an internal wait method to synchronize with detached threads.
Reviewed By: lntue, michaelrj
Differential Revision: https://reviews.llvm.org/D127479
Kai Luo [Sat, 11 Jun 2022 04:10:21 +0000 (12:10 +0800)]
[PowerPC] Add tests to reflect cfence on float point types. NFC.
Fangrui Song [Sat, 11 Jun 2022 03:40:34 +0000 (20:40 -0700)]
[SanitizerCoverage][test] Remove br i1 undef to avoid UB
Fangrui Song [Sat, 11 Jun 2022 03:36:22 +0000 (20:36 -0700)]
[GlobalOpt][test] Remove br i1 undef
PeixinQiao [Sat, 11 Jun 2022 02:46:42 +0000 (10:46 +0800)]
[NFC] Move flang OpenMP semantic tests under one single directory
To be consistent with OpenACC and will find the tests in one single
directory for OpenMP.
Reviewed By: kiranchandramohan
Differential Revision: https://reviews.llvm.org/D127529
Fangrui Song [Sat, 11 Jun 2022 02:13:59 +0000 (19:13 -0700)]
[TableGen] const char *const x => const char x[]
Vitaly Buka [Sat, 11 Jun 2022 01:20:55 +0000 (18:20 -0700)]
[Bitcode] Don't use UINT_MAX for missing SanitizerMetadata
Looks like comment on D126100 was unnoticed.
Tue Ly [Sun, 8 May 2022 22:27:34 +0000 (18:27 -0400)]
[libc] Implement double precision FMA for targets without FMA instructions.
Implement double precision FMA (Fused Multiply-Add) for targets without
FMA instructions using __uint128_t to store the intermediate results.
Reviewed By: michaelrj, sivachandra
Differential Revision: https://reviews.llvm.org/D124495
Arjun P [Fri, 10 Jun 2022 01:53:46 +0000 (21:53 -0400)]
[MLIR][Presburger] PresburgerSet::containsPoint: support disjuncts with locals
Reviewed By: Groverkss
Differential Revision: https://reviews.llvm.org/D127466
Maksim Panchenko [Fri, 10 Jun 2022 21:10:58 +0000 (14:10 -0700)]
[BOLT][TEST] Use double dash flags in tests
Replace a single dash with a double dash for options that have more
than a single letter.
llvm-bolt-wrapper.py has special treatment for output options such as
"-o" and "-w" causing issues when a single dash is used, e.g. for
"-write-dwp". The wrapper can be fixed as well, but using a double dash
has other advantages as well.
Reviewed By: rafauler
Differential Revision: https://reviews.llvm.org/D127538
Michael Jones [Fri, 10 Jun 2022 23:09:18 +0000 (16:09 -0700)]
[libc] add EXP_MAT_MASK to x87 long double
A previous patch added the constant EXP_MANT_MASK to the FloatProperties
for other types of long double. This patch adds it to the special 80-bit
x87 long double.
Reviewed By: lntue
Differential Revision: https://reviews.llvm.org/D127550
Mircea Trofin [Fri, 10 Jun 2022 02:17:21 +0000 (19:17 -0700)]
[mlgo] Update FunctionPropertyCache after invalidating analyses
The update depends on LoopInfo, so we need that refreshed first, not
after.
Differential Revision: https://reviews.llvm.org/D127467
Huan Nguyen [Fri, 10 Jun 2022 22:48:13 +0000 (15:48 -0700)]
[BOLT] Mark fragments related to split jump table as non-simple
Mark fragments related to split jump table as non-simple.
A function could be splitted into hot and cold fragments. A split jump table is
challenging for correctly reconstructing control flow graphs, so it was marked
as ignored. This update marks those fragments as non-simple, allowing them
to be printed and partial control flow graph construction.
Test Plan:
```
llvm-lit -a tools/bolt/test/X86/split-func-icf.s
```
This test has two functions (main, main2), each has a jump table target to the
same cold portion main2.cold.1(*2). We try to print out only this cold portion.
If it is ignored, it cannot be printed. If it is non-simple, it can be printed. We
verify that it can be printed.
Reviewed By: Amir
Differential Revision: https://reviews.llvm.org/D127464
Lei Zhang [Fri, 10 Jun 2022 22:08:50 +0000 (18:08 -0400)]
[mlir][vulkan] Add missing '<>' in test IRs to fix test
Lei Zhang [Fri, 10 Jun 2022 22:01:31 +0000 (18:01 -0400)]
[mlir][spirv] Unify aliases of different bitwidth scalar types
This commit extends the UnifyAliasedResourcePass to handle scalar
types of different bitwidths. It requires to get the smaller bitwidth
resource as the canonical resource so that we can avoid subcomponent
load/store. Instead we load/store multiple smaller bitwidth ones.
Reviewed By: hanchung
Differential Revision: https://reviews.llvm.org/D127266
Anders Waldenborg [Fri, 3 Jun 2022 08:28:22 +0000 (10:28 +0200)]
[scan-build-py] Fix exception on shutdown with sarif-html output format
When running scan-build-py's analyze-build script with output format set
to sarif & html it wants to print a message on how to look at the
defects mentioning the directory name twice.
But the path argument was only given once to the logging function,
causing "TypeError: not enough arguments for format string" exception.
Differential Revision: https://reviews.llvm.org/D126974
Nikolas Klauser [Fri, 10 Jun 2022 11:38:11 +0000 (13:38 +0200)]
[libc++] Use the same implementation of invoke for C++03 and C++11
Reviewed By: ldionne, #libc
Spies: libcxx-commits
Differential Revision: https://reviews.llvm.org/D127489
Mitch Phillips [Fri, 10 Jun 2022 20:56:29 +0000 (13:56 -0700)]
Revert "[Attributor] Ensure to use the proper liveness AA"
This reverts commit
a3273c0c06003b9e5f53a856844fee42a17e6b7b.
Reason: Broke the ASan buildbots with a memory leak. See
https://reviews.llvm.org/rG94841c713fdd2bce3276015d1e946d414bb74ee8 for
more information.
Nuno Lopes [Fri, 10 Jun 2022 20:54:09 +0000 (21:54 +0100)]
[InstCombine] switch synthetic unreachable to use undef instead of poison (NFC)
Med Ismail Bennani [Wed, 8 Jun 2022 23:21:24 +0000 (16:21 -0700)]
[lldb/crashlog] Show help when the command is called without any argument
This patch changes the `crashlog` command behavior to print the help
message if no argument was provided with the command.
rdar://
94576026
Differential Revision: https://reviews.llvm.org/D127362
Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
agostini01 [Fri, 10 Jun 2022 20:42:16 +0000 (20:42 +0000)]
[mlir][py-bindings] Fix include issue introduced by D127352
Using:
-DMLIR_ENABLE_BINDINGS_PYTHON=ON
Resulted in a failed build due to changes implemented by
https://reviews.llvm.org/D127352
This updates the include line
Reviewed By: Mogball
Differential Revision: https://reviews.llvm.org/D127523
Nikolas Klauser [Fri, 10 Jun 2022 17:53:10 +0000 (19:53 +0200)]
[libc++] Granularize <iterator> includes
Reviewed By: ldionne, #libc
Spies: libcxx-commits, wenlei
Differential Revision: https://reviews.llvm.org/D127445
Nikolas Klauser [Fri, 10 Jun 2022 09:38:04 +0000 (11:38 +0200)]
[libc++] Simplify type_traits and use more builtins
Reviewed By: ldionne, #libc
Spies: libcxx-commits
Differential Revision: https://reviews.llvm.org/D127226
Eli Friedman [Fri, 10 Jun 2022 20:37:49 +0000 (13:37 -0700)]
Fix interaction of CFI instructions with MachineOutliner.
1. When checking if a candidate contains a CFI instruction, actually
iterate over all of the instructions, instead of stopping halfway
through.
2. Make sure copied CFI directives refer to the correct instruction.
Fixes https://github.com/llvm/llvm-project/issues/55842
Differential Revision: https://reviews.llvm.org/D126930
Argyrios Kyrtzidis [Tue, 7 Jun 2022 20:35:17 +0000 (13:35 -0700)]
[Lex] Fix `fixits` for typo-corrections of preprocessing directives within skipped blocks
The `EndLoc` parameter was always unset so no fixit was emitted. But it is also unnecessary for determining the range so we can remove it.
Differential Revision: https://reviews.llvm.org/D127251
Philip Reames [Fri, 10 Jun 2022 20:21:52 +0000 (13:21 -0700)]
[RISCV] Refine costs for i1 reductions
Our actual lowering for i1 reductions uses ctpop combined with possibly a vector negate and possibly a logic op afterwards. I believe ctpop to be low cost on all reasonable hardware.
The default costing implementation here was returning quite inconsistent costs. and/or were returning very high costs (because we seem to think moving into scalar registers is very expensive?) and others were returning lower but still too high (because of the assumed tree reduce strategy). While we should probably improve the generic costing strategy for i1 vectors, let's start by fixing the immediate problem.
Differential Revision: https://reviews.llvm.org/D127511
Philip Reames [Fri, 10 Jun 2022 20:15:11 +0000 (13:15 -0700)]
[RISCV] Implement isElementTypeLegalForScalableVector TTI hook
This brings us into alignment with AArch64, and in the process fixes a compiler crash bug in uniform store handling in the vectorizer.
Before the recent invalid cost bailout work, this would have also avoided crashes on invalid costs in some cases. I honestly think the vectorizer should gracefully bailout on uniform stores it can't use a scatter for, but it doesn't, so lets take the path of least resistance here. It's also possible that there are other vectorizer bugs AArch64 isn't seeing because of this hook; we don't want to be finding them either.
Differential Revision: https://reviews.llvm.org/D127514
Paul Robinson [Fri, 10 Jun 2022 20:02:17 +0000 (13:02 -0700)]
[PS4/PS5] Don't inherit base class alignment
Philip Reames [Fri, 10 Jun 2022 20:13:43 +0000 (13:13 -0700)]
[RISCV] Minor test improvements for scalable scatter/gather tests added in
275b2e524
Tue Ly [Fri, 10 Jun 2022 20:00:13 +0000 (16:00 -0400)]
[libc][Obvious] Change all __builtin_clz* calls to clz in builtin_wrappers.h.
Craig Topper [Fri, 10 Jun 2022 19:51:01 +0000 (12:51 -0700)]
[RISCV] Don't require loop simplify form in RISCVGatherScatterLowering.
We need a preheader and a single latch, but we don't need a dedicated
exit.
Reviewed By: reames
Differential Revision: https://reviews.llvm.org/D127513
Craig Topper [Fri, 10 Jun 2022 19:50:52 +0000 (12:50 -0700)]
[RISCV] Add test case showing failure to convert gather/scatter to strided load/store. NFC
Our optimization pass checks for loop simplify form, before doing
the transform. The loops here aren't in loop simplify form because
the exit block has two predecessors.
Reviewed By: reames
Differential Revision: https://reviews.llvm.org/D127451
Philip Reames [Fri, 10 Jun 2022 19:45:54 +0000 (12:45 -0700)]
[RISCV] Add cost model coverage for scalable scatter/gather
Mitch Phillips [Fri, 10 Jun 2022 19:45:26 +0000 (12:45 -0700)]
Add documentation of new sanitizer-specific GV attributes.
Reviewed By: vitalybuka
Differential Revision: https://reviews.llvm.org/D126922
Mitch Phillips [Fri, 10 Jun 2022 19:24:36 +0000 (12:24 -0700)]
Add sanitizer-specific GlobalValue attributes.
Plan is the migrate the global variable metadata for sanitizers, that's
currently carried around generally in the 'llvm.asan.globals' section,
onto the global variable itself.
This patch adds the attribute and plumbs it through the LLVM IR and
bitcode formats, but is a no-op other than that so far.
Reviewed By: vitalybuka, kstoimenov
Differential Revision: https://reviews.llvm.org/D126100
John Ericson [Fri, 10 Jun 2022 19:26:12 +0000 (19:26 +0000)]
Revert "[cmake] Don't export `LLVM_TOOLS_INSTALL_DIR` anymore"
This reverts commit
d5daa5c5b091cafb9b7ffd19b5dfa2daadef3229.
Dávid Bolvanský [Fri, 10 Jun 2022 19:17:52 +0000 (21:17 +0200)]
[Clang] Added missing doc for minsize attribute
Fixes https://github.com/llvm/llvm-project/issues/53226
Louis Dionne [Fri, 10 Jun 2022 19:14:57 +0000 (15:14 -0400)]
[libc++] Make sure we install the modulemap file with install-cxx-headers
Sam Estep [Fri, 10 Jun 2022 19:08:41 +0000 (19:08 +0000)]
[clang][dataflow] Don't `assert` full LHS coverage in `optional` model
Followup to D127434.
Reviewed By: ymandel, sgatev
Differential Revision: https://reviews.llvm.org/D127502
Sunho Kim [Fri, 10 Jun 2022 18:34:49 +0000 (03:34 +0900)]
[JITLink][ELF][AArch64] Implement eh frame handling.
Implements eh frame handling by using generic EHFrame passes. The c++ exception handling works correctly with this change.
Reviewed By: lhames
Differential Revision: https://reviews.llvm.org/D127063
Philip Reames [Fri, 10 Jun 2022 19:01:16 +0000 (12:01 -0700)]
[RISCV] Add cost model coverage for mask reductions requiring legalization
Krzysztof Drewniak [Thu, 2 Jun 2022 20:19:41 +0000 (20:19 +0000)]
[mlir][AMDGPU] Set ABI version constant when linking device libs
Currently, linking the device libraries requires setting a constant
that indicates the code object ABI version the compilation is
targeting.
This fixes the MLIR linking process by setting this constant to 400,
which is the value corresponding to the current code object ABI
default, version 4.
Reviewed By: Mogball
Differential Revision: https://reviews.llvm.org/D126913
Shraiysh Vaishay [Fri, 10 Jun 2022 17:37:18 +0000 (23:07 +0530)]
[OpenMP][IRBuilder] Add final clause to task
This patch adds final clause to OpenMP IR Builder.
Reviewed By: Meinersbur
Differential Revision: https://reviews.llvm.org/D126626
Nikolas Klauser [Fri, 10 Jun 2022 10:42:46 +0000 (12:42 +0200)]
[libc++] Remove uses of __two in type_traits
Reviewed By: ldionne, #libc
Spies: libcxx-commits
Differential Revision: https://reviews.llvm.org/D127483
Mariusz Borsa [Fri, 10 Jun 2022 16:40:17 +0000 (09:40 -0700)]
Revert "[Sanitizers] Cleanup handling of stat64/statfs64"
This reverts commit
6d890a0fb8b1962cf7b58e9e16ff4545f1f2b84f.
Jay Foad [Tue, 5 Apr 2022 12:38:57 +0000 (13:38 +0100)]
Update *_TMPRING_SIZE.WAVESIZE for GFX11
The encoding of COMPUTE_TMPRING_SIZE.WAVESIZE and
SPI_TMPRING_SIZE.WAVESIZE has changed in GFX11: it is now in units
of 64 dwords instead of 256 dwords, and the field has been widened
from 13 bits to 15 bits.
Depends on D126989
Reviewed By: rampitec, arsenm, #amdgpu
Differential Revision: https://reviews.llvm.org/D127248
Thomas Raoux [Mon, 6 Jun 2022 20:56:50 +0000 (20:56 +0000)]
[mlir][vector] Add patterns for vector distribution
Add pattern to hoist scalar code outside of warp distribute region as
those cannot be distributed and we would want to execute them on all
the lanes.
Add patterns to distribute transfer_write ops. Those operations can be
distributed in different ways and it is control by user.
Differential Revision: https://reviews.llvm.org/D127152
Kai Nacke [Thu, 9 Jun 2022 16:54:40 +0000 (12:54 -0400)]
[SystemZ/z/OS] Set DWARF version to 4 for z/OS.
The DWARF version was raised to 5 for all platforms which do not opt
out. Default to DWARF version to 4 for z/OS again.
Reviewed By: abhina.sreeskantharajan, uweigand
Differential Revision: https://reviews.llvm.org/D127498
Joe Nash [Mon, 6 Jun 2022 18:05:52 +0000 (14:05 -0400)]
[AMDGPU] gfx11 add bits to COMPUTE_PGM_RSRC3
Contributors:
Konstantin Zhuravlyov <kzhuravl_dev@outlook.com>
Patch 21/N for upstreaming of AMDGPU gfx11 architecture
Depends on D127143
Reviewed By: rampitec, #amdgpu, kzhuravl
Differential Revision: https://reviews.llvm.org/D127241
Shivam Gupta [Fri, 10 Jun 2022 05:29:50 +0000 (10:59 +0530)]
[NFC] Suggest Release mode in clang GettingStarted.html
This fix https://github.com/llvm/llvm-project/issues/23841.
Lots of beginners are not of aware of this option do suggesting it here
would be helpful.
Christopher Di Bella [Wed, 1 Jun 2022 22:12:38 +0000 (22:12 +0000)]
[clang][tablegen] adds human documentation to `WarningOption`
Building on D126796, this commit adds the infrastructure for being able
to print out descriptions of what each warning does.
Differential Revision: https://reviews.llvm.org/D126832
Joe Nash [Thu, 9 Jun 2022 14:32:27 +0000 (10:32 -0400)]
[AMDGPU] NFC. Comment change to GFX10+ in AsmParser
Joe Nash [Mon, 6 Jun 2022 19:33:15 +0000 (15:33 -0400)]
[AMDGPU] gfx11 SRC_POPS_EXISTING_WAVE_ID is removed
Michael Jones [Wed, 1 Jun 2022 21:42:57 +0000 (14:42 -0700)]
[libc] add buffering to FILE writes
Previously all FILE objects were fully buffered, this patch adds line
buffering and unbuffered output, as well as applying them to stdout and
stderr.
Reviewed By: sivachandra
Differential Revision: https://reviews.llvm.org/D126829
Benjamin Kramer [Fri, 10 Jun 2022 16:47:40 +0000 (18:47 +0200)]
[libc][math] Add EXP_MANT_MASK when long double is double or quad
Sanjay Patel [Fri, 10 Jun 2022 14:44:13 +0000 (10:44 -0400)]
[InstCombine] add narrowing transform for low-masked binop with zext operand (2nd try)
The 1st try (
afa192cfb6049a15c55 ) was reverted because it could
cause an infinite loop with constant expressions.
A test for that and an extra condition to enable the transform
are added now. I also added code comments to better describe
the transform and the existing, related transform.
Original commit message:
https://alive2.llvm.org/ce/z/hRy3rE
As shown in D123408, we can produce this pattern when moving
casts around, and we already have a related fold for a binop
with a constant operand.
Sanjay Patel [Fri, 10 Jun 2022 14:36:41 +0000 (10:36 -0400)]
[InstCombine] add test for mask op with constant expression; NFC
This is reduced from the post-commit C example in:
afa192cfb6049a15
That was reverted with:
6fedc6a2b41e458f
This will infinite loop unless that transform or the ones
with casts that can "EvaluateInDifferentType" are limited
to ignore constant expressions.
Yusra Syeda [Fri, 10 Jun 2022 14:52:05 +0000 (10:52 -0400)]
[SystemZ][z/OS] Add llvm.read_register() intrinsic support for zOS
Differential Revision: https://reviews.llvm.org/D127412
Shao-Ce SUN [Fri, 10 Jun 2022 16:11:13 +0000 (00:11 +0800)]
[RISCV] move `isFaultFirstLoad` into `RISCVInstrInfo`
Fix build errors in D126794
```
ld.lld: error: undefined symbol: llvm::MachineInstr::getNumExplicitDefs() const
>>> referenced by RISCVBaseInfo.cpp
>>> RISCVBaseInfo.cpp.o:(llvm::isFaultFirstLoad(llvm::MachineInstr const&)) in archive lib/libLLVMRISCVDesc.a
ld.lld: error: undefined symbol: llvm::MachineInstr::findRegisterDefOperandIdx(llvm::Register, bool, bool, llvm::TargetRegisterInfo const*) const
>>> referenced by RISCVBaseInfo.cpp
>>> RISCVBaseInfo.cpp.o:(llvm::isFaultFirstLoad(llvm::MachineInstr const&)) in archive lib/libLLVMRISCVDesc.a
clang-15: error: linker command failed with exit code 1 (use -v to see invocation)
```
Reviewed By: fakepaper56, craig.topper
Differential Revision: https://reviews.llvm.org/D127477
Jay Foad [Fri, 10 Jun 2022 16:05:29 +0000 (17:05 +0100)]
[AMDGPU] Restore documentation of .amdhsa_shared_vgpr_count
This was accidentally lost in D127402.
Shao-Ce SUN [Fri, 10 Jun 2022 16:02:45 +0000 (00:02 +0800)]
Revert "[RISCV] move `isFaultFirstLoad` into `RISCVInstrInfo`"
This reverts commit
e018e493c1ac514504bbaa1d1396aec025142a31.
There are some problems with this commit,
related revision: https://reviews.llvm.org/D127477
Philip Reames [Fri, 10 Jun 2022 15:57:27 +0000 (08:57 -0700)]
[RISCV] Fix accidental deletion of test lines in 2247e4d
Apparently, update_analyze_test_checks.sh does *not* warn on conflicting CHECKs, it just silently drops those lines from the generated test. That is.. less than helpful.
Paul Robinson [Thu, 9 Jun 2022 18:17:16 +0000 (11:17 -0700)]
[PS5] Use linker scripting to find profiling data, like PS4
Craig Topper [Fri, 10 Jun 2022 15:36:31 +0000 (08:36 -0700)]
[RISCV] Mark FSIN and other math functions as Expand for scalable vectors.
This prevents them from being assumed legal by the cost model.
This matches what is done for AArch64 SVE.
Reviewed By: reames
Differential Revision: https://reviews.llvm.org/D123799
Philip Reames [Fri, 10 Jun 2022 15:27:12 +0000 (08:27 -0700)]
[RISCV] Use common prefixes to reduce duplication in cost model tests
Nikita Popov [Fri, 10 Jun 2022 15:31:10 +0000 (17:31 +0200)]
[DCE] Update tests to use opaque pointers (NFC)
Andrzej Warzynski [Fri, 10 Jun 2022 15:26:13 +0000 (15:26 +0000)]
[flang][lowering] Ignore compiler directives
This patch simply replaces a `TODO` with a warning.
This is part of the upstreaming effort from the `fir-dev` branch in [1].
[1] https://github.com/flang-compiler/f18-llvm-project
Co-authored-by: Eric Schweitz <eschweitz@nvidia.com>
Reviewed By: kiranchandramohan
Differential Revision: https://reviews.llvm.org/D127415
Guillaume Chatelet [Fri, 10 Jun 2022 15:20:07 +0000 (15:20 +0000)]
[NFC][Alignment] Simplify code
Adrian Prantl [Fri, 10 Jun 2022 15:16:30 +0000 (08:16 -0700)]
[LLDB][Docs] Fix formatting of example code-block
Tested by building the docs-lldb-html target and
confirming the code-block renders properly with
the fix.
Patch by Michael Buch!
Differential Revision: https://reviews.llvm.org/D127437
Nikita Popov [Fri, 10 Jun 2022 15:07:27 +0000 (17:07 +0200)]
[InstSimplify] Convert tests to opaque pointers (NFC)
The only interesting test change is in @PR31262, where the following
fold is now performed, while it previously was not:
https://alive2.llvm.org/ce/z/a5Qmr6
llvm/test/Transforms/InstSimplify/ConstProp/gep.ll has not been
updated, because there is a tradeoff between folding and inrange
preservation there that we may want to discuss.
Updates have been performed using:
https://gist.github.com/nikic/
98357b71fd67756b0f064c9517b62a34
Guillaume Chatelet [Fri, 10 Jun 2022 15:13:25 +0000 (15:13 +0000)]
[NFC] Remove deadcode
Philip Reames [Fri, 10 Jun 2022 15:07:55 +0000 (08:07 -0700)]
[RISCV] Broaden cost model coverage for fixed vectors w/i1 element type
Simon Pilgrim [Fri, 10 Jun 2022 14:49:49 +0000 (15:49 +0100)]
[DAG] SimplifyDemandedVectorElts - adding SimplifyMultipleUseDemandedVectorElts handling to ISD::CONCAT_VECTORS
Attempt to look through multiple use operands of ISD::CONCAT_VECTORS nodes
Another minor improvement for D127115
Nikita Popov [Fri, 10 Jun 2022 14:56:13 +0000 (16:56 +0200)]
[InstSimplify] Name variables/labels in test (NFC)
Run the test through -instnamer. Also drop irrelevant uwtable
attribute.