[analyzer] Implement BugReporterVisitor for UseAfterLifetimeEnd to trace lifetime source binding (#207052)
Currently the `UseAfterLifetimeEnd` checker can emit warnings, but those
warnings cannot clearly describe to which annotated parameter the return
value is actually bound. When multiple parameters are annotated, it is
unclear which one the return value is bound to. Using
`BugReporterVisitor` to trace back the nodes and emit a note that
explains where the lifetime of the annotated parameter (the source)
ended can be helpful for users.
***NOTE***: This PR is built on #205951. It should only be merged after
#205951 is merged.
Consider the following case:
```cpp
#include <stddef.h>
class Arena {
[39 lines not shown]
[ConstFold] Fold fixed-vectors in constantFoldIntrinsic (#213625)
This exposes an underlying bug in wasm.dot-folding, which we fix. The
motivation for this patch is to enable folding of get.active.lane.mask
in VPlan in a follow-up.
Fix llvm-mlir-use-after-erase findings (#210733)
Fix the following warnings identified by the `llvm-mlir-use-after-erase`
check from https://github.com/llvm/llvm-project/pull/210727:
```cpp
mlir/lib/Transforms/Utils/DialectConversion.cpp:2700:33: warning: operation 'op' is used after it was erased [llvm-mlir-use-after-erase]
2700 | curState, std::string(op->getName().getStringRef()) + " folder");
| ^
mlir/lib/Transforms/Utils/DialectConversion.cpp:2685:12: note: operation erased here
2685 | rewriter.replaceOp(op, replacementValues);
| ^
mlir/lib/Dialect/MemRef/Transforms/NormalizeMemRefs.cpp:440:29: warning: operation 'newOp' is used after it was erased [llvm-mlir-use-after-erase]
440 | Value newMemRef = newOp->getResult(resIndex);
| ^
mlir/lib/Dialect/MemRef/Transforms/NormalizeMemRefs.cpp:459:20: note: operation erased here
459 | newOp->erase();
| ^
mlir/lib/Dialect/MemRef/Transforms/NormalizeMemRefs.cpp:440:29: note: the use happens in a later loop iteration than the erase
[6 lines not shown]
[AArch64][SVE] Fold nested boolean UMIN trees (#209234)
Fold redundant UMIN clamps in logical boolean reduction trees when all
operations use the same predicate.
[SPIRV] Drive DebugFunctionDefinition placement via begin/endInstruction
Replace the SPIRV-specific notifyMachineInstructionEmitted() callback with
DebugHandlerBase::beginInstruction()/endInstruction().
Keep notifyEntryLabelEmitted() for the synthesized entry OpLabel, which
has no MachineInstr.
[AArch64][GlobalISel] Select narrow GPR constants (#204322)
Select non-zero s8/s16 GPR constants as 32-bit MOV immediates during
instruction selection.
RegBankSelect already does this, but this gives instruction selection a
direct path instead of falling back which will help enable a simple fast
pure type-based RBS alternative.
Assisted-by: codex
[lldb] Convert all the tests to use require decorator (#213467)
This is a follow up to https://github.com/llvm/llvm-project/pull/212753
to convert all the tests to use the `@require` decorator.
[lldb][lldb-server] Update the expected gdbserver's architecture (#210946)
gdbserver recognises 'x86_64' arch as 'i386:x86-64', this prevents gdb
(binary) from connecting to lldb-server since lldb-server reports
architecture as 'x86_64'. we already do something similar when
connecting a server to lldb.
This does not affect lldb -> lldb-server since we use qHostInfo to get
that information.
[runtimes][cmake] Probe Fortran intrinsic modules for the target triple (#211137)
Fixes #211134.
`check_fortran_builtins_available()` probes for Fortran intrinsic
modules without passing the target triple, in both branches: the
`-print-file-name=iso_c_binding.mod` query runs the driver with no
`--target`, and the `check_fortran_source_compiles()` fallback uses
`try_compile()`, which does not inherit `CMAKE_Fortran_COMPILER_TARGET`.
Flang's intrinsic modules are built per-target by flang-rt. When a
runtime is configured for a GPU target without flang-rt in its runtime
list, both probes test the host and succeed, so
`RUNTIMES_FORTRAN_MODULES` is enabled for a target that cannot support
it. `LIBOMP_FORTRAN_MODULES` inherits that and the failure is deferred
to a cascade of BIND(C) diagnostics compiling `omp_lib.F90`, all
stemming from one missing-module error.
Pass the triple to both probes so the existing graceful-degradation path
[36 lines not shown]