[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
[CHR] Fix crash when marking merged condition unknown (#173902)
CHR builds the merged hot-path predicate with
IRBuilder::CreateLogicalAnd. That helper is implemented as a select and
can constant-fold to a non- Instruction (e.g. i1 true). The pass then
attempted to mark the merged condition as having explicitly unknown
branch weights when profile data is present, but it unconditionally did
cast<Instruction>(MergedCondition), which can crash in release builds.
Guard the metadata update with dyn_cast<Instruction> and pass the
containing Function explicitly to avoid calling Instruction::getFunction
when the value is not attached yet.
Add a regression test that exercises the constant-folding case.
Crashing stack:
```
2. Running pass "chr" on function "repro_crash"
[14 lines not shown]
ValueTracking: Improve handling of fadd in computeKnownFPClass.
This already recognized that if both inputs are positive, the
result is positive. Extend this to the mirror situation with
negative inputs.
Also special case fadd x, x. Canonically, fmul x, 2 is fadd x, x.
We can tell the sign bit won't change, and 0 will propagate.
ValueTracking: Add more baseline tests for computeKnownFPClass of fadd
Test cases with fadd x, x. Also test cases where both inputs are known
negative.
procfs - Don't reset fd offset when reading regs, fpregs, or dbregs files.
* For repeated reads, we can simply use pread(2). And this way, we allow for
normal shell tooling to work correctly on these procfs files.
* This also matches the behavior on NetBSD.