[SLP] Treat ExtractElement from terminator results as gather
When canReuseExtract sees an ExtractElement bundle whose source vector
is produced by a terminator instruction (invoke or callbr), the SLP
vectorizer used to mark the bundle as Vectorize and reuse the
terminator result as the bundle's vectorized value. For external uses
of the bundle, vectorizeTree later sets the IRBuilder insertion point
to next(VecI), which lands past the terminator and produces an invalid
CFG (a new extractelement is inserted after the terminator in the
predecessor block).
Fixes #199021
Reviewers:
Pull Request: https://github.com/llvm/llvm-project/pull/199089
[PowerPC] Change arguments of PPCEmitTimePseudo
Like #198861 but for PPCEmitTimePseudo.
This is not NFC. The asm name of LDtocBA was set to #LDtocCPT,
which is the name of the instruction before. This looks like a
cut`n`paste error, and I changed the asm name.
[flang][FIRToMemRef] Fixed array_coor with box/shape/slice. (#198933)
A `fir.array_coor` with box input, a slice and a shape without
a shift, should also be converted using dimensions information
stored in the input box (case (c) in the updated code).
[flang][OpenMP] Limit scope creation to constructs with data environment (#198780)
Identify specific constructs that require data envorinments, and only
create scopes for them. This avoids scopes for loop-transformation
constructs, for example.
This isn't a correctness fix, but a clarification and a simplification
of the name-resolution code for OpenMP.
[Driver][MSVC] Use LLD if DWARF is requested (#198600)
Clang can emit DWARF on Windows if requested with `-gdwarf` (or
`-gdwarf-N`). The generated object files will then have the `.debug_*`
sections. These section names are all larger than eight bytes. This
creates an issue in the final executable. PE/COFF executables don't
allow section names longer than eight characters. From the
[docs](https://learn.microsoft.com/en-us/windows/win32/debug/pe-format#section-table-section-headers):
> **Name**: An 8-byte, null-padded UTF-8 encoded string. If the string
is exactly 8 characters long, there is no terminating null. For longer
names, this field contains a slash (/) that is followed by an ASCII
representation of a decimal number that is an offset into the string
table. Executable images do not use a string table and do not support
section names longer than 8 characters.
MSVC's linker follows this and will truncate section names in
executables. So a `.debug_info` would become `.debug_i`. LLD on the
other hand does allow these long section names (with a warning). This
[8 lines not shown]
[libc] Enable baremetal float printf using modular format (#198900)
The most best configuration for llvm-libc is for it to be used with a
recent clang. Accordingly, this patch enables floating point type
support in printf for baremetal without inflating code size by also
enabling modular printf support. This is safe for older clang and other
compilers, but it would increase code size for the default baremetal
configuration on such targets.
---------
Co-authored-by: Michael Jones <michaelrj at google.com>
Require explicit yield in iterator op
Remove the implicit terminator trait from omp.iterator so iterator
modifiers must explicitly yield the value used to form the iterated list.
Add and update verfier and test accordingly.
Simplify map iterator clause assembly
- Split MLIR map syntax into separate map_entries(...) and map_iterated(...),
removing the custom MapEntryList parser/printer.
- Moved omp.target map_iterated out of TargetOpRegion
- it now prints before the target region instead of as map_iterated_entries(...) after the region.
- Renamed LLVMIR TODO helper to clause-style checkMap.
- Added DeclareMapperInfoOp builder from DeclareMapperInfoOperands
and updated Flang call sites so they do not need to spell out newly
added operands..
Reject target map iterators without captures
Reject target map iterators until the follow-up capture-binding
representation is added since currently map_iterated on omp.target
only represents the dynamic map list and does not consider the
target-region arguments required by IsolatedFromAbove.
[flang][AddAliasTags] Fix segfault when type contains `fir.boxproc` (#198997)
`fir.boxproc` currently has no LLVM representation (its converter
returns `std::nullopt`). When `AddAliasTags` called
`getTypeSizeAndAlignment` on a type containing `fir.boxproc` (e.g. a
sequence of a derived type with procedure pointer components),
`convertRecordType` and `convertSequenceType` would crash trying to
mlir::cast a null type.
For any type that might recursively contain a non-convertible type
(`fir.boxproc` in this case), `TypeConverter` would now propagate an
empty optional `mlir::Type` and emit a debug warning that conversion
failed. This helps us avoid seg faulting expecting that the type or some
part of it were converted correctly.
Co-Authored-By: Claude Sonnet 4.6 <noreply at anthropic.com>
---------
Co-authored-by: Claude Sonnet 4.6 <noreply at anthropic.com>