Commit Graph

433054 Commits

Author SHA1 Message Date
wanglian 061f7ec9fa [LegalizeTypes][NFC] Use getConstantOperandVal instead of cast constant getvalue
Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D131642
2022-08-12 14:35:10 +08:00
wanglian 1303057888 [LegalizeTypes][NFC] Use dyn_cast instead of isa and cast
Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D131544
2022-08-12 14:18:49 +08:00
gonglingqin 9e09c3186e [LoongArch] Add codegen support for ISD::CTPOP, ISD::CTTZ and ISD::CTLZ
Differential Revision: https://reviews.llvm.org/D131550
2022-08-12 14:15:30 +08:00
Fangrui Song d561907f27 [MCDwarf][test] Improve debug-prefix-map.s 2022-08-11 22:40:31 -07:00
Med Ismail Bennani 6c58f12d07 [lldb/Symbol] Fix null-deref in TypeList::Dump
This patch should just a crash caused by a null pointer dereferencing
when dumping a type. It makes sure that the pointer is valid.

rdar://97455134

Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
2022-08-11 22:29:06 -07:00
Med Ismail Bennani edc77353da [lldb/crashlog] Improve exception reporting for interactive mode
This patch improve exception reporting when loading a crash report in a
scripted process. Now, we parse the `exception` dictionary from the
crash report use it the create a higher fidelity `MachException` stop info.

This patch also updates the test to reflect that change.

rdar://97096486

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

Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
2022-08-11 22:29:06 -07:00
Med Ismail Bennani 603f44acc6 [lldb/test] Fix interactive crashlog test failure (NFC)
This patch removes the system library names and mangled symbol from
the expected output for the interactive crashlog tests.

Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
2022-08-11 22:29:06 -07:00
Med Ismail Bennani 300e393092 [lldb/crashlog] Adapt raw text crashlog exception to json format
This patch parses CrashLog exception data from the raw
text format and adapts it to the new JSON format.

This is necessary for feature parity between the 2 formats.

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

Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
2022-08-11 22:29:06 -07:00
Siva Chandra Reddy 4a738ee822 [libc] Add implemementations of thread specific data related API.
Specifically, POSIX functions pthread_key_create, pthread_key_delete,
pthread_setspecific and pthread_getspecific have been added. The C
standard equivalents tss_create, tss_delete, tss_set and tss_get have
also been added.

Reviewed By: lntue, michaelrj

Differential Revision: https://reviews.llvm.org/D131647
2022-08-12 05:28:40 +00:00
Ting Wang 12e1936f64 [PowerPC] Add XXEVAL TD pattern
Add xxeval TD pattern for P10 on: eqv, nor, or, xor.

Reviewed By: shchenz

Differential Revision: https://reviews.llvm.org/D131654
2022-08-12 01:27:24 -04:00
Fangrui Song b0c4cd35df [MCDwarf] Use emplace to avoid move assignment. NFC 2022-08-12 05:05:49 +00:00
Chuanqi Xu e190b7cc90 [Coroutines] Maintain the position of final suspend
Closing https://github.com/llvm/llvm-project/issues/56329

The problem happens when we try to simplify the suspend points. We might
break the assumption that the final suspend lives in the last slot of
Shape.CoroSuspends. This patch tries to main the assumption and fixes
the problem.
2022-08-12 13:05:08 +08:00
Chen Zheng 8d19cfb72e [PowerPC] omit location attribute for TLS variable on AIX
TLS debug on AIX is not ready for now.
The location generated in no-integrated-as mode is wrong and
in integrated-as mode causes AIX linker error.

Reviewed By: Esme

Differential Revision: https://reviews.llvm.org/D130245
2022-08-12 00:54:48 -04:00
Slava Gurevich 3934a31cfa [LLDB][NFC] Reliability fixes for IOHandlerCursesGUI
- checking retval of function calls
- dead code removal
- null dereference fix

Differential Revision: https://reviews.llvm.org/D131615
2022-08-11 21:10:53 -07:00
Weining Lu 40f1f9b357 [LoongArch] Return null SDValue by default in LowerOperation. NFC
Differential Revision: https://reviews.llvm.org/D131546
2022-08-12 12:09:08 +08:00
Slava Gurevich b2cb417ed9 [LLDB][NFC] Reliability fixes for ObjectFileMachO.cpp (part 2)
Add the fixes suggested post-push in D131554

Differential Revision: https://reviews.llvm.org/D131743
2022-08-11 21:08:18 -07:00
Tom Stellard 74384c7fce Disable update_cc_test_checks.py tests in stand-alone builds
The script is located in the llvm/ sub-directory, so it is not available
for when doing a stand-alone build.

See https://discourse.llvm.org/t/rfc-stand-alone-build-support/61291

Differential Revision: https://reviews.llvm.org/D123967
2022-08-11 20:53:37 -07:00
Chuanqi Xu 0bc993edf4 [AST] [Modules] Introduce Decl::getNonTransparentDeclContext to handle exported friends
Closing https://github.com/llvm/llvm-project/issues/56826.

The root cause for pr56826 is: when we collect the template args for the
friend, we need to judge if the friend lives in file context. However,
if the friend lives in ExportDecl lexically, the judgement here is
invalid.

The solution is easy. We should judge the non transparent context and
the ExportDecl is transparent context. So the solution should be good.

A main concern may be the patch doesn't handle all the places of the
same defect. I think it might not be bad since the patch itself should
be innocent.

Reviewed By: erichkeane

Differential Revision: https://reviews.llvm.org/D131651
2022-08-12 11:50:35 +08:00
Kevin Athey 4735104f09 [MSAN] remove unused debugging statements (NFC)
Reviewed By: vitalybuka

Differential Revision: https://reviews.llvm.org/D131748
2022-08-11 20:24:34 -07:00
Amy Kwan e2e9e2ce8e [libcxx] [test] Fix max_size.pass.cpp for PowerPC targets
This patch fixes the max_size.pass.cpp test for PowerPC targets, depending on
endianness.

We will exhibit the full_size() behaviour for little endian
(where __endian_factor = 2 ), and the half_size() behaviour for
big endian (where __endian_factor = 1).

Differential Revision: https://reviews.llvm.org/D131682
2022-08-11 21:39:29 -05:00
wanglian 3b71f1d5ab [LegalizeTypes][NFC] Use getConstantOperandAPInt instead of cast constant getAPInt
Reviewed By: RKSimon

Differential Revision: https://reviews.llvm.org/D131653
2022-08-12 10:21:54 +08:00
Dave Lee 95367da43d [lldb] Remove unused "import unittest2" statements 2022-08-11 19:11:01 -07:00
Dave Lee 56f9cfe30c [lldb] Remove uses of six module (NFC)
With lldb (& llvm) requiring Python 3.6+, use of the `six` module can be removed.

Differential Revision: https://reviews.llvm.org/D131304
2022-08-11 19:06:15 -07:00
Slava Gurevich 256ba7738e [LLDB][NFC] Fix the style issue in TCPSocket
Style fixes for the entire file

Differential Revision: https://reviews.llvm.org/D131543
2022-08-11 18:02:01 -07:00
Jeff Niu 30171e76f0 [mlir] Switch segment size attributes to DenseI32ArrayAttr
Switch variadic operand and result segment size attributes to use the
dense i32 array. Dense integer arrays were introduced primarily to
represent index lists. They are a better fit for segment sizes than
dense elements attrs.

Depends on D131738

Reviewed By: mehdi_amini

Differential Revision: https://reviews.llvm.org/D131702
2022-08-11 20:56:45 -04:00
Jeff Niu 2092d1438c [mlir] Change the syntax of dense arrays
Follow-up to D123774, where the syntax of dense arrays was discussed. It
was included that the syntax should be changed to `array<i32: 1, 2>`.
This patch changes the syntax but importantly preserves the `[1, 2]`
syntax when embedding these attributes in assembly formats through ODS.

Reviewed By: mehdi_amini, jpienaar

Differential Revision: https://reviews.llvm.org/D131738
2022-08-11 20:56:42 -04:00
Michael Jones 5e22ef3198 [libc] move int conversion out of base template
The convert_alpha_numeric function is intentionally non-templated so
that its code can be reused for different bases in code-size sensitive
cases. Previously it was inside the IntegerToString class which created
a different version for each base.

Reviewed By: sivachandra, lntue

Differential Revision: https://reviews.llvm.org/D131725
2022-08-11 16:56:27 -07:00
Jonas Devlieghere ce075dfa19
[lldb] Fix output for unconditionally decorated tests
A missing call to `format` resulted in curly braces getting printed in
the reason a test was modified by a decorator. For example it would
print "{} unconditionally" instead of "skipping unconditionally" for
tests that were marked as such.
2022-08-11 16:20:15 -07:00
Ivan Murashko 557e32e002 [clang] SIGSEGV fix at clang::ASTContext::getRawCommentForDeclNoCacheImpl
The `File` might point to an invalid `FileID` when the AST is broken. That leads to clang/clangd crashes while processing comments. The relevant part of the crash is below
```
 #4 0x00007f1d7fbf95bc std::_Rb_tree<unsigned int, std::pair<unsigned int const, clang::RawComment*>, std::_Select1st<std::pair<unsigned int const, clang::RawComment*>>, std::less<unsigned int>, std::allocator<std::pair<unsigned int const
, clang::RawComment*>>>::_M_lower_bound(std::_Rb_tree_node<std::pair<unsigned int const, clang::RawComment*>> const*, std::_Rb_tree_node_base const*, unsigned int const&) const /usr/include/c++/8/bits/stl_tree.h:1911:2
 #5 0x00007f1d7fbf95bc std::_Rb_tree<unsigned int, std::pair<unsigned int const, clang::RawComment*>, std::_Select1st<std::pair<unsigned int const, clang::RawComment*>>, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, clang::RawComment*>>>::lower_bound(unsigned int const&) const /usr/include/c++/8/bits/stl_tree.h:1214:56
 #6 0x00007f1d7fbf95bc std::map<unsigned int, clang::RawComment*, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, clang::RawComment*>>>::lower_bound(unsigned int const&) const /usr/include/c++/8/bits/stl_map.h:1264:36
 #7 0x00007f1d7fbf95bc clang::ASTContext::getRawCommentForDeclNoCacheImpl(clang::Decl const*, clang::SourceLocation, std::map<unsigned int, clang::RawComment*, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, clang::RawComment*>>> const&) const /home/ivanmurashko/local/llvm-project/clang/lib/AST/ASTContext.cpp:226:57
```

The corresponding LIT test that reproduces the crash was also added

Same issue is described at https://bugs.llvm.org/show_bug.cgi?id=49707

Reviewed By: gribozavr2

Differential Revision: https://reviews.llvm.org/D131675
2022-08-12 00:05:59 +01:00
Mircea Trofin 3486b1b736 [mlgo][nfc] regalloc test model generator: prep for TFLite
Casting operator to make TFLite happy.

Reviewed By: yundiqian

Differential Revision: https://reviews.llvm.org/D131584
2022-08-11 15:53:23 -07:00
not-jenni 7ff0ca1a4d [mlir][tosa] Updates tosa.logical_not to use the SameOperandsAndResultType trait
Reviewed By: jpienaar

Differential Revision: https://reviews.llvm.org/D131496
2022-08-11 15:42:30 -07:00
Nico Weber d299c033e6 [gn build] Make it possible to do PGO-optimized builds
This is fairly manual for now.

Differential Revision: https://reviews.llvm.org/D131710
2022-08-11 18:39:46 -04:00
Arthur Eubanks eddcfe3a9e [NFC] Format ilist_node_options.h to cycle bots 2022-08-11 15:39:12 -07:00
Craig Topper e493944f5f [RISCV] Use SLTIU X, -1 for (setne X, -1).
Since -1 is the maximum unsigned value, all values less than it
are not equal to it.
2022-08-11 15:36:04 -07:00
Shafik Yaghmour 106774515b [Clang] Fix for Tighten restrictions on enum out of range diagnostic
Ok it looks like this is a bit more subtle, I broke the llvm-test-suite file
paq8p.cpp again. We need both conditions to be true Info.EvalMode ==
EvalInfo::EM_ConstantExpression && Info.InConstantContext. We need to be in a
context that requires a constant value but also in a constant expression context.

Differential Revision: https://reviews.llvm.org/D131704
2022-08-11 15:34:58 -07:00
Dave Lee 28d0c0c2c8 [lldb] Tidy some regex in crashlog.py (NFC)
A spiritual follow up to D131032. I noticed some regex could be simplified.

This does some of the following:
1. Removes unused capture groups
2. Uses non-capturing `(?:...)` groups where grouping is needed but capturing isn't
3. Removes trailing `.*`
4. Uses `\d` over `[0-9]`
5. Uses raw strings
6. Uses `{N,}` to indicate N-or-more

Also improves the call site of a `re.findall`.

Differential Revision: https://reviews.llvm.org/D131305
2022-08-11 15:24:57 -07:00
Martin Storsjö 2c2fb0c737 [llvm] Use hidden visibility when building for MinGW with Clang
Since c5b3de6745 (git main,
August 11th), Clang does generate working hidden visibility
on MinGW targets. Using that reduces the number of exports from
a dylib build of LLVM significantly, which is vital for fitting
within the limit of 64k exported symbols from a DLL.

It's essential that if we set CMAKE_CXX_VISIBILITY_PRESET=hidden
(which passes -fvisibility=hidden on the command line), we also
must define LLVM_EXTERNAL_VISIBILITY consistently to override
it. (If there are mismatches, e.g. setting hidden visibility generally
but never overriding it back to default for the symbols that do need
to be exported, we'd get broken builds in such configurations.)

We don't want to be using __attribute__((visibility("hidden"))) on
MinGW with GCC, because GCC produces a warning about it. (GCC hasn't
warned about the command line options that set hidden visibility
though.) Clang has historically not warned about either of them, so
it is harmless to use the hidden visibility when building with older
Clang (so we don't need to detect the exact version of Clang/LLVM where
it has an effect).

This reduces the number of exported symbols for a dylib build of LLVM;
previously libLLVM exported around 64650 symbols (when the maximum is
65536) when the ARM, AArch64 and X86 targets were enabled. If enabling
more targets (or if building with e.g. assertions enabled), it would
exceed the limit. Now with visibility flags in use, the same build
with ARM, AArch64 and X86 ends up at around 35k exported symbols.

Differential Revision: https://reviews.llvm.org/D131661
2022-08-12 00:57:05 +03:00
Martin Storsjö a5881e8a81 [lldb] Silence a GCC warning about missing returns after a fully covered switch. NFC. 2022-08-12 00:35:32 +03:00
Vitaly Buka 9637a17126 [test][msan] Test origin description argument
Reviewed By: kda

Differential Revision: https://reviews.llvm.org/D131721
2022-08-11 14:29:09 -07:00
Vitaly Buka aca1276160 [msan] Avoid unnecessary PC increment/decrement
Reviewed By: kda

Differential Revision: https://reviews.llvm.org/D131692
2022-08-11 14:29:07 -07:00
Craig Topper 2c79801a0e [RISCV] Add more ineg+setcc isel patterns to avoid creating neg+xori+slti(u).
Including patterns to select addiw if only the lower 32 bits are used.

I'm not excited about adding this many patterns. I'm looking at whether
we can create the xori during lowering and move the ineg patterns to
DAGCombiner.
2022-08-11 14:24:09 -07:00
Shafik Yaghmour 2608f553b8 [Clang] Tighten restrictions on enum out of range diagnostic
In D131528 using Info.EvalMode == EvalInfo::EM_ConstantExpression is not strict
enough to restrict the diagnostic to only constant expression contexts. It is
sometimes set in cases where we are still determining if we are in a constant
expression context.

Using InConstantContext will tighten the restriction.

Differential Revision: https://reviews.llvm.org/D131704
2022-08-11 13:44:26 -07:00
Jonathan Peyton 56f36f85e0 [OpenMP][OMPT] Fix memory leak when using GCC compatibility code
Serialized parallels allocate lightweight task teams on the heap
but never free them in the corresponding join. This patch adds a wrapper
around the allocation (if ompt enabled) and also adds the corresponding
free in the join call.

Differential Revision: https://reviews.llvm.org/D131690
2022-08-11 15:26:09 -05:00
Vladimir Plyashkun 6c7b049f6e
[clang-tidy][docs] Fixed page title for abseil-no-internal-dependencies check documentation
It seems that documentation for abseil-no-internal-dependencies has invalid title.
This can be checked by looking at the actual web-site - https://clang.llvm.org/extra/clang-tidy/checks/abseil/no-internal-dependencies.html
There is redundant "subl.. title:: clang-tidy - abseil-no-internal-dependencies" paragraph in the beginning.

Reviewed By: njames93, sylvestre.ledru

Differential Revision: https://reviews.llvm.org/D131590
2022-08-11 21:09:39 +01:00
Philip Reames 1062595808 [RISCV][SLP] Add some basic test coverage 2022-08-11 13:05:14 -07:00
Jonas Devlieghere a8bc9b627e
[lldb] Simplify TestExec's source code (2/2)
I accidentally forgot to stage part of the changes in the previous
commit.
2022-08-11 12:44:38 -07:00
Jonas Devlieghere 181c0373d2
[lldb] Simplify TestExec's source code
Simplify the test's source code, remove unnecessary headers, and convert
it from C++ to C.
2022-08-11 12:36:54 -07:00
Louis Dionne 8c6319e30a [libc++] Add a missing assertion in std::span's constructor
Also, add missing tests for assertions in span constructors. Now I
believe that all of std::span's API should be hardened, and all the
assertions should have a corresponding test.

Differential Revision: https://reviews.llvm.org/D131681
2022-08-11 15:31:46 -04:00
Siva Chandra Reddy 57afb48057 [libc][Obvious] Fix thrd_join's first arg.
First argument to thrd_join was incorrectly listed as a pointer
to a thrd_t value. It should instead be a thrd_t value argument.
2022-08-11 19:18:11 +00:00
Arnold Schwaighofer 6ef223c041 [coro async] Mark async suspend function and its resume function pointer intrinsic as nomerge
Coroutine splitting is not possible if the one-to-one mapping between the two is
lost. Every suspend point must have a matching continuation function
pointer.

rdar://98404664

Differential Revision: https://reviews.llvm.org/D131684
2022-08-11 11:43:30 -07:00