[cmake][compiler-rt] Define _DEFAULT_SOURCE instead of enabling extensions (#163377)
GNU extensions are a bit of a hammer approach to enabling access to POSIX extensions.
Instead we can define _DEFAULT_SOURCE ourselves where necessary, which is what the extensions
mechanism does.
See: #110555
[NFC][support]Add operator- to TimeRecord (#163361)
A common use case for the Timer is to measure time duration between two
points. Lack of operator- forced an non-intuitive two-step duration
computation: get the end time, then decrement it by the start time.
Now, as demonstrated on the example of `SyntaxCheckTimer` and
`ExprEngineTimer` one can compute duration directly.
[flang][OpenMP] Move check of ALIGN clause to visitor function (#164261)
This replaces CheckAlignValue with an Enter function, and adds a check
that the alignment is a power of 2.
[mlir][spirv] Remove `function-decorations-asserts.mlir` (#164383)
The test is fragile as it relies on the `--debug` flag to test an
internal behaviour. This addresses discussion in #164319.
[CIR] Add support for atomic test-and-set and atomic clear (#164162)
This patch adds support for the following atomic builtin functions:
- `__atomic_test_and_set`
- `__atomic_clear`
[clang][bytecode] Move shared interp functions to InterpHelpers.h (#164215)
This drastically reduces the preprocessed size of Context.cpp and
InterpBuiltin.cpp.
[Windows] Fix Registry static data members not exported by extract_symbols.py in static builds with plugin support (#163391)
When building LLVM statically (without BUILD_SHARED_LIBS) on Windows with
LLVM_EXPORT_SYMBOLS_FOR_PLUGINS=ON, external plugins cannot register through
llvm::Registry<clang::PluginASTAction> because:
Static data members (Head, Tail) are filtered out during symbol export by
extract_symbols.py because they don't match the function signature patterns
that the script looks for.
This patch fixes the issue by adding pattern matching to extract_symbols.py
to recognize and export Registry static data members.
Note: When LLVM is built with /Zc:dllexportInlines-, inlined functions
aren't exported as symbols, and the plugin must also compile with
/Zc:dllexportInlines- to inline them instead of referencing non-exported
symbols.
Fixes #163367
[LLDB][PDB] Run `pointers.test` with both plugins (#163623)
The `pointers.test` was only run with the DIA plugin. I made the
following changes:
- Remove the check for the function type.
The types of the function are different in the plugins:
```
Native:
Type{0x00010084} , size = 0, compiler_type = 0x00000209aff60060 int
(int) __attribute__((thiscall))
DIA:
Type{0x0000000a} , name = "f", decl = PointerTypeTest.cpp:8,
compiler_type = 0x0000020bc22356c0 int (int) __attribute__((thiscall))
```
In DIA, each function gets its own type with a name and decl. In the
native plugin, only one unnamed type is created per signature. This
matches DWARF.
- The check for the `struct ST` fields was split, because the order of
[18 lines not shown]
[LLDB][PDB] Split `func-symbols.test` between DIA and native (#163733)
The test checks that functions have the correct type assigned. Because
of the differences between the two PDB plugins, I split the test.
DIA creates one named `Type` per function and uses identical UIDs for
`Type` and `Function`, whereas native creates one unnamed type per
signature and has different UIDs.
The native test has the same input and checks the same functions.
I also removed the `target-windows` requirement from the test, since it
only uses `lldb-test`.
[flang] Fix dumping type names for clang in DumpEvExpr (#164256)
The gcc/clang implementation uses __PRETTY_FUNCTION__ to generate
the full function name, and then extracts the type name from it. GCC
emits the type name in the form of
[with T = <type-name>...]
whereas clang uses
[T = <type-name>...]
The current code looked for "with T =" to get the location of the type
name, which did not work in clang-generated code.
[mlir][sve] Extend the e2e test for linalg.pack + linalg.unpack (#158094)
Adds vectorization of `linalg.unpack` to:
* test/Integration/Dialect/Linalg/CPU/ArmSVE/pack-unpack-scalable-inner-tile.mlir
The original configuration that didn't use vectorization is preserved as
reference and also to make sure we exercise all relevant code paths
(*). To this end, the TD sequence has be refactored out into a dedicated
file. The payload IR has not changed.
NOTE - ATM only vectorization of `linalg.unpack` is supported.
Vectorizing `linalg.pack` is left as a TODO.
(*) It remains valid to use scalable tile sizes in Linalg Ops even when
vectorization is not enabled.
[PowerPC] Remove `UnsafeFPMath` uses (#154901)
Try to remove `UnsafeFPMath` uses in PowerPC backend. These global flags
block some improvements like
https://discourse.llvm.org/t/rfc-honor-pragmas-with-ffp-contract-fast/80797.
Remove them incrementally.
FP operations may raise exceptions are replaced by constrained
intrinsics. However, vector type is not supported by these intrinsics.
[X86] Cast atomic vectors in IR to support floats
This commit casts floats to ints in an atomic load during AtomicExpand to support
floating point types. It also is required to support 128 bit vectors in SSE/AVX.
[AtomicExpand] Add bitcasts when expanding load atomic vector
AtomicExpand fails for aligned `load atomic <n x T>` because it
does not find a compatible library call. This change adds appropriate
bitcasts so that the call can be lowered. It also adds support for
128 bit lowering in tablegen to support SSE/AVX.