LLVM/project 402f7aellvm/lib/Target/AArch64 AArch64SVEInstrInfo.td AArch64TargetTransformInfo.cpp, llvm/test/CodeGen/AArch64 sve-mul-imm-add-adr.ll

[AArch64][SVE] add missing MLA commute instcombine
DeltaFile
+7-7llvm/test/Transforms/InstCombine/AArch64/sve-intrinsic-mla-one.ll
+0-11llvm/lib/Target/AArch64/AArch64SVEInstrInfo.td
+6-4llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
+6-3llvm/test/CodeGen/AArch64/sve-mul-imm-add-adr.ll
+3-3llvm/test/Transforms/InstCombine/AArch64/sve-intrinsic-mul-imm-add-adr.ll
+22-285 files

LLVM/project 096bfddllvm/test/Transforms/InstCombine/AArch64 sve-intrinsic-mul-imm-add-adr.ll

[AArch64][SVE] Add baseline mul imm InstCombine test
DeltaFile
+153-0llvm/test/Transforms/InstCombine/AArch64/sve-intrinsic-mul-imm-add-adr.ll
+153-01 files

LLVM/project 5672b0dclang/test/OpenMP nvptx_teams_reduction_codegen.cpp, llvm/docs ProgrammersManual.rst ProgrammersManual.md

Merge branch 'main' into users/kparzysz/m02-locator-frontend
DeltaFile
+5,126-0llvm/test/CodeGen/AMDGPU/sched-handleMoveUp-dead-def-join.mir
+0-4,257llvm/docs/ProgrammersManual.rst
+3,954-0llvm/docs/ProgrammersManual.md
+0-3,642clang/test/OpenMP/nvptx_teams_reduction_codegen.cpp
+0-2,502llvm/docs/CodeGenerator.rst
+0-2,490llvm/docs/SourceLevelDebugging.rst
+9,080-12,8911,629 files not shown
+74,247-47,6821,635 files

LLVM/project 36f12f9flang/lib/Optimizer/Transforms FIRToMemRef.cpp, flang/test/Transforms/FIRToMemRef slice-projected.mlir

[FIR] Route embox + projected complex slice through shapeVec (#205042)

When the array_coor base is a fir.embox with a projected complex %re/%im
slice, take the shapeVec path instead of the descriptor (fir.box_dims)
path. The descriptor path iterates source-rank dims while querying the
rank-reduced embox result box, which miscompiles slices that collapse
dims (e.g. complex(:,k)%re). For embox-derived boxes the underlying
storage is contiguous, so the shape-derived layout is both correct and
the natural place to encode that static shape is available. Non-embox
boxes (rebox, assumed-shape) still go through fir.box_dims.

Co-Authored-By: Claude Sonnet 4.6 <noreply at anthropic.com>

Co-authored-by: Claude Sonnet 4.6 <noreply at anthropic.com>
DeltaFile
+19-51flang/test/Transforms/FIRToMemRef/slice-projected.mlir
+2-13flang/lib/Optimizer/Transforms/FIRToMemRef.cpp
+21-642 files

LLVM/project 2b91b5bllvm/lib/Target/AArch64 AArch64SVEInstrInfo.td, llvm/test/CodeGen/AArch64 sve-mul-imm-add-adr.ll sve2-histcnt.ll

[AArch64][SVE] Use ADD/ADR instead of MUL/MLA for x*N (#198566)

Avoid `MUL`/`MLA` for all-active multiplies by small constants when
cheaper `ADD`/`ADR` sequences are available.

Vector multiplication (int32_t/uint32_t base types) by 2, 3, 5, 9 can be
done with ADD (for 2) ADR (for 3,5,9).
Similarly, operations of the form a + x * {1,2,4,8} can use ADR.
DeltaFile
+372-0llvm/test/CodeGen/AArch64/sve-mul-imm-add-adr.ll
+51-0llvm/lib/Target/AArch64/AArch64SVEInstrInfo.td
+1-3llvm/test/CodeGen/AArch64/sve2-histcnt.ll
+1-1llvm/test/CodeGen/AArch64/sve-intrinsics-int-arith-undef.ll
+425-44 files

LLVM/project 34ed491llvm/lib/Analysis ScalarEvolution.cpp, llvm/test/Analysis/LoopAccessAnalysis nssw-predicate-implied.ll

[SCEV] Infer addrec nowrap flags during range analysis (#202964)

When we're computing the range of the addrec, we already have to reason
about whether it wraps, so we may as well determine the nowrap flags at
the same time.

This is more precise than the previous logic that took the addrec range
and checked whether adding a step to it does not wrap. For example, an
`{0,+,1}` addrec with a full range can still be non-wrapping.

Note that I removed some assertions in the SCEV printed that predicated
exit counts actually have predicates. Due to SCEV's query order
dependence, this can happen, also prior to this change, see for example
https://llvm.godbolt.org/z/cWK1MMEqv. While this indicates suboptimal
results, it's not a bug, and we should not assert.

Fixes https://github.com/llvm/llvm-project/issues/200788.
DeltaFile
+123-133llvm/test/Transforms/LoopVectorize/iv-select-cmp-trunc.ll
+102-110llvm/test/CodeGen/PowerPC/mma-intrinsics.ll
+62-68llvm/lib/Analysis/ScalarEvolution.cpp
+54-54llvm/test/Analysis/ScalarEvolution/exit-count-select-safe.ll
+26-26llvm/test/Analysis/LoopAccessAnalysis/nssw-predicate-implied.ll
+12-27llvm/test/Transforms/LoopVectorize/RISCV/masked_gather_scatter.ll
+379-41835 files not shown
+555-61141 files

LLVM/project 14840afflang/lib/Semantics check-omp-structure.cpp, flang/test/Semantics/OpenMP if-clause.f90 if-clause-50.f90

[flang][OpenMP] Check that IF clause applies to at most one leaf (#205164)

This also allows placing the IF clause in the "allowedClauses" set for
all directives, instead of having it in "allowedOnceClauses" for some
directives and in "allowedClauses" for others.

The emitted diagnostic will show which constituent has multiple IF
clauses applying to it:
```
if.f90:4:35: error: At most one IF clause can apply to each directive constituent
    !$omp & if(target teams: x > 0) if(teams distribute: y > 0)
                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^
if.f90:4:11: Previous IF clause applying to the TEAMS constituent
    !$omp & if(target teams: x > 0) if(teams distribute: y > 0)
            ^^^^^^^^^^^^^^^^^^^^^^^
```
DeltaFile
+89-26flang/lib/Semantics/check-omp-structure.cpp
+39-32llvm/include/llvm/Frontend/OpenMP/OMP.td
+17-17flang/test/Semantics/OpenMP/if-clause.f90
+15-17flang/test/Semantics/OpenMP/if-clause-50.f90
+12-17flang/test/Semantics/OpenMP/if-clause-45.f90
+18-0flang/test/Semantics/OpenMP/if-clause-45-suggestion.f90
+190-1094 files not shown
+223-11110 files

LLVM/project 910425fclang/test/CodeGen attr-arm-sve-vector-bits-types.c, clang/test/CodeGen/AArch64/sme2p3-intrinsics acle_sme2p3_luti6.c

[NFC][Clang][Tests] Remove +bf16 from AArch64 tests that don't strictly need the feature flag. (#205336)
DeltaFile
+9-9clang/test/CodeGen/AArch64/sve2p3-intrinsics/acle_sve2p3_luti6_lane_x2.c
+6-6clang/test/CodeGen/attr-arm-sve-vector-bits-types.c
+1-11clang/test/CodeGenCXX/mangle-neon-vectors.cpp
+5-5clang/test/CodeGen/AArch64/sme2p3-intrinsics/acle_sme2p3_luti6.c
+5-5clang/test/Sema/attr-arm-sve-vector-bits.c
+5-5clang/test/CodeGen/AArch64/sve2p3-intrinsics/acle_sve2p3_luti6.c
+31-4119 files not shown
+69-8125 files

LLVM/project d8b6b29llvm/include/llvm/IR IntrinsicsAArch64.td Intrinsics.td

[AArch64][TableGen] Define ZA, ZT0 and FPMR memory defvars (#154144)

Introduce TableGen defvars for the inaccessible memory effects used to
model accesses to ZA, ZT0 and FPMR in IntrinsicsAArch64.td.

This is a preparatory cleanup for a follow-up patch that will replace
these uses of InaccessibleMem with target-specific memory locations.
Other uses of inaccessible memory in the file are left unchanged because
they are unrelated to ZA, ZT0 or FPMR.

This preserves the existing memory effects. In particular, intrinsics
that currently access both argument memory and inaccessible memory keep
the same ArgMem/InaccessibleMem read/write modelling.

---------

Co-authored-by: Paul Walker <paul.walker at arm.com>
DeltaFile
+129-89llvm/include/llvm/IR/IntrinsicsAArch64.td
+5-0llvm/include/llvm/IR/Intrinsics.td
+134-892 files

LLVM/project 08e389cclang/include/clang/APINotes APINotesManager.h, clang/lib/APINotes APINotesManager.cpp

[APINotes] Skip per-decl ProcessAPINotes work when no API notes are active (#203710)

Cache "any API notes active" and skip per-decl lookups.

| function | before #202727 | trunk (parent) | this PR |
| ------------------------ | ----------------- | ----------------- |
------------------- |
| `Sema::ProcessAPINotes` | 2,385,852 (0.21%) | 1,028,280 (0.09%) |
**365,310 (0.03%)** |
| `UnwindNamespaceContext` | 349,244 | gone | gone |
| `findAPINotes` | 448,140 | 473,550 | **gone** |


cc @egorzhdan @Xazax-hun @compnerd
DeltaFile
+7-0clang/include/clang/APINotes/APINotesManager.h
+5-0clang/lib/APINotes/APINotesManager.cpp
+2-0clang/lib/Sema/SemaAPINotes.cpp
+14-03 files

LLVM/project 20988f8llvm/test/CodeGen/X86 madd.ll

[X86] madd.ll - add additional tests for matchPMADDWD folds that fail with irregular source types (#205514)

Ensure #205391 doesn't crash with non-pow2/illegal types
DeltaFile
+235-0llvm/test/CodeGen/X86/madd.ll
+235-01 files

LLVM/project 86e2f0fclang/lib/CIR/CodeGen CIRGenExprConstant.cpp

[CIR] Handle const evaluated variable values (#205512)

Match the `VarDecl::evaluateValue()` contract updated by #205033 in CIR
constant emission.
DeltaFile
+1-1clang/lib/CIR/CodeGen/CIRGenExprConstant.cpp
+1-11 files

LLVM/project 34bdee7clang-tools-extra/clangd IncludeFixer.cpp, lldb/source/Plugins/Process/gdb-remote GDBRemoteCommunicationServerPlatform.cpp

Remove unused variables in the monorepo (#204994)

https://github.com/llvm/llvm-project/pull/203084 adds diagnostics about
unused variables to the libc++ containers. This patch is the fallout
from the projects I tried to build with it.
DeltaFile
+1-9llvm/unittests/TextAPI/TextStubV3Tests.cpp
+4-4llvm/include/llvm/ExecutionEngine/Orc/TaskDispatch.h
+0-7clang-tools-extra/clangd/IncludeFixer.cpp
+1-4lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.cpp
+0-4llvm/tools/llvm-libtool-darwin/llvm-libtool-darwin.cpp
+2-2llvm/unittests/ADT/STLExtrasTest.cpp
+8-3023 files not shown
+12-7129 files

LLVM/project 35cfa14libcxx/include/__ranges reverse_view.h, libcxx/test/libcxx/ranges/range.adaptors/range.reverse nodiscard.verify.cpp adaptor.nodiscard.verify.cpp

[libc++][ranges] Applied `[[nodiscard]]` to `reverse_view` (#205186)

Towards #172124

#References:
- https://wg21.link/range.reverse
-
https://libcxx.llvm.org/CodingGuidelines.html#apply-nodiscard-where-relevant
DeltaFile
+99-0libcxx/test/libcxx/ranges/range.adaptors/range.reverse/nodiscard.verify.cpp
+0-21libcxx/test/libcxx/ranges/range.adaptors/range.reverse/adaptor.nodiscard.verify.cpp
+8-8libcxx/include/__ranges/reverse_view.h
+107-293 files

LLVM/project 9e52fbalibcxx/src CMakeLists.txt, libcxxabi/src CMakeLists.txt

[runtimes][NFC] Re-indent shared library blocks

Re-indent the shared library target blocks that were wrapped in
if(<runtime>_SUPPORTS_SHARED_LIBRARY) in the previous commit. This is a
whitespace-only change split out from the functional change to keep that diff
minimal and reviewable.

Co-authored-by: Claude (Opus 4.8) <noreply at anthropic.com>
DeltaFile
+90-90libcxxabi/src/CMakeLists.txt
+74-74libcxx/src/CMakeLists.txt
+32-32libunwind/src/CMakeLists.txt
+196-1963 files

LLVM/project 87dd16aclang/cmake/modules ClangConfig.cmake.in, cmake/Modules GetTripleCMakeSystemName.cmake NormalizeTriple.cmake

Reapply "runtimes: Pass CMAKE_SYSTEM_NAME based on target triple" (#205133)

This reverts commit 08c728e8528c9584bc1fe0f46bbdd657e368be91.

Reapply after runtimes build fixes on platforms without shared libraries.
DeltaFile
+89-0cmake/Modules/GetTripleCMakeSystemName.cmake
+32-37llvm/cmake/modules/LLVMConfig.cmake.in
+49-15llvm/cmake/modules/LLVMExternalProjectUtils.cmake
+36-0cmake/Modules/NormalizeTriple.cmake
+2-16runtimes/CMakeLists.txt
+4-1clang/cmake/modules/ClangConfig.cmake.in
+212-691 files not shown
+212-737 files

LLVM/project a562f6aflang/include/flang/Optimizer/Dialect FIROps.td, flang/lib/Optimizer/Dialect FIROps.cpp

[flang][FIR] add canonicalization pattern for fir.if returning OPTIONAL (#205353)

Lowering is generating patterns when forwarding OPTIONAL in calls that
looks like:

```
   %present = fir.is_present %var : (T) -> i1
    %if_result = fir.if %present -> (T) {
      fir.result %var : T
    } else {
      %absent = fir.absent T
      fir.result %absent : T
    }
```

This specific pattern is a no-op and `%var` can be used directly. The
lowering logic that generates such patterns is inside non trivial
compiler code that has to deal with more complex scenarios where the
code inside the fir.if is more complex. Add a FIR pattern to
canonicalize such code to help with later analysis (like aliasing).
DeltaFile
+66-0flang/test/Fir/present-absent-if-fold.fir
+59-0flang/lib/Optimizer/Dialect/FIROps.cpp
+2-0flang/include/flang/Optimizer/Dialect/FIROps.td
+127-03 files

LLVM/project 7b688b9llvm/cmake/modules Findzstd.cmake

Revert "XXX - Findzstd"

This reverts commit 2d88d3c09aa78676c9bc4c6ede6f83fb0af58522.
DeltaFile
+1-13llvm/cmake/modules/Findzstd.cmake
+1-131 files

LLVM/project 2d88d3cllvm/cmake/modules Findzstd.cmake

XXX - Findzstd
DeltaFile
+13-1llvm/cmake/modules/Findzstd.cmake
+13-11 files

LLVM/project 771c5f1clang/cmake/modules ClangConfig.cmake.in, cmake/Modules GetTripleCMakeSystemName.cmake NormalizeTriple.cmake

Reapply "runtimes: Pass CMAKE_SYSTEM_NAME based on target triple" (#205133)

This reverts commit 08c728e8528c9584bc1fe0f46bbdd657e368be91.

Reapply after runtimes build fixes on platforms without shared libraries.
DeltaFile
+89-0cmake/Modules/GetTripleCMakeSystemName.cmake
+32-37llvm/cmake/modules/LLVMConfig.cmake.in
+49-15llvm/cmake/modules/LLVMExternalProjectUtils.cmake
+36-0cmake/Modules/NormalizeTriple.cmake
+2-16runtimes/CMakeLists.txt
+4-1clang/cmake/modules/ClangConfig.cmake.in
+212-691 files not shown
+212-737 files

LLVM/project a712923libc/hdr/types CMakeLists.txt struct_ip_opts.h, libc/include/llvm-libc-types struct_ip_msfilter.h

[libc] Add IPv4 socket options and related structs (#204787)

This patch adds struct ip_mreq, ip_mreq_source, ip_mreqn, ip_opts, and
ip_msfilter to <netinet/in.h>, along with IP level socket option macros
(IP_TOS, IP_TTL, IP_ADD_MEMBERSHIP, etc.).

I add basic unit tests verifying the size and member offsets of the new
structures against standard layout expectations, mainly to make sure
that the files are used /somewhere/.

Assisted by Gemini.
DeltaFile
+81-0libc/include/netinet/in.yaml
+45-0libc/hdr/types/CMakeLists.txt
+38-0libc/test/src/netinet/in_test.cpp
+28-0libc/include/llvm-libc-types/struct_ip_msfilter.h
+26-0libc/hdr/types/struct_ip_opts.h
+26-0libc/hdr/types/struct_ip_msfilter.h
+244-010 files not shown
+435-016 files

LLVM/project 21a98c3libcxx CMakeLists.txt, libcxx/src CMakeLists.txt

[runtimes] Don't create shared library targets when unsupported

On platforms that don't support shared libraries (e.g. CMAKE_SYSTEM_NAME of
"Generic", used for GPU and other baremetal targets), CMake's
Platform/Generic.cmake sets the global TARGET_SUPPORTS_SHARED_LIBS property to
FALSE. Under CMP0164's OLD behavior (the default, since the runtimes set
cmake_minimum_required(3.20)), CMake silently demotes SHARED library targets to
STATIC archives. libcxx, libcxxabi and libunwind always create their shared
target, so after demotion both the shared and static targets emit e.g.
"libc++abi.a" and Ninja fails with "multiple rules generate ...".

Rather than papering over the collision with a distinct output name, skip
creating the shared library targets entirely when the platform does not support
them, gating on the TARGET_SUPPORTS_SHARED_LIBS property (left undefined on
platforms that do support shared libraries). The few consumers of the shared
targets are guarded with TARGET checks so they fall back to the static library
or are skipped.

Also set policy CMP0164 to NEW so that any future unguarded

    [10 lines not shown]
DeltaFile
+13-0libcxx/CMakeLists.txt
+13-0libunwind/CMakeLists.txt
+13-0libcxxabi/CMakeLists.txt
+6-4libcxx/src/CMakeLists.txt
+5-3libunwind/src/CMakeLists.txt
+4-2libcxxabi/src/CMakeLists.txt
+54-91 files not shown
+60-97 files

LLVM/project 071dfdeflang/lib/Lower/OpenMP OpenMP.cpp, mlir/lib/Dialect/OpenMP/IR OpenMPDialect.cpp

[flang][OpenMP] Lower target in_reduction for host fallback

Enable host-fallback lowering for target in_reduction in Flang and MLIR OpenMP translation.

Model target in_reduction through the matching map entry, force address-preserving implicit mapping for Flang in_reduction list items, and emit the host-side task-reduction lookup with __kmpc_task_reduction_get_th_data. The runtime entry point takes and returns a generic, default-address-space pointer, so normalize a non-default-address-space captured pointer to the generic address space before the call and cast the returned private pointer back to the map block argument's address space, mirroring the in_reduction handling on omp.taskloop. Unsupported device/offload-entry and richer reduction forms remain diagnosed.

Add Flang lowering, MLIR verifier/translation, and LLVM IR tests for the supported host-fallback path, including a non-default-address-space case, and the remaining unsupported cases.
DeltaFile
+135-14mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
+95-23mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp
+110-3mlir/test/Target/LLVMIR/openmp-todo.mlir
+107-0mlir/test/Target/LLVMIR/openmp-target-in-reduction.mlir
+75-0mlir/test/Target/LLVMIR/openmp-target-in-reduction-multi.mlir
+48-15flang/lib/Lower/OpenMP/OpenMP.cpp
+570-559 files not shown
+796-8415 files

LLVM/project 099b1f6compiler-rt/lib/builtins/arm divdf3.S, compiler-rt/test/builtins/Unit divdf3new_test.c

[compiler-rt][ARM] Fix underflow handling in new divdf3.S (#204784)

The code which calculates the 'errsign' parameter to pass to
`__compiler_rt_dunder` was wrong in two ways. It calculated the value
with the wrong sign, and also in the wrong register, r12 rather than r2!
In this code's original context, both of those things made sense (the
'dunder' function had a nonstandard ABI). Somehow none of the existing
test cases detected the problem.

We found this bug in a test case downstream that only failed big-endian
(because that changes which half of the denominator mantissa is left in
r2 to be accidentally used as errsign). However, the new test cases here
are designed to detect the failure in both endiannesses.
DeltaFile
+18-0compiler-rt/test/builtins/Unit/divdf3new_test.c
+4-4compiler-rt/lib/builtins/arm/divdf3.S
+22-42 files

LLVM/project 25ae6celibc/src/stdlib qsort_util.h qsort_r.cpp, libc/test/src/stdlib QsortReentrantTest.h qsort_r_test.cpp

[libc] Refactor qsort code (#198781)

This patch makes the following changes:
 - Refactor the internal sorting functions to reduce code duplication.
- Move the testing machinery done for the testing of `qsort_r` to a
shared place.

These changes are done in anticipation to the introduction of Annex K's
`qsort_s`. This function shares most of its semantics with `qsort_r`,
therefore most of the testing logic can be shared between the two.
Besides, `qsort`, `qsort_r` and `qsort_s` are all very similar, hence we
can attempt to reduce duplication a bit more.
DeltaFile
+156-0libc/test/src/stdlib/QsortReentrantTest.h
+2-134libc/test/src/stdlib/qsort_r_test.cpp
+22-3libc/src/stdlib/qsort_util.h
+1-6libc/src/stdlib/qsort_r.cpp
+1-5libc/src/stdlib/qsort.cpp
+2-1libc/test/src/stdlib/CMakeLists.txt
+184-1496 files

LLVM/project da9252allvm/lib/ObjectYAML ELFEmitter.cpp

[ObjectYAML][NFC] Derive BBAddrMap section size from the CBA offset (#204056)

Add the CBA offset delta to sh_size once at the end instead of after
each write.
DeltaFile
+19-22llvm/lib/ObjectYAML/ELFEmitter.cpp
+19-221 files

LLVM/project 448c3d5llvm/lib/Target/AArch64 AArch64TargetMachine.cpp, llvm/test/CodeGen/AArch64 aarch64-neon-vector-insert-uaddlv.ll fabs-fp128.ll

[AArch64] Run cleanup one final time after peephole (#199711)

It's a lightweight pass. Should always be the last SSA pass since
peephole can end up making some instructions dead.
DeltaFile
+22-22llvm/test/CodeGen/AArch64/aarch64-neon-vector-insert-uaddlv.ll
+2-3llvm/test/CodeGen/AArch64/fabs-fp128.ll
+3-1llvm/lib/Target/AArch64/AArch64TargetMachine.cpp
+1-0llvm/test/CodeGen/AArch64/O3-pipeline.ll
+28-264 files

LLVM/project 82c5bcellvm/test/CodeGen/RISCV/rvv vp-combine-reverse-load.ll

[RISCV] Convert opaque pointers in vp-combine-reverse-load.ll. NFC (#205498)
DeltaFile
+10-10llvm/test/CodeGen/RISCV/rvv/vp-combine-reverse-load.ll
+10-101 files

LLVM/project d7414ffllvm/lib/Transforms/Scalar LoopFuse.cpp

[LoopFusion][NFC] Share fusion tail between guarded and unguarded paths (#205492)

`performFusion()` and `fuseGuardedLoops()` carried two
character-for-character identical tails: header-PHI migration plus latch
rewiring, and the SCEV-forget / block-merge / latch-merge finalization.
Extract them into `rewireFusedHeaderPHIsAndLatches()` and
`finalizeFusedLoop()` and call both from each path.
DeltaFile
+119-198llvm/lib/Transforms/Scalar/LoopFuse.cpp
+119-1981 files

LLVM/project 2a237d4flang/lib/Lower PFTBuilder.cpp, flang/test/Lower do_loop_unstructured.f90 do_loop_execute_region_wrap.f90

[flang][PFT-to-MLIR] Wrap unstructured Fortran constructs in scf.execute_region

Extend the PFT-to-MLIR (HLFIR/FIR) lowering so unstructured DO and IF
constructs are emitted inside scf.execute_region, hiding their multi-block
CFG behind a single op. OpenACC and OpenMP lowerings that reject
multi-block content (e.g. the "unstructured do loop in combined acc
construct" TODO in OpenACC.cpp) now see a structured op instead.

Flag: -mmlir --wrap-unstructured-constructs-in-execute-region (default on).

An evaluation is wrappable iff all of the following hold:

  * wrap flag on
  * eval is parser::DoConstruct or parser::IfConstruct
  * eval.isUnstructured
  * branchesAreInternal(eval) -- every controlSuccessor in the subtree
    targets a nested eval or the constructExit
  * !hasIncomingBranch(eval) -- no outside eval branches into the body
    (PFT's synthetic IfConstruct around `if(c) goto X` absorbs label

    [27 lines not shown]
DeltaFile
+103-102flang/test/Lower/OpenMP/unstructured.f90
+202-2flang/lib/Lower/PFTBuilder.cpp
+115-24flang/test/Lower/OpenACC/acc-unstructured.f90
+38-87flang/test/Lower/do_loop_unstructured.f90
+111-0flang/test/Lower/do_loop_execute_region_wrap.f90
+47-61flang/test/Lower/mixed_loops.f90
+616-27621 files not shown
+970-43627 files