473767 Commits

Author SHA1 Message Date
Kazu Hirata
2cdfdfd7b9 [CodeGen] Modernize EHScopeStack::Cleanup::Flags (NFC) 2023-09-02 09:32:36 -07:00
Matt Arsenault
f7dcabe502 AMDGPU: Pass in TargetMachine to AMDGPULowerModuleLDSPass
https://reviews.llvm.org/D157660
2023-09-02 12:02:36 -04:00
Matt Arsenault
1f52060000 AMDGPU: Use poison instead of undef in module lds pass 2023-09-02 11:33:26 -04:00
Ingo Müller
6ff7ef4331 [mlir][python] Fix-forward 9442b441c1c50e4e6782fd2e6aa16925c9d22e29.
That commit changed the mix-ins for the Python bindings of the PadOp
including some tests, but did not change the corresponding `CHECK`
statements. This patch does that.
2023-09-02 14:23:04 +00:00
Matt Arsenault
6f2e943de6 InstSimplify: Handle folding fcmp with literal nans without a context instruction
Fixes reported assert after ddb3f12c428bc4bd5a98913d74dfd7f2402bdfd8
2023-09-02 10:22:09 -04:00
Nikolas Klauser
b6d2460fd4 [libc++] Remove _LIBCPP_DISABLE_NODISCARD_AFTER_CXX17 documentation
We've removed this flag a while ago, so we shouldn't list it anymore.
2023-09-02 07:17:32 -07:00
Matt Arsenault
5dcd6669ff InstSimplify: Handle exp10(log10(x)) -> x
Copy from exp/exp2 case.

https://reviews.llvm.org/D157894
2023-09-02 09:21:47 -04:00
Matt Arsenault
ee8d1d26e9 ConstantFolding: Handle exp10 intrinsic
https://reviews.llvm.org/D157892
2023-09-02 09:20:51 -04:00
Matt Arsenault
da077a52c4 InstSimplify: Handle log10(exp10(x))
Copied from the exp/exp2 cases

https://reviews.llvm.org/D157894
2023-09-02 08:57:54 -04:00
Alexey Lapshin
097971b318 [DWARFLinkerParallel][PowerPC] Cure tests failing on powerpc machine.
location-expression.test and tls-variable.test failed because wrong
endianness was used on powerpc machine. To fix the issue this patch
uses endianness from debug map as endianness for the whole target file.
Previosly, architecture endianness won over what is specified
in debug map.

Differential Revision: https://reviews.llvm.org/D159349
2023-09-02 13:35:53 +02:00
Ingo Müller
9442b441c1 [mlir][linalg][transform][python] Fix optional args of PadOp mix-in.
The mix-in did not allow to *not* set many of the arguments, even though
they represent optional attributes. Instead, it set default values,
which have different semantics in some cases. In other cases, setting
the default values is already done by the C++ layer, in which case they
are currently redundant and may be wrong in some potential future change
in the TD or C++ files. With this patch, `None` is preserved until the
generated binding, which handles them as desired.

Reviewed By: springerm

Differential Revision: https://reviews.llvm.org/D158844
2023-09-02 11:19:06 +00:00
Younan Zhang
e257c0a919 [clang][clangd] Ensure the stack bottom before building AST
`clang::runWithSufficientStackSpace` requires the address of the
initial stack bottom to prevent potential stack overflows.

In addition, add a fallback to ASTFrontendAction in case any client
forgets to call it when not through CompilerInstance::ExecuteAction,
which is rare.

Fixes https://github.com/clangd/clangd/issues/1745.

Reviewed By: sammccall

Differential Revision: https://reviews.llvm.org/D158967
2023-09-02 18:53:06 +08:00
Ulrich Weigand
208f9a2afc [msan][s390x] Fix long double interceptors
s390x is one of the architectures where the "long double" type was changed
from a 64-bit IEEE to a 128-bit IEEE type back in the glibc 2.4 days.
This means that glibc still exports two versions of the long double functions
(those that already existed back then), and we have to intercept the correct
version. There is already an existing define SANITIZER_NLDBL_VERSION that
indicates this situation, we simply have to respect it when intercepting
strtold and wcstold.

In addition, on s390x a long double return value is passed in memory via
implicit reference. This means the interceptor for functions returning
long double has to unpoison that memory slot, or else we will get
false-positive uninitialized memory reference warnings when the caller
accesses that return value - similar to what is already done in the
mallinfo interceptor. Create a variant macro INTERCEPTOR_STRTO_SRET and
use it on s390x.

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D159378
2023-09-02 12:36:53 +02:00
Brad Smith
6081d3342d Fix indenting after Haiku addition 2023-09-02 06:27:36 -04:00
Tobias Hieta
af68f27064
[CodeOwners] Windows subscribers (#65203)
Trying to catch most windows related code.
2023-09-02 11:33:20 +02:00
Brad Smith
561d3076aa Hook up Haiku AArch64 and RISCV64 support 2023-09-02 03:17:16 -04:00
Min-Yih Hsu
230558e444 [Clang][M68k] Use DefineStd for target-specific macros
Use `DefineStd` for target-specific macros such that GNU-style definitions
can be correctly toggled.

Differential Revision: https://reviews.llvm.org/D158698
2023-09-01 23:25:08 -07:00
Corentin Jabot
890f11d60f [Clang] Realize generic lambda call operators are dependent sooner
When parsing a trailing return type / noexcept / constraint
of a generic lambda, we need to know that we are in a dependent
context. We currently don't because we only create a TemplateDecl
for the call operator one its fully parsed.

This patch attach a template decl to the call operator as soon
as the parameter declaration clause is parsed - the point at which
we  have collected all template parameters

Fixes #64689

Reviewed By: erichkeane

Differential Revision: https://reviews.llvm.org/D159358
2023-09-02 08:05:49 +02:00
Johannes Doerfert
f4f40c6dfd [Attributor] Introduce a hook for AAs to avoid inline-asm 2023-09-01 22:14:38 -07:00
Johannes Doerfert
9207a90be5 [Attributor] Do not expand dead indirect call sites 2023-09-01 22:14:38 -07:00
Johannes Doerfert
06e6ec0d09 [Attributor][NFC] Precommit test 2023-09-01 22:14:38 -07:00
Serge Pavlov
9fd57e4d48 [clang] Support vectors in __builtin_isfpclass
Builtin function `__builtin_isfpclass` now can be called for a vector
of floating-point values. In this case it is applied to the vector
elementwise and produces vector of integer values.

Differential Revision: https://reviews.llvm.org/D153339
2023-09-02 11:52:43 +07:00
Fangrui Song
678e3ee123 [lldb] Fix duplicate word typos; NFC
Those fixes were taken from https://reviews.llvm.org/D137338
2023-09-01 21:32:24 -07:00
Johannes Doerfert
a8ac969b10 [Attributor][NFC] Use common helper to avoid duplication
Many AAs translated callee information to the call site explicitly but
they now all use the helper we already had for callee return to call
site return propagation. In a follow up the helper is going to be
extended to handle multiple callees.
2023-09-01 21:04:03 -07:00
Johannes Doerfert
ac0d3869c5 [Attributor][NFC] Simplify the helper APIs
We have various helpers to propagate information. This patch cleans up
the API to allow less template parameters and more uniform handling.
2023-09-01 21:04:02 -07:00
Johannes Doerfert
6b95126b9b [Attributor][NFC] Rename AACallSiteReturnedFromReturned
In a follow up we'll use it for more than "callee return" -> "call site
return" deduction, effectively allowing "callee" -> "call site".
2023-09-01 21:04:02 -07:00
Fangrui Song
7557530f42 [mlir] Fix duplicate word typos; NFC
Those fixes were taken from https://reviews.llvm.org/D137338
2023-09-01 20:53:08 -07:00
Koakuma
3a7431eb2d [SPARC][IAS] Add definitions for v9 State Registers
This adds definitions for SPARC v9 State Registers (privileged/nonprivileged,
see v9 manual ch. 5).

Reviewed By: barannikov88

Differential Revision: https://reviews.llvm.org/D157231
2023-09-01 23:40:45 -04:00
yuntaopan
fc0a18f8aa [ADT][NFC] Remove some redundant code
Some typetraits are defined twice, delete this part of the code.

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D159331
2023-09-01 20:14:15 -07:00
Fangrui Song
fc04472aa2 [flang] Fix duplicate word typos; NFC
Those fixes were taken from https://reviews.llvm.org/D137338
2023-09-01 18:41:05 -07:00
Fangrui Song
111fcb0df0 [llvm] Fix duplicate word typos. NFC
Those fixes were taken from https://reviews.llvm.org/D137338
2023-09-01 18:25:16 -07:00
Nikolas Klauser
9f3e3efd98 [libc++][NFC] Refactor __enable_if return types to defaulted template parameters
This brings most of the enable_ifs in libc++ to the same style. It also has the nice side-effect of reducing the size of names of these symbols, since the depedent return type is shorter.

Reviewed By: #libc, ldionne

Spies: ldionne, libcxx-commits

Differential Revision: https://reviews.llvm.org/D157787
2023-09-01 17:52:31 -07:00
walter erquinigo
2f9cd6377f [LLDB] Fix IOHandlerEditline::GetCurrentLines()
This method was working as expected if LLDB_ENABLE_LIBEDIT is false, however, if it was true, then the variable m_current_lines_ptr was always pointing to an empty list, because Editline only updates its contents once the full input has been completed (see https://github.com/llvm/llvm-project/blob/main/lldb/source/Host/common/Editline.cpp#L1576).

A simple fix is to invoke Editline::GetInputAsStringList() from GetCurrentLines(), which is already used in many places as the common way to get the full input list.
2023-09-01 20:52:00 -04:00
Nikolas Klauser
6256ccfd4f [libc++][NFC] Update the remaining enable_ifs
This brings most of the enable_ifs in libc++ to the same style.

Reviewed By: #libc, ldionne

Spies: ldionne, libcxx-commits

Differential Revision: https://reviews.llvm.org/D157753
2023-09-01 17:51:17 -07:00
Jonas Devlieghere
913bca718a [llvm] Adopt WithMarkup in the SystemZ backend
Adopt the new markup overload, introduced in 77d1032516e7, in the
SystemZ backend.

Differential revision: https://reviews.llvm.org/D159388
2023-09-01 17:39:06 -07:00
Matt Arsenault
d3c46db494 ValueTracking: exp10 does not introduce poison 2023-09-01 20:23:45 -04:00
Matt Arsenault
301b0e477b ValueTracking: Handle exp10 in computeKnownFPClass
It's the same as the other exps.

https://reviews.llvm.org/D157891
2023-09-01 20:19:55 -04:00
Matt Arsenault
2e2b3678e5 InstSimplify: Baseline tests for exp10 handling 2023-09-01 20:18:52 -04:00
Johannes Doerfert
37642714ed [Attributor][FIX] Support non-0 AS for function pointers 2023-09-01 17:17:51 -07:00
Johannes Doerfert
750510c648 [Attributor][NFC] Add debug counter for AA creation
It is not possible to not create an AA at all, which we can use to
bisect problems in the future.
2023-09-01 17:17:51 -07:00
Johannes Doerfert
2544283597 [Core][FIX] Do not assume instruction users in DetermineUseCaptureKind 2023-09-01 17:17:51 -07:00
Matt Arsenault
af758d6531 ValueTracking: Add baseline test for exp10 computeKnownFPClass handling 2023-09-01 20:14:39 -04:00
Matt Arsenault
18b8fec7cf LangRef: Fix sphinx error 2023-09-01 20:14:39 -04:00
Xiang Li
c21cd168bb
[DirectX backend] avoid generate redundant bitcast in DXILPrepareModule (#65163)
When emit NoOp bitcast for GEP Ptr Operand, should use SourceElementType
instead of ResultElementType.

**Behavior Before Change**
Redundant bitcast like 
   ` bitcast ptr addrspace(3) @gs to ptr addrspace(3)`
 will be generated for llvm/test/CodeGen/DirectX/typed_ptr.ll

**Behavior After Change**
  No bitcast will be generated.

Fixes https://github.com/llvm/llvm-project/issues/65183
2023-09-01 20:08:39 -04:00
Brad Smith
69d79f1f77 [Support] Implement getMainExecutable for OpenBSD
This uses just argv[0] on OpenBSD. OpenBSD does not support the /proc filesystem.

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D159168
2023-09-01 19:47:28 -04:00
Matt Arsenault
b14e83d1a4 IR: Add llvm.exp10 intrinsic
We currently have log, log2, log10, exp and exp2 intrinsics. Add exp10
to fix this asymmetry. AMDGPU already has most of the code for f32
exp10 expansion implemented alongside exp, so the current
implementation is duplicating nearly identical effort between the
compiler and library which is inconvenient.

https://reviews.llvm.org/D157871
2023-09-01 19:45:03 -04:00
LLVM GN Syncbot
d06bd25524 [gn build] Port e0829739bc77 2023-09-01 23:34:49 +00:00
Joseph Huber
e0829739bc [Clang][libc] Add wrapper headers for assert.h for the GPU libc
Summary:
This patch adds the `assert.h` wrapper header. I forgot to include this
in the last patch.
2023-09-01 18:34:09 -05:00
Tobias Hieta
63b29114f1
[Docs] Update documentation for the new GitHub workflow (#65162)
This adds first version of a GitHub workflow in the documentation and marks some
sections as deprecated. We should clean up these sections ASAP. I was
just keen to get something on the documentation site as soon as
possible.
2023-09-01 16:31:44 -07:00
Mogball
930916c7f3 [MLIR][PDL] Add PDLL support for negated native constraints
This commit enables the expression of negated native constraints in PDLL:

If a constraint is prefixed with "not" it is parsed as a negated constraint and hence the attribute `isNegated` of the emitted `pdl.apply_native_constraint` operation is set to `true`.
In first instance this is only supported for the calling of external native C++ constraints and generation of PDL patterns.

Previously, negating a native constraint would have  been handled by creating an additional native call, e.g.
```PDLL
Constraint checkA(input: Attr);
Constarint checkNotA(input: Attr);
```
or by including an explicit additional operand for negation, e.g.
`Constraint checkA(input: Attr, negated: Attr);`

With this a constraint can simply be negated by prefixing it with `not`. e.g.
```PDLL
Constraint simpleConstraint(op: Op);

Pattern example {
    let inputOp = op<test.bar>() ->(type: Type);
    let root = op<test.foo>(inputOp.0) -> ();
    not simpleConstraint(inputOp);
    simpleConstraint(root);
    erase root;
}
```

Depends on [[ https://reviews.llvm.org/D153871 | D153871 ]]

Reviewed By: Mogball

Differential Revision: https://reviews.llvm.org/D153959
2023-09-01 23:12:16 +00:00