Changes

Summary

  1. [flang][runtime] Fix deadlock in error recovery (details)
  2. [flang][runtime] Emit error message rather than crashing for MOD(ULO)(x,P=0) (details)
  3. [flang][runtime] Catch OPEN of connected file (details)
  4. [mlir] Use context provided rather than getContext (details)
  5. [VPlan] Update vector latch terminator edge to exit block after execution. (details)
Commit 11f928af9bfaefc0965a43f5ad6d480ded3de4a5 by pklausler
[flang][runtime] Fix deadlock in error recovery

When an external I/O statement is in a recoverable error
state before any data transfers take place (for example,
an unformatted transfer with ERR=/IOSTAT=/IOMSG= attempted on
a formatted unit), ensure that the unit's mutex is still
released at the end of the statement.

Differential Revision: https://reviews.llvm.org/D127032
The file was modifiedflang/runtime/io-api.cpp
The file was modifiedflang/runtime/io-stmt.cpp
The file was modifiedflang/runtime/io-stmt.h
Commit 562fd2c99b70691affe7776a1900e95ee7da0b3b by pklausler
[flang][runtime] Emit error message rather than crashing for MOD(ULO)(x,P=0)

Add extra arguments and checks to the runtime support library so that
a call to the intrinsic functions MOD and MODULO with "denominator"
argument P of zero will cause a crash with a source location rather
than an uninformative floating-point error or integer division by
zero signal.

Additional work is required in lowering to (1) pass source file path and
source line number arguments and (2) actually call these runtime
library APIs instead of emitting inline code for MOD &/or MODULO.

Differential Revision: https://reviews.llvm.org/D127034
The file was modifiedflang/runtime/numeric.cpp
The file was modifiedflang/include/flang/Runtime/numeric.h
Commit 03c066ab134f02289df1b61db00294c1da579f9c by pklausler
[flang][runtime] Catch OPEN of connected file

Diagnose OPEN(FILE=f) when f is already connected by the same name to
a distinct external I/O unit.

Differential Revision: https://reviews.llvm.org/D127035
The file was modifiedflang/runtime/unit-map.h
The file was modifiedflang/runtime/unit.h
The file was modifiedflang/runtime/iostat.cpp
The file was modifiedflang/runtime/file.h
The file was modifiedflang/runtime/unit-map.cpp
The file was modifiedflang/runtime/file.cpp
The file was modifiedflang/runtime/io-api.cpp
The file was modifiedflang/include/flang/Runtime/iostat.h
The file was modifiedflang/runtime/unit.cpp
Commit 29794ab0fae526073cb1f0f8cd4662243c7e3c3a by jpienaar
[mlir] Use context provided rather than getContext

Avoids "pass state was never initialized" assertion failure.
The file was modifiedmlir/test/lib/Tools/PDLL/TestPDLL.cpp
Commit 416a5080d89066029f9889dc23f94de47c2fa895 by flo
[VPlan] Update vector latch terminator edge to exit block after execution.

Instead of setting the successor to the exit using CFG.ExitBB, set it to
nullptr initially. The successor to the exit block is later set either
through createEmptyBasicBlock or after VPlan execution (because at the
moment, no block is created by VPlan for the exit block, the existing
one is reused).

This also enables BranchOnCond to be used as terminator for the exiting
block of the topmost vector region.

Depends on D126618.

Reviewed By: Ayal

Differential Revision: https://reviews.llvm.org/D126679
The file was modifiedllvm/lib/Transforms/Vectorize/VPlan.cpp