495344 Commits

Author SHA1 Message Date
Nick Desaulniers
1c01651bda
[libc][docs] add page linking to talks (#84393) 2024-03-07 15:09:17 -08:00
Alex Langford
d93a126090
[lldb] Add ability to detect darwin host linker version to xfail tests (#83941)
When Apple released its new linker, it had a subtle bug that caused
LLDB's TLS tests to fail. Unfortunately this means that TLS tests are
not going to work on machines that have affected versions of the linker,
so we should annotate the tests so that they only work when we are
confident the linker has the required fix.

I'm not completely satisfied with this implementation. That being said,
I believe that adding suport for linker versions in general is a
non-trivial change that would require far more thought. There are a few
challenges involved:
- LLDB's testing infra takes an argument to change the compiler, but
there's no way to switch out the linker.
- There's no standard way to ask a compiler what linker it will use.
- There's no standard way to ask a linker what its version is. Many
platforms have the same name for their linker (ld).
- Some platforms automatically switch out the linker underneath you. We
do this for Windows tests (where we use LLD no matter what).

Given that this is affecting the tests on our CI, I think this is an
acceptable solution in the interim.
2024-03-07 18:04:42 -05:00
Craig Topper
909ab0e0d1
[RISCV] Insert a freeze before converting select to AND/OR. (#84232)
Select blocks poison, but AND/OR do not. We need to insert a freeze
to block poison propagation.

This creates suboptimal codegen which I will try to fix with other
patches. I'm prioritizing the correctness fix since we have 2 bug reports.

Fixes #84200 and #84350
2024-03-07 15:03:51 -08:00
lntue
14171b87a3
[libc][stdfix] Add exp function for short _Accum and _Accum types. (#84391) 2024-03-07 17:58:28 -05:00
Joseph Huber
3a56b5a27d
[CUDA] Include PTX in non-RDC mode using the new driver (#84367)
Summary:
The old driver embed PTX in rdc-mode and so does the `nvcc` compiler.
The new drivers currently does not do this, so we should keep it
consistent in this case. This simply requires adding the assembler
output as an input to the offloading action that gets fed to fatbin.
2024-03-07 16:53:41 -06:00
dyung
69b8bc7111
[Dexter] Extend XFAIL of Dexter tests to all MacOS architectures. (#83936)
I am trying to bring up a MacOS buildbot targeting x86 and noticed that
two Dexter tests were failing,
cross-project-tests/debuginfo-tests/llgdb-tests/static-member.cpp and
cross-project-tests/debuginfo-tests/llgdb-tests/static-member-2.cpp.
Looking in the history for these tests, they were XFAILed for Apple
Silicon in 9c46606 and are failing similar on x86 for me, so we should extend
the XFAIL to all MacOS architectures.
2024-03-07 17:43:12 -05:00
Lang Hames
48673825f4 [ORC] Deallocate FinalizedAllocs on error paths in notifyEmitted.
If notifyEmitted encounters a failure (either because some plugin returned one,
or because the ResourceTracker was defunct) then we need to deallocate the
FinalizedAlloc manually.

No testcase yet: This requires a concurrent setup -- we'll need to build some
infrastructure to coordinate links and deliberately injected failures in order
to reliably test this.
2024-03-07 14:41:30 -08:00
Philip Reames
49b1fc4f83
[CVP] Freeze Y when expanding urem x, y with X < 2Y (#84390)
We're going from a single use to two independent uses, we need these two
to see consistent values for undef. As an example, consider x = 0x2 when
y = 0b00u1. If the sub use picks 0b0001 and the cmp use picks 0b0011,
that would be incorrect.
2024-03-07 14:37:10 -08:00
LLVM GN Syncbot
23d2c38830 [gn build] Port 2a4a852a67ea 2024-03-07 22:18:39 +00:00
Stefan Gränitz
2a4a852a67 Reland [clang-repl] Expose setter for triple in IncrementalCompilerBuilder (#84174)
With out-of-process execution the target triple can be different from
the one on the host. We need an interface to configure it.

Relanding this with cleanup-fixes in the unittest.
2024-03-07 23:15:02 +01:00
Stefan Gränitz
f78129e2bb
[Orc] Add NotifyCreated callback for LLJITBuilder (#84175)
This is useful to attach generators to JITDylibs or inject initial
symbol definitions.
2024-03-07 23:05:46 +01:00
Philip Reames
a0c7714525
[RISCV] Split div vs rem scheduling information [nfc] (#84385)
Allows a processor to define different latencies for the two operations.
2024-03-07 14:03:58 -08:00
Florian Hahn
167b90d040
[TBAA] Add test showing tbaa.struct being generated with relaxed-alias.
Add test showing that tbaa.struct is generated when using TSan with
relaxed-aliasing.
2024-03-07 21:40:23 +00:00
Yinying Li
ced1fac8a3
[mlir][sparse] Move n:m printing into toMLIRString (#84264) 2024-03-07 16:13:45 -05:00
Cyndy Ishida
9cf9cb271b
[clang] Upstream visionOS Availability & DarwinSDKInfo APIs (#84279)
Admittedly a bit awkward, `visionos` is the correct and accepted
spelling for annotating availability for xrOS target triples. This patch
detects errors and handles cases when `xros` is mistakenly passed.
In addition, add APIs for introduced/deprecated/obsoleted versioning in
DarwinSDKInfo mappings.
2024-03-07 13:06:30 -08:00
Maksim Panchenko
143afb405a
[BOLT] Add reading support for Linux kernel .altinstructions section (#84283)
Read .altinstructions and annotate instructions that have alternative
sequences with "AltInst" annotation. Note that some instructions may
have more than one alternatives, in which case they will have multiple
annotations in the form "AltInst", "AltInst2", "AltInst3", etc.
2024-03-07 13:04:02 -08:00
Amara Emerson
641b98a0d1 [GlobalISel] Fix crash in tryFoldAndOrOrICmpsUsingRanges() with pointer types. 2024-03-07 12:56:40 -08:00
Dave Lee
ecf7db8b52
[lldb] Disable shell tests affected by ld_new bug (#84246)
Equivalent to the changes made in https://github.com/llvm/llvm-project/pull/83941, 
except to support shell tests.
2024-03-07 12:55:13 -08:00
Alexey Bataev
11185715a2 Revert "[SLP]Improve minbitwidth analysis."
This reverts commit 4ce52e2d576937fe930294cae883a0daa17eeced to fix
issues detected by https://lab.llvm.org/buildbot/#/builders/74/builds/26470/steps/12/logs/stdio.
2024-03-07 12:44:53 -08:00
Jonas Devlieghere
458636690a
[lldb] Do some gardening in ProgressReportTest (NFC) (#84278)
- Factor our common setup code.
- Split the ProgressManager test into separate tests as they test
separate things.
- Fix usage of EXPECT (which continues on failure) and ASSERT (which
halts on failure). We must use the latter when calling GetEvent as
otherwise we'll try to dereference a null EventSP.
2024-03-07 12:41:06 -08:00
Björn Pettersson
a41226b055
[ValueTracking] Fix KnownBits conflict for calls (range vs returned) (#84353)
If a function only exits for certain input values we can still derive
that an argument is "returned". We can also derive range metadata that
describe the possible value range returned by the function. However, it
turns out that those two analyses can result in conflicting information.

Example:
  declare i16 @foo(i16 returned)
  ...
  %A = call i16 @foo(i16 4095), !range !{i16 32, i16 33}

To avoid "Bits known to be one AND zero?" assertion failures we know
make sure to discard the known bits for this kind of scenario.
2024-03-07 21:32:49 +01:00
lntue
d0b7022798
[libc] Refactor stdfix extension from llvm_libc_ext.td to llvm_libc_stdfix_ext.td. (#84365)
This fixes runtime build for armv6 baremetal targets:
https://github.com/llvm/llvm-project/pull/83959#issuecomment-1984221249
2024-03-07 15:23:37 -05:00
Louis Dionne
292a28df6c
[libc++] Enable availability based on the compiler instead of __has_extension (#84065)
__has_extension(...) doesn't work as intended when -pedantic-errors is
used with Clang. With that flag, __has_extension(...) is equivalent to
__has_feature(...), which means that checks like

    __has_extension(pragma_clang_attribute_external_declaration)

will return 0. In turn, this has the effect of disabling availability
markup in libc++, which is undesirable.

rdar://124078119
2024-03-07 15:12:21 -05:00
Philip Reames
a10fd16270 [CVP] Add test coverage for an upcoming generalization of expandUDivOrURem 2024-03-07 12:02:09 -08:00
Clement Courbet
308a236072
[clang-tidy] isOnlyUsedAsConst: Handle static method calls. (#84005)
... using method syntax:

```
struct S {
  static void f()
};

void DoIt(S& s) {
  s.f();  // Does not mutate `s` through the `this` parameter.
}
```
2024-03-07 21:01:46 +01:00
Schrodinger ZHU Yifan
57a337378f
[libc][c23] add memset_explicit (#83577) 2024-03-07 14:57:35 -05:00
Benjamin Kramer
4f85f620b6 [bazel] Port 3714f937b835c06c8c32ca4f3f61ba2317db2296 2024-03-07 20:54:02 +01:00
Benjamin Kramer
b8b434b3e1 [GISEL] Silence unused variable warning. NFC 2024-03-07 20:46:10 +01:00
Changpeng Fang
9286665f76
AMDGPU: Use OtherPredicates for v_dot2_bf16_bf16(f16_f16) pseudo (#84354)
This is because SubtargetPredicate is not copied from pseudo to dpp16
and dpp8 real. Actually this is the common issue for insts with
_Realtriple_ --- We should avoid using SubtargetPredicate to define
pseudo: the predicate will be lost in real.
2024-03-07 11:43:33 -08:00
Lang Hames
4d31fbbb5a [ORC] Propagate defineMaterializing failure when resource tracker is defunct.
Remove an overly aggressive cantFail: This call to defineMaterializing should
never fail with a duplicate symbols error (since all new symbols shoul be
weak), but may fail if the tracker has become defunct in the mean time. In that
case we need to propagate the error.
2024-03-07 11:30:18 -08:00
LLVM GN Syncbot
d64632becd [gn build] Port 00f412168cf6 2024-03-07 19:18:25 +00:00
Hongyu Chen
00f412168c
[ORC][JITLink] Add Intel VTune support to JITLink (#83957)
[ORC] Re-land https://github.com/llvm/llvm-project/pull/81826

This patch adds two plugins: VTuneSupportPlugin.cpp and
JITLoaderVTune.cpp. The testing is done in a manner similar to
llvm-jitlistener. Currently, we only support the old version of Intel
VTune API.
2024-03-07 11:15:16 -08:00
Noah Goldstein
9f96db8e31 [X86] Fold (icmp ult (add x,-C),2) -> (or (icmp eq X,C), (icmp eq X,C+1)) for Vectors
This is undoing a middle-end transform which does the opposite. Since
X86 doesn't have unsigned vector comparison instructions pre-AVX512,
the simplified form gets worse codegen.

Fixes #66479

Proofs: https://alive2.llvm.org/ce/z/UCz3wt

Closes #84104
Closes #66479
2024-03-07 13:12:09 -06:00
Noah Goldstein
3e73a080fa [X86] Add tests for folding (icmp ult (add x,-C),2) -> (or (icmp eq X,C), (icmp eq X,C+1)); NFC 2024-03-07 13:12:09 -06:00
LLVM GN Syncbot
fc837f7a2d [gn build] Port a6a6fca7911f 2024-03-07 19:05:50 +00:00
Yinying Li
4cb5a96af6
[mlir][sparse] Migrate more tests to sparse_tensor.print (#84249)
Continuous efforts following #83946.
2024-03-07 14:02:20 -05:00
Yinying Li
6e692e726a
[mlir][sparse] Migrate to sparse_tensor.print (#83946)
Continuous efforts following #83506.
2024-03-07 14:02:01 -05:00
Guillaume Chatelet
c103d573e7
[libc] Fix forward missing BigInt specialization of mask_leading_ones / mask_trailing_ones (#84325)
#84299 broke the arm32 build, this patch fixes it forward.
2024-03-07 20:00:05 +01:00
Adrian Prantl
7fc583c9a5 Change Get|SetNumChildren to use unint32_t 2024-03-07 10:58:34 -08:00
Florian Hahn
6f29941776
[TBAA] Add extra tests to copy structs with union members.
Adds extra test coverage for TBAA generation for copies of structs with
union members.
2024-03-07 18:57:09 +00:00
Adrian Prantl
e710523e40 Change GetChildAtIndex to take a uint32_t 2024-03-07 10:55:02 -08:00
Adrian Prantl
3d7c5b80e3 Change the return type of SyntheticFrontend::CalculateNumChildren to int32_t
This way it is consistent with ValueObject and TypeSystem.
2024-03-07 10:55:02 -08:00
Adrian Prantl
54c955b828 Change the return type of ValueObject::CalculateNumChildren to uint32_t.
In the end this value comes from TypeSystem::GetNumChildren which
returns a uint32_t, so ValueObject should be consistent with that.
2024-03-07 10:55:02 -08:00
Vitaly Buka
a6a6fca791
[ubsan][pgo] Pass to remove ubsan checks based on profile data (#83471)
UBSAN checks can be too expensive to be used
in release binaries. However not all code affect
performace in the same way. Removing small
number of checks in hot code we can performance
loss, preserving most of the checks.
2024-03-07 10:52:43 -08:00
Vlad Serebrennikov
41572177d1
[clang] Add CodeGen tests for CWG 5xx issues (#84303)
This patch covers
[CWG519](https://cplusplus.github.io/CWG/issues/519.html) "Null pointer
preservation in `void*` conversions",
[CWG571](https://cplusplus.github.io/CWG/issues/571.html) "References
declared const".
2024-03-07 22:38:44 +04:00
Timm Bäder
9e4f289bd6 [clang][Interp][NFC] Add [[nodiscard]] attribute to emit functions 2024-03-07 19:37:52 +01:00
Dave Lee
6515930b0c
[lldb] Minor cleanup in StoringDiagnosticConsumer (#84263)
Removes an unused field. Retypes unshared smart pointers to `unique_ptr`.
2024-03-07 10:13:14 -08:00
Razvan Lupusoru
a435e1f63b
[acc] Add attribute for combined constructs (#80319)
Combined constructs are decomposed into separate operations. However,
this does not adhere to `acc` dialect's goal to be able to regenerate
semantically equivalent clauses as user's intent. Thus, add an attribute
to keep track of the combined constructs.
2024-03-07 10:06:47 -08:00
Timm Bäder
cfdfeb440c [clang][Interp][NFC] Remove unneeded forward declaration
We already import Record.h.
2024-03-07 18:55:09 +01:00
Jonas Devlieghere
ea49e04b35
[lldb] Don't report all progress event as completed. (#84281)
Currently, progress events reported by the ProgressManager and broadcast
to eBroadcastBitProgressCategory always specify they're complete. The
problem is that the ProgressManager reports kNonDeterministicTotal for
both the total and the completed number of (sub)events. Because the
values are the same, the event reports itself as complete.

This patch fixes the issue by reporting 0 as the completed value for the
start event and kNonDeterministicTotal for the end event.
2024-03-07 09:55:00 -08:00