[orc-rt] De-duplicate some test helper APIs. (#187187)
Moves noErrors, mockExecutorProcessInfo, and NoDispatcher into
CommonTestUtils.h where they can be re-used between tests.
[clang] Reshuffle compiler options in C++ DR tests
This patch changes the order of compiler options on RUN lines so that options that differ in length (like -verify with its multiple prefixes) are at the end. This way it's much easier to see what is common and what is different between RUN lines
[mlir][x86] Lower packed type vector.contract to AMX dot-product (#182810)
A transform pass to lower `vector.contract` operation to (a)
`amx.tile_mulf` for BF16, or (b) `amx.tile_muli` for Int8 packed types.
[flang][mlir][OpenMP] Add linear modifier (val, ref, uval)
Add support for OpenMP linear modifiers `val`, `ref`, and `uval`
as defined in OpenMP 5.2 (5.4.6).
[ELF] Orphan placement: remove hasInputSections condition
https://reviews.llvm.org/D60131 (Change default output section type to
SHT_PROGBITS) caused a orphan placement regression for Fuchsia
`zircon.elf`: #40998 The orphan section `code_patch_table` was placed
before the first output section description `.text.boot0`, breaking the
address requirement.
https://reviews.llvm.org/D61197 (Fix getRankProximity to "ignore" not
live sections) fixed the regression by adding a `Live` condition (which
later became `hasInputSections`).
This condition added complexity, which turns out to be unneeded after
* 3bdc90e3ff4c9a18caeb3e6ad40fa5d15bbf9d5e ("[ELF] adjustOutputSections: update sortRank. NFC")
* 747d670baef35f0615b32652e93c97a2ff8dba18 ("[ELF] Make .interp/SHT_NOTE not special")
* #94099
The new orphan placement rule is slightly different (orphans can be
[12 lines not shown]
[OFFLOAD] Improve handling of synchronization errors in L0 plugin and reenable tests (#186927)
This change improves handling of errors during synchronization in Level
Zero plugin by ensuring cleanup of queues and events in case of an
synchronization error. As a result multiple tests stopped hanging.
---------
Co-authored-by: Duran, Alex <alejandro.duran at intel.com>
[DA] Rewrite formula in the Weak Zero SIV tests (#183738)
This patch rewrites the formula in the Weak Zero SIV tests to match the
one used in the Strong SIV test that was updated in #179665. In this
form, `ConstantRange` is used so we don't need to pay attention to any
corner cases such as overflow.
Fix some test cases that were added in the past PRs to represent the
edge cases.
[DA] Fix overflow in symbolic RDIV test (#185805)
The symbolic RDIV test relies on computing the extremes of affine
expressions (e.g., `A1*N1` and `A2*N2`) to disprove dependencies. These
calculations were previously done using `SE->getMulExpr` and
`SE->getMinusSCEV` without guarding against signed integer overflow. If
large coefficients or loop bounds cause a wrap, `isKnownPredicate`
evaluates the wrapped values, potentially disproving a valid dependence
and leading to miscompilations.
This patch reimplements symbolicRDIVtest using `ConstantRange` to work
around overflows.
---------
Signed-off-by: Ruoyu Qiu <cabbaken at outlook.com>
Co-authored-by: Ryotaro Kasuga <kasuga.ryotaro at fujitsu.com>
[NFC][PowerPC] Pre-commit to optimize bswap64 builtin for power8 (#181776)
The current codegen (for power 8 targets specifically) does not make use
of the parallelism and does most of the operations sequentially.
This will be optimized in a future patch which will follow this NFC PR.
It will enhance the performance and also save us instructions.
---------
Co-authored-by: himadhith <himadhith.v at ibm.com>
[libclang/python] Add type annotations to the TranslationUnit class (#180876)
This adds type annotations to the `TranslationUnit` class, enough to
pass a strict typecheck. This resolves 19 strict typing errors as the
next step towards https://github.com/llvm/llvm-project/issues/76664
[mlir-python] Fix duplicate EnumAttr builder registration across dialects.
When multiple dialects share .td includes (e.g. affine includes arith),
each dialect's _*_enum_gen.py file registered attribute builders under
the same keys, causing "already registered" errors on the second import.
Two-pronged fix:
1. Add `allow_existing=True` to `register_attribute_builder` (and the
underlying C++ `registerAttributeBuilder`). When set, silently skips
registration if the key already exists (first-wins semantics). This
handles EnumInfo-based builders (e.g. `AtomicRMWKindAttr`,
`Arith_CmpFPredicateAttr`) that are emitted by every dialect whose
.td file includes the defining file.
2. Filter EnumAttr-loop builders by `-bind-dialect` in
`EnumPythonBindingGen.cpp` and register them under dialect-qualified
keys (`"dialect.AttrName"`). Update `OpPythonBindingGen.cpp` to look
up the same qualified keys for EnumAttr-typed op attributes (detected
[5 lines not shown]
[clang][Driver][Darwin] Use `xcselect` for `*-apple-darwin*` targets too (#186683)
This is a follow-up to #119670. There, we introduced a CMake option
`CLANG_USE_XCSELECT`, which, when enabled, uses `libxcselect` to find
the right SDK to inject as an `-isysroot` flag when targeting
`*-apple-macos*`.
We intentionally left out `*-apple-darwin*` targets because it broke
many tests. This is unfortunate because `*-apple-darwin*` is the default
triple when building LLVM on macOS, so one isn't able to take advantage
of `xcselect` without an explicit `-target` flag or a change to the
toolchain's default target.
We fix this in two ways.
First, we move the injection of the `-isysroot` flag using `xcselect`
later, until after we are sure that we are targeting macOS. This avoids
confusing the earlier deployment target detection code when we inject
the macOS SDK but actually intended to target non-macOS.
[3 lines not shown]
Remove the last vestigal remains of the simulated software interrupt
register, or "ssir". The NetBSD kernel long ago adopted a software
interrupt thread model along with a "fast software interrupts" mechanism
that m68k platforms do not (yet) implement, but a few m68k platforms
were still consuling an "ssir" variable in the return from every exception
that nothing ever set.
This cleanup paves the way for futher consolidation of m68k trap handling
code in future commits.
[orc-rt] Add BootstrapInfo: info for controller session bootstrap. (#187184)
BootstrapInfo holds information needed to bootstrap the ExecutionSession
in the controller. Future patches will update ControllerAccess to send
the bootstrap information at controller-connection time.
BootstrapInfo includes information about the executor process (via
Session::processInfo), an initial set of symbols (replacing
Session::controllerInterface()), and a simple key/value store.
[clang][RISCV] Add RequiredFeatures for zvknha and zvknhb (#186993)
zvknhb now implies zvknha so we dont need to check extensions manually
in SemaRISCV, we can just use RequiredFeatures instead.
[X86] Support reserving EDI on x86-32 (#186123)
Which is under discussion in
https://github.com/llvm/llvm-project/issues/179036.
x86-64 support is added in
https://github.com/llvm/llvm-project/pull/180242.
Now add x86-32 support for reserving EDI via `-ffixed-edi` Update the
X86 backend to respect those reservations in register handling,
callee-save logic, and memcpy/memset lowering, and add driver/codegen
tests.
Add clang driver support for -ffixed-edi and map it to the reserve-edi
target feature on i386.
Teach the X86 backend to treat EDI as a user-reserved register in
register lookup, reserved-register tracking, and callee-save handling,
and avoid selecting REP MOVS/REP STOS when EDI is reserved.
Add driver, Sema, and codegen tests covering option handling, named
[2 lines not shown]