[clang] Add `-verify-directives` cc1 flag (#179835)
Matheus once told me that the various rules I enforce in C++ DR tests
should be checked automatically. This is the patch to check some of
them.
`-verify-directives` is a cc1 flag that checks how `expected` directives
themselves are written. It enforces the following rules on top of
`-verify` mode:
1. Directives have to fully match diagnostic text (but regular
expressions are still allowed).
2. Lexical order of directives must match the order in which diagnostics
are emitted.
3. Each directive must match exactly one diagnostic.
4. Directives has to specify exact source location of the diagnostic,
i.e. wildcards (`*`) are not allowed.
The second rule (about order) is the most significant: it doesn't allow
to e.g. have `expected-note {{declared here}}` somewhere far away from
[20 lines not shown]
[orc-rt] Rename SimpleSymbolTable::addSymbolsUnique, relax error cond… (#187171)
…ition.
Renames the SimpleSymbolTable addSymbolsUnique method to addUnique. The
new class name (from c727cd9a4b2) already implies that we're adding
symbols.
This commit also relaxes the error condition for addUnique: Rather than
rejecting any duplicate symbols, it only rejects symbols that were
previously added with a different address. This makes it safe to add the
same symbol(s) multiple time, as long as all definitions point to the
same address. The intent of this is to allow ORC runtime components to
unconditionally add their interfaces to symbols, even if that interface
might have been added previously.
[WebAssembly] Fold sign-extending shifts into signed loads in FastISel (#185906)
WebAssembly FastISel currently fails to fold sign-extension patterns
composed of zero-extending loads followed by shift operations. This
results in redundant shift and constant instructions in the output.
Before:
i32.load8_u $push3=, 0($0)
i32.const $push0=, 24
i32.shl $push1=, $pop3, $pop0
i32.const $push4=, 24
i32.shr_s $push2=, $pop1, $pop4
The matched shift instruction sequence is removed and safely folded into
a single sign-extending load, erasing the dead code via the
MachineBasicBlock iterator.
After:
i32.load8_s $push0=, 0($0)
Fixed: #184302
[NVPTX][AutoUpgrade] atom.load intrinsics should be autoupgraded to monotonic atomicrmw for NVPTX (#187140)
Prior to https://github.com/llvm/llvm-project/pull/179553, the seq_cst
qualifier was being ignored. The expected codegen for these intrinsics
is `atom.relaxed`- which corresponds to `Monotonic`. The fix does to
AutoUpgrade what https://github.com/llvm/llvm-project/pull/185822 does
to clang.
Revert "[LV] Replace remaining LogicalAnd to vp.merge in EVL optimization." (#187170)
Reverts llvm/llvm-project#184068
This hit the cost model assertion in rva23 stage2 build bot.
https://lab.llvm.org/buildbot/#/builders/213/builds/2497
[LV] Replace remaining LogicalAnd to vp.merge in EVL optimization. (#184068)
This patch replace the remaining LogicalAnd to vp.merge in the second
pass to not break the `m_RemoveMask` pattern in the optimizeMaskToEVL.
This can help to remove header mask for FindLast reduction (CSA) loops.
PR: https://github.com/llvm/llvm-project/pull/184068
[CIR] Implement abstract conditional operator handling for aggregates (#186284)
This implements AggExprEmitter::VisitAbstractConditionalOperator for
CIR.
[CIR] Add handling for nounwind attributes (#187096)
This adds support for setting the `nounwind` attribute on declarations
and call sites in CIR.
Currently, we have both `nothrow` and `nounwind` in CIR. I've chosen to
use `nothrow` in this PR because it was the most common. I plan to
combine them, using `nounwind` everywhere since that's the LLVM IR
spelling, but that's a more invasive so I'd like to defer it to a future
change.
py-homeassistant: Rototill for NetBSD 10
and abandon NetBSD9 9. (If you are on 9 and trying to run HA, you
should update.)
Switch to py314, because HA has.
[lldb][Module] Don't try to locate scripting resources without a ScriptInterpreter (#187091)
I'm in the process of moving `SanitizedScriptingModuleName` into
`ScriptInterpreter` as a `virtual` API. The nullptr check inside the
constructor made that more difficult because it implied we may not have
a `ScriptInterpreter` available to call the sanitization API on. Really
the `nullptr` check is redundant because even if we succesfully sanitize
and then locate some scripts, `Module::LoadScriptingResourceInTarget`
bails out if we don't have a `ScriptInterpreter`.
This patch moves the early exit in `LoadScriptingResourceInTarget` to
before we make the call to `LocateExecutableScriptingResources`. That
way we ensure we never get to `SanitizedScriptingModuleName` without a
valid `ScriptInterpreter`.
[orc-rt] Add an ExecutorProcessInfo field to Session. (#187155)
This will provide a central location for ORC runtime code (and ORC
runtime API clients) to find executor process information.
[IR2Vec] Remove redundant death test for invalid TypeID (#187143)
The `NumericIDMapInvalidInputs` test has two `EXPECT_DEATH` calls for
invalid `Type::TypeID` values. The second value (`MaxTypeIDs + 10`) is
redundant: `getIndex` has a one-sided assert, so any value greater or
equal to `MaxTypeIDs` takes the same code path as the value already
tested by the first call.
The test began failing after
https://github.com/llvm/llvm-project/pull/186888, which introduced
`ByteTyID`. The value of `MaxTypeIDs + 10` became 32, which falls
outside the representable range of the `enum`, making the cast UB. To
avoid accidentally triggering this test when adding new types, it should
probably be removed.
[mlir][spirv] Add comparison and elementwise ternary ops in TOSA Ext Inst Set (#186356)
This patch introduces the following comparison and elementwise ternary
operators:
spirv.Tosa.Select
spirv.Tosa.Equal
spirv.Tosa.Greater
spirv.Tosa.GreaterEqual
Also dialect and serialization round-trip tests have been added.
Signed-off-by: Davide Grohmann <davide.grohmann at arm.com>