[PAC][libunwind] Pass ptrauth-qualified values as const references (#173765)
For Apple's arm64e or Linux's pauthtest, `Registers_arm64::link_reg_t`
type is `__ptrauth`-qualified. When passing a value of such a type to a
function accepting non-`__ptrauth`-qualified parameter with `pint_t`
type, an authentication is performed. So, the corresponding callee
argument does not contain an embedded signature, making it prone to
substitution if spilled to the stack.
This patch prevents early authentication of signed values of
`link_reg_t` type by passing them as const l-value references instead of
passing by value with type `pint_t`. This way, the callee would operate
with a `__ptrauth`-qualified value containing a signature, allowing to
detect a substitution if the value is spilled to the stack.
Note that this approach was introduced previously in #143230 for some
other functions. In this patch, we apply the approach to the functions
which were not considered previously.
[ADT] Allow `TypeSwitch::Default` for `FailureOr<T>` (#174119)
Support specifying the default value without having to write a lambda,
e.g.: `.Default(failure());`.
[CodeGen] Add assertion to MachineBasicBlock::addLiveIn and friends (#140527)
Assert that the MCRegister passed into addLiveIn, removeLiveIn, isLiveIn
and computeRegisterLiveness is physical.
[flang] Represent use statement in fir. (#168106)
We have a longstanding issue in debug info that use statement is not
fully respected. The problem has been described in
https://github.com/llvm/llvm-project/issues/160923. This is first part
of the effort to address this issue. This PR adds infrastructure to emit
`use` statement information in FIR, which will be used by subsequent
patches to generate DWARF debug information.
The information about use statement is collected during semantic
analysis and stored in `PreservedUseStmt` objects. During lowering,
`fir.use_stmt` operations are emitted for each `PreservedUseStmt`
object. The `fir.use_stmt` operation captures the module name, `only`
list symbols, and any renames specified in the use statement. The
`fir.use_stmt` is removed during `CodeGen`.
[mlir][IR][NFC] Add `RewriterBase::eraseOpResults` convenience helper (#174152)
There are various places in the code base where op results are removed.
E.g., some canonicalization patterns remove op results. This commit adds
a new helper function to `RewriterBase` to reduce code duplication and
simplify patterns. The existing implementation from
`RemoveDeadValues.cpp` is moved into the rewriter API.
There is now a uniform API for removing operands and values:
* `Block::eraseArguments(BitVector)`
* `Operation::eraseOperands(BitVector)`
* NEW: `RewriterBase::eraseOpResults(Operation *, BitVector)`
This commit is preparation of adding new canonicalizations for
region-based ops, which will add yet another place where op results must
be erased.
[MLIR][OpenMP] Fix type mismatch in linear clause for INTEGER(8) variables (#173982)
Fixes #173332
The compiler was crashing when compiling OpenMP `parallel do simd` with
a `linear` clause on `INTEGER(8)` variables. The assertion failure
occurred during MLIR-to-LLVM translation:
Cannot create binary operator with two operands of differing type!
**Root Cause:**
The bug was in `LinearClauseProcessor::updateLinearVar()` where the step
value (i32) and induction variable were multiplied without normalizing
to the linear variable's type (i64), causing type mismatches in LLVM IR
generation.
**Solution:**
Updated the translation logic to cast both the induction variable and
step value to `linearVarTypes[index]` before performing arithmetic
operations. This ensures type consistency for both integer and
[7 lines not shown]
ftp/ftpcopy: fix build on ARM64 and refresh
With GCC14 now being pulled in on non-i386 non-amd64 platforms,
the compiler is stricter about prototypes.
I think all our base compilers should be good enough, but some
platforms don't seem to allow regparm, so patch that out.
Pull up the following, requested by mrg in ticket #1992:
external/mit/xkbcomp/dist/COPYING up to 1.1.1.2
external/mit/xkbcomp/dist/ChangeLog up to 1.1.1.16
external/mit/xkbcomp/dist/Makefile.am up to 1.1.1.8
external/mit/xkbcomp/dist/Makefile.in up to 1.1.1.14
external/mit/xkbcomp/dist/README up to 1.1.1.4
external/mit/xkbcomp/dist/aclocal.m4 up to 1.1.1.15
external/mit/xkbcomp/dist/action.c up to 1.1.1.5
external/mit/xkbcomp/dist/action.h up to 1.1.1.5
external/mit/xkbcomp/dist/alias.c up to 1.1.1.6
external/mit/xkbcomp/dist/alias.h up to 1.1.1.4
external/mit/xkbcomp/dist/compat.c up to 1.1.1.9
external/mit/xkbcomp/dist/compile up to 1.1.1.7
external/mit/xkbcomp/dist/config.guess up to 1.1.1.14
external/mit/xkbcomp/dist/config.h.in up to 1.1.1.6
external/mit/xkbcomp/dist/config.sub up to 1.1.1.14
external/mit/xkbcomp/dist/configure up to 1.1.1.16
external/mit/xkbcomp/dist/configure.ac up to 1.1.1.16
[38 lines not shown]
[NVPTX] Add missing preconditions to tensormap replace tests (#174190)
This change adds preconditions for the ISA and SM versions to the
`ptxas` RUN lines for the tests added in
14b1d770db7f9ee49693063ad851215dede0766e which were accidentally
omitted.
Pull up the following, requested by mrg in ticket #1213:
external/mit/xkbcomp/dist/man/meson.build up to 1.1.1.1
external/mit/xkbcomp/dist/meson.build up to 1.1.1.1
external/mit/xkbcomp/dist/meson.options up to 1.1.1.1
external/mit/xkbcomp/dist/ChangeLog up to 1.1.1.16
external/mit/xkbcomp/dist/Makefile.am up to 1.1.1.8
external/mit/xkbcomp/dist/Makefile.in up to 1.1.1.14
external/mit/xkbcomp/dist/aclocal.m4 up to 1.1.1.15
external/mit/xkbcomp/dist/action.c up to 1.1.1.5
external/mit/xkbcomp/dist/action.h up to 1.1.1.5
external/mit/xkbcomp/dist/alias.c up to 1.1.1.6
external/mit/xkbcomp/dist/alias.h up to 1.1.1.4
external/mit/xkbcomp/dist/compat.c up to 1.1.1.9
external/mit/xkbcomp/dist/compile up to 1.1.1.7
external/mit/xkbcomp/dist/config.guess up to 1.1.1.14
external/mit/xkbcomp/dist/config.h.in up to 1.1.1.6
external/mit/xkbcomp/dist/config.sub up to 1.1.1.14
external/mit/xkbcomp/dist/configure up to 1.1.1.16
[37 lines not shown]
[clang][bytecode] Check builtin_memchr for non-block pointers earlier (#174192)
The getType() call might fail. We can't pull the isReadable() check up
though because that creates different diagnostic output compared to the
current interpreter.
Fixes #172202
[clang][bytecode] Check for null Record (#174193)
This is an error case that results in a null Record, so don't crash
later in that case.
Fixes #173941