Commit Graph

427648 Commits

Author SHA1 Message Date
Jonas Paulsson 4065ea8c0b [SystemZ] Remove stray enum value in SystemZInstrInfo.h (NFC).
Review: Ulrich Weigand
2022-06-20 14:52:06 +02:00
Nabeel Omer cd8870e850 [SLP] Add a test for llvm.powi.*
This patch introduces a test for the issue discovered in #53887.

Differential Revision: https://reviews.llvm.org/D128178
2022-06-20 12:41:37 +00:00
Joachim Priesner 541a50e207
[clang-tidy] bugprone-argument-comment: Ignore calls to user-defined literals
Without this change, code such as "f(/*param=*/1_op)" will check the
comment twice, once for the parameter of f (correct) and once for
the parameter of operator""_op (likely incorrect). The change removes
only the second check.

Reviewed By: njames93, LegalizeAdulthood

Differential Revision: https://reviews.llvm.org/D125885
2022-06-20 13:30:30 +01:00
Jay Foad d93de1acdc [AMDGPU] Add GFX11 coverage to one more test 2022-06-20 13:18:28 +01:00
Kristof Beyls 6cb076783e [docs] More clearly document that the CoC applies to online sync-ups and office hours.
* Also removes the code of conduct document listed as a "proposal".

Fixes #55430

Differential Revision: https://reviews.llvm.org/D126954
2022-06-20 13:47:53 +02:00
Michał Górny ac570fbb85 [lldb] [llgs] Include process ID in stop responses
Include the process identifier in the `T` stop responses when
multiprocess extension is enabled (i.e. prepend it to the thread
identifier).  Use the exposed identifier to simplify the fork-and-follow
tests.

The LLDB client accounts for the possible PID since the multiprocess
extension support was added in b601c67192.

Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.llvm.org/D127192
2022-06-20 13:37:23 +02:00
Michał Górny e4d6ed58a8 [lldb] [llgs] Include process id in W/X stop reasons
Include the process identifier in W/X stop reasons when multiprocess
extensions are enabled.

The LLDB client does not support process identifiers there at the moment
but it parses packets in such a way that their presence does not cause
any problems.

Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.llvm.org/D127191
2022-06-20 13:37:23 +02:00
Ben Dunbobbin 7cd1c01c8e [windows][support] Improve backtrace emitted in crash report without llvm-symbolizer
Currently the backtrace emitted on windows when llvm-symbolizer is not
available includes addresses which cannot be easily decoded because
the addresses have the containing module's run-time base address added
into them, but we don't know what those base addresses are. This
change emits a module offset rather than an address.

There are a couple of related changes which were included as a result
of the review discussion for this patch:
- I have also removed the parameter printing as it adds noise to the
  dump and doesn't seem useful.
- I have added the exception code to the backtrace.

Differential Review: https://reviews.llvm.org/D127915
2022-06-20 12:34:32 +01:00
Dmitry Preobrazhensky 485e8b4f63 [AMDGPU][MC][GFX11] Correct disassembly of DPP variants of VOPC64 opcodes
Fix bugs https://github.com/llvm/llvm-project/issues/56091, https://github.com/llvm/llvm-project/issues/56065.

Differential Revision: https://reviews.llvm.org/D128075
2022-06-20 14:23:07 +03:00
Florian Hahn cfc741bc0e
[LoopPeel] Forget SCEV for updated exit phi values.
LoopPeel add new incoming values to exit phi nodes which can change the
SCEV for the phi after 20d798bd47.

Forget SCEVs for such phis.

Fixes #56044.

Reviewed By: nikic

Differential Revision: https://reviews.llvm.org/D128164
2022-06-20 13:19:27 +02:00
Guillaume Chatelet 03036061c7 [Alignment] Use 'previous()' method instead of scalar division
This is in preparation of integration with D128052.

Differential Revision: https://reviews.llvm.org/D128169
2022-06-20 11:01:43 +00:00
Pavel Labath 1f9f7a2f5d [lldb] Relax backtrace checks in TestDyldLaunchLinux
Newer versions of glibc (2.34) have an extra frame inside the `raise`
function.
2022-06-20 12:59:31 +02:00
Valentin Clement 8ac4eb918c
[flang][NFC] Fix file name typos 2022-06-20 12:32:23 +02:00
Mirko Brkusanin 6cae753bf4 [AMDGPU][GlobalISel] Legalize G_FSUB for s16
Differential Revision: https://reviews.llvm.org/D128066
2022-06-20 12:25:49 +02:00
Alex Bradbury 80fb782336 [WebAssembly][NFC] Update reftype and table tests to use opaque pointers
Differential Revision: https://reviews.llvm.org/D126535
2022-06-20 10:57:41 +01:00
Guillaume Chatelet 01cfc8a05a [NFC][Alignment] Remove dead code 2022-06-20 09:47:18 +00:00
David Green 76f60931e2 [ARM] Allow distributing postinc with PHI uses
Although this doesn't usually come up, we can have uses of the
BaseAccess of a distributed postinc being a PHI. This doesn't need the
usual dominance check as we will dominate along the phi edge, allowing
us to still create a postinc load/store.

Differential Revision: https://reviews.llvm.org/D127676
2022-06-20 10:08:21 +01:00
Sven van Haastregt 8c3fa31701 [OpenCL][TableGen] Fix type extension guard emission
For certain cases (such as for the double subtype of AGenType), the
OpenCLBuiltinFileEmitterBase would not emit the extension #if-guard.
Fix that by looking at the extension of the actual type instead of the
argument type (which could be a GenType that does not carry any
extension information).
2022-06-20 10:07:34 +01:00
Alex Richardson 8df257a6d0 [libunwind] Ensure test/libunwind_01.pass is not completely inlined
By adding noinline and calling fprintf before returning we ensure that
every function will have a distinct call frame and that the return address
will always be saved instead of saving the target in main as the result.

Before this change all backtraces were always backtrace -> main -> _start,
i.e. always exactly three entries. This happenend because all calls were
inlined in main() and the test just happenend to pass because there is at
least _start before main.

I found this while fixing some bugs in libunwind for CHERI and noticed that
the test was passing even though the code was completely broken.

Obtained from: https://github.com/CTSRD-CHERI/llvm-project

Reviewed By: #libunwind, ldionne, MaskRay

Differential Revision: https://reviews.llvm.org/D126611
2022-06-20 09:05:49 +00:00
Jan Svoboda b02d970b43 [clang][sema] Generate builtin operator overloads for (volatile) _Atomic types
We observed a failed assert in overloaded compound-assignment operator resolution:

```
Assertion failed: (Result.isInvalid() && "C++ binary operator overloading is missing candidates!"), function CreateOverloadedBinOp, file SemaOverload.cpp, line 13944.
...
frame #4: clang` clang::Sema::CreateOverloadedBinOp(..., Opc=BO_OrAssign, ..., PerformADL=true, AllowRewrittenCandidates=false, ...) at SemaOverload.cpp:13943
frame #5: clang` BuildOverloadedBinOp(..., Opc=BO_OrAssign, ...) at SemaExpr.cpp:15228
frame #6: clang` clang::Sema::BuildBinOp(..., Opc=BO_OrAssign, ...) at SemaExpr.cpp:15330
frame #7: clang` clang::Sema::ActOnBinOp(..., Kind=pipeequal, ...) at SemaExpr.cpp:15187
frame #8: clang` clang::Parser::ParseRHSOfBinaryExpression(..., MinPrec=Assignment) at ParseExpr.cpp:629
frame #9: clang` clang::Parser::ParseAssignmentExpression(..., isTypeCast=NotTypeCast) at ParseExpr.cpp:176
frame #10: clang` clang::Parser::ParseExpression(... isTypeCast=NotTypeCast) at ParseExpr.cpp:124
frame #11: clang` clang::Parser::ParseExprStatement(...) at ParseStmt.cpp:464
```

A simple reproducer is:

```
_Atomic unsigned an_atomic_uint;

enum { an_enum_value = 1 };

void enum1() { an_atomic_uint += an_enum_value; }
```

This patch fixes the issue by generating builtin operator overloads for (volatile) _Atomic types.

Reviewed By: aaron.ballman

Differential Revision: https://reviews.llvm.org/D125349
2022-06-20 11:03:29 +02:00
Guillaume Chatelet f1255186c7 [NFC][Alignment] Remove max functions between Align and MaybeAlign
`llvm::max(Align, MaybeAlign)` and `llvm::max(MaybeAlign, Align)` are
not used often enough to be required. They also make the code more opaque.

Differential Revision: https://reviews.llvm.org/D128121
2022-06-20 08:37:48 +00:00
Guillaume Chatelet 009fe0755e [Alignment] Remove multiply by MaybeAlign 2022-06-20 08:37:15 +00:00
Nikita Popov 2b089e9ae0 [SimplifyCFG] Try to merge edge block when threading (PR55765)
When threading, we always create a new block for the threaded edge
(even if the edge is not critical), which will later get folded back
into the predecessor if possible. Depending on precise processing
order, this separate block may break the detection of trivial
cycles in the threading code, which normally avoids infinite
threading of loops. Explicitly merge the created edge block into
the predecessor to avoid this.

Fixes https://github.com/llvm/llvm-project/issues/55765.

Differential Revision: https://reviews.llvm.org/D127216
2022-06-20 10:29:33 +02:00
LLVM GN Syncbot 809999aabb [gn build] Port 60f3b07118 2022-06-20 08:23:18 +00:00
Chuanqi Xu 7782e080e8 [Coroutines] Only do symmetric transfer if optimization is on
Symmetric transfer is not a part of C++ standards. So the vendors is not
forced to implement it any way. Given the symmetric transfer nowadays is
an optimization. It makes more sense to enable it only if the
optimization is enabled. It is also helpful for the compilation speed in
O0.
2022-06-20 16:20:36 +08:00
Alex Zinenko 8b68da2c7d [mlir] move SCF headers to SCF/{IR,Transforms} respectively
This aligns the SCF dialect file layout with the majority of the dialects.

Reviewed By: jpienaar

Differential Revision: https://reviews.llvm.org/D128049
2022-06-20 10:18:01 +02:00
Daniil Dudkin 4f1fa558c8 [flang][NFC] Small refactor for `IsProcedurePointer`
Instead of manually checking for procedure-like details in Symbol,
defer it to IsProcedure function.

Differential Revision: https://reviews.llvm.org/D127967
2022-06-20 11:10:30 +03:00
Balázs Kéri 60f3b07118 [clang][analyzer] Add checker for bad use of 'errno'.
Extend checker 'ErrnoModeling' with a state of 'errno' to indicate
the importance of the 'errno' value and how it should be used.
Add a new checker 'ErrnoChecker' that observes use of 'errno' and
finds possible wrong uses, based on the "errno state".
The "errno state" should be set (together with value of 'errno')
by other checkers (that perform modeling of the given function)
in the future. Currently only a test function can set this value.
The new checker has no user-observable effect yet.

Reviewed By: martong, steakhal

Differential Revision: https://reviews.llvm.org/D122150
2022-06-20 10:07:31 +02:00
Marco Antognini 0ad4f29b54 [analyzer] SATest: Weaken assumption about HTML files
Instead of assuming there is an HTML file for each diagnostics, consider
the HTML files only when they exist, individually of each other.

After generating the reference data, running

  python /scripts/SATest.py build --projects simbody

was resulting in this error:

    File "/scripts/CmpRuns.py", line 250, in read_single_file
      assert len(d['HTMLDiagnostics_files']) == 1
  KeyError: 'HTMLDiagnostics_files'

Reviewed By: steakhal

Differential Revision: https://reviews.llvm.org/D126197
2022-06-20 09:46:07 +02:00
Marco Antognini e15fef4170 [analyzer] SATest: Ensure Docker image can be built
Solve build issues occurring when running `docker build`.

Fix the version of cmake-data to solve the following issue:

  The following packages have unmet dependencies:
   cmake : Depends: cmake-data (= 3.20.5-0kitware1) but 3.23.1-0kitware1ubuntu18.04.1 is to be installed

Install libjpeg to solve this issue when installing Python
requirements:

  The headers or library files could not be found for jpeg,
  a required dependency when compiling Pillow from source.

Reviewed By: steakhal

Differential Revision: https://reviews.llvm.org/D126196
2022-06-20 09:43:21 +02:00
Simon Pilgrim e4a124dda5 [DAG] Fold (srl (shl x, c1), c2) -> and(shl/srl(x, c3), m)
Similar to the existing (shl (srl x, c1), c2) fold

Part of the work to fix the regressions in D77804

Differential Revision: https://reviews.llvm.org/D125836
2022-06-20 08:37:38 +01:00
Diana Picus 26041e1700 Update link job for flang on windows
When linking a Fortran program, we need to add the runtime libraries to
the command line. This is exactly what we do for Linux/Darwin, but the
MSVC interface is slightly different (e.g. -libpath instead of -L).

We also remove oldnames and libcmt, since they're not needed at the
moment and they bring in more dependencies.

We also pass `/subsystem:console` to the linker so it can figure out the
right entry point. This is only needed for MSVC's `link.exe`. For LLD it
is redundant but doesn't hurt.

Differential Revision: https://reviews.llvm.org/D126291

Co-authored-by: Markus Mützel <markus.muetzel@gmx.de>
2022-06-20 07:25:10 +00:00
Jay Foad 7050d5b98c [AMDGPU] Limit GFX11 to using 128 VGPRs
This is a temporary measure to avoid generating incorrect code until the
compiler understands the new way that GFX11 encodes 16-bit operands in
VOP instructions.

Differential Revision: https://reviews.llvm.org/D128054
2022-06-20 07:58:27 +01:00
Adrian Kuegel 132234fac7 [mlir] Fix ClangTidy performance finding (NFC) 2022-06-20 08:47:00 +02:00
Lian Wang ab25e263a9 [SelectionDAG] Enable WidenVecOp_VECREDUCE_SEQ for scalable vector
Reviewed By: sdesmalen

Differential Revision: https://reviews.llvm.org/D127710
2022-06-20 06:30:26 +00:00
Stanislav Gatev 83232099cb [clang][dataflow] Extend flow condition in the body of a for loop
Extend flow condition in the body of a for loop.

Differential Revision: https://reviews.llvm.org/D128060
2022-06-20 05:48:45 +00:00
chenglin.bi 362814d224 [InstCombine] Update icmp-and-shift check-next name; NFC 2022-06-20 11:49:16 +08:00
Chenbing Zheng 0eff6c6ba8 [InstCombine] add vector support for (A >> C) == (B >> C) --> (A^B) u< (1 << C)
Reviewed By: spatel, RKSimon

Differential Revision: https://reviews.llvm.org/D127398
2022-06-20 10:55:47 +08:00
Craig Topper 8780630ded [RISCV] Merge two similar asserts from different if/else blocks. NFC 2022-06-19 19:48:50 -07:00
Weining Lu cf71f97bb1 [LoongArch] Add codegen support for part of conversion operations
These operations include `sext`, `zext` and `trunc`.

Reference:
https://llvm.org/docs/LangRef.html#conversion-operations

Differential Revision: https://reviews.llvm.org/D127204
2022-06-20 10:00:20 +08:00
Kazu Hirata 05ff3790b3 [Basic] Use has_value (NFC) 2022-06-19 18:59:56 -07:00
Weining Lu 2ef7c4ce46 [LoongArch] Perform `and` combination with a shifted mask
Differential Revision: https://reviews.llvm.org/D127206
2022-06-20 09:58:17 +08:00
Weining Lu 709e4ad0d9 [LoongArch] Add codegen support for the bitwise binary operations and part of other operations
Reference:
https://llvm.org/docs/LangRef.html#bitwise-binary-operations
https://llvm.org/docs/LangRef.html#other-operations

The reason why other operations are implemented here is that some
bitwise binary operations depend on them. For example, on loongarch32,
`shl` over i64 data requires `select`.

Differential Revision: https://reviews.llvm.org/D127203
2022-06-20 09:54:38 +08:00
Weining Lu efc70058d9 [LoongArch] Add codegen support for fneg
Reference:
https://llvm.org/docs/LangRef.html#fneg-instruction

Differential Revision: https://reviews.llvm.org/D127200
2022-06-20 09:47:23 +08:00
Weining Lu a992115545 [LoongArch] Add codegen support for the binary operations
These binary operations include sub/fadd/fsub/fmul/fdiv. Others ops
like mul/udiv/sdiv/urem/srem would be added later since they depend on
`shift` and `truncate` that have not been supported.

Note `add` has been added in a previous patch.

Reference:
https://llvm.org/docs/LangRef.html#binary-operations

Differential Revision: https://reviews.llvm.org/D127199
2022-06-20 09:43:36 +08:00
Nico Weber 7cb49996f7 [lld] Remove lld/include/lld/Core
This is all dead code that we forgot to delete in
https://reviews.llvm.org/D114842

Differential Revision: https://reviews.llvm.org/D128147
2022-06-19 21:37:13 -04:00
Kazu Hirata c7987d4948 [ADT] Use value instead of getValue() (NFC)
Since Optional<clang::FileEntryRef> uses a custom storage class, this
patch adds value to MapEntryOptionalStorage.
2022-06-19 18:34:33 -07:00
Kazu Hirata 813f487228 [ADT] Use has_value (NFC)
This patch switches to has_value within Optional.

Since Optional<clang::FileEntryRef> uses custom storage class, this
patch adds has_entry to MapEntryOptionalStorage.
2022-06-19 18:10:13 -07:00
lewuathe 72ee11a8cf [mlir][complex] Convert complex.conj to libm
Add conversion for complex.conj to libm call

Reviewed By: bixia

Differential Revision: https://reviews.llvm.org/D127473
2022-06-20 09:38:50 +09:00
Maksim Panchenko f263a66ba0 [BOLT] Split functions with exceptions in shared objects and PIEs
Add functionality to allow splitting code with C++ exceptions in shared
libraries and PIEs. To overcome a limitation in exception ranges format,
for functions with fragments spanning multiple sections, add trampoline
landing pads in the same section as the corresponding throwing range.

Reviewed By: Amir

Differential Revision: https://reviews.llvm.org/D127936
2022-06-19 16:48:48 -07:00