[LangRef] Clarify requirement for non-pow-2 align bundle (#195631)
Now that null pointers are not necessarily zero pointers, I believe that
`"align"` with a non-power-of-two alignment should be requiring a zero
pointer specifically, not a null pointer.
This is because a zero pointer is aligned for any alignment (which we
can generalize to non-power-of-two alignments), while a -1 null pointer
only has alignment 1.
[analyzer][NFC] Merge `BlockInvocationContext` class into `StackFrameContext` (#194857)
At the moment, the execution stack in the analyzer is represented with
the `LocationContext` base class and its two sub-classes
`StackFrameContext` and `BlockInvocationContext`. This hierarchy,
however, is more complicated than necessary and, in issue #190973, a
roadmap was created to reduce this hierarchy down to just a single
`StackFrame` class.
This patch implements the first five steps of that roadmap.
Specifically, the functionality of `BlockInvocationContext` was merged
into the `StackFrameContext` class and the `BlockInvocationContext`
class was removed together with its usages.
[clang][docs] Rename Hexagon HVX option section (#195560)
There were two `hexagon` sections in the docs, but the second one was
just the hvx flags so I renamed that one to `hexagon hvx`.
Fixes #194072
[SLP] Check for instruction before casting
Values can be transformed during earlier attempts for vectorization, so
need to check if they are still instructions to avoid a compiler crash.
Fixes #195607
Reviewers:
Pull Request: https://github.com/llvm/llvm-project/pull/195635
Thread Safety Analysis: Support attributes on function pointers (#191187)
Allow acquire_capability, release_capability, requires_capability,
try_acquire_capability, assert_capability, and locks_excluded attributes
(incl. their shared variants) on function pointer variables and struct
fields. Calls through annotated function pointers are checked the same
way as direct function calls.
The attributes are placed on variable/field declarations, not on the
function pointer type itself. This is a deliberate trade-off: making
these "attributes" part of the type system would require diagnosing
mismatched assignments, which would be a significant type-system
extension with limited practical benefit, which would likely require
promoting the TSA vocabulary to full type-qualifiers. Instead, the
analysis trusts the annotations on the variable at the call site, and
sticks with the attribute-based semantics. This matches the existing
philosophy where the analysis tries to avoid false positives where
possible and attribute mismatches on direct functions are likewise not
hard errors or warnings (yet).
[5 lines not shown]
[MIPS] Remove InstrItinClass definitions and MipsSchedule.td (#188010)
Align Mips Targets with the rest of Architectures.
---------
Co-authored-by: Uros Stajic <uros.stajic at htecgroup.com>
[DebugInfo] Verify DISubprogram has a type (#194556)
Require DISubprogram metadata to carry a non-null type in the verifier.
LangRef specifies that the `type:` field of `DISubprogram` points to a
`DISubroutineType`. This patch diagnoses malformed debug info where the
field is omitted or resolves to null, while preserving the existing wrong-type
diagnostic for non-DISubroutineType operands.
Update hand-written LLVM IR tests to use valid DISubprogram metadata
where they are not intentionally testing malformed debug info. These tests now
use minimal DISubroutineType metadata so the new verifier check does not mask
their original coverage.
Fixes #186557
[EarlyCSE] Support memset loads (#194268)
This PR addresses the zero-`memset` case in EarlyCSE as discussed in
#194080. If we do a `memset` of zero and then load back from the same
base pointer, we can fold that load to `null`.
[OpenMP][mlir] Add DynGroupPrivateClause in omp dialect (#153562)
- The `dyn_groupprivate` clause allows to dynamically allocate
group-private memory in OpenMP parallel regions, specifically for
`target` and `teams` directives.
- This clause enables runtime-sized private memory allocation and
applicable to target and teams ops.
This PR enables dyn_groupprivate clause in openmp mlir dialect and adds
it to Teams and Target ops. Also includes parser, printer and
verification for clause.
[clang][bytecode] Diagnose copying empty mutable unions (#195529)
We had a special case for copy/move ctors of empty unions. Remove that.
Everything else is just so we don't regress diagnostics.
[X86] vector-reduce-* - add 32-bit test coverage to the minmax tests (#195617)
The horizontal-reduce-* tests already have 32-bit coverage but they will be retired soon.