1. [MLIR] Introduce scf.execute_region op (details)
  2. [LoopDeletion] Break backedge if we can prove that the loop is exited on 1st iteration (try 3) (details)
  3. Revert D104028 "[llvm][Inliner] Add an optional PriorityInlineOrder" (details)
  4. [ORC] Add support for dumping objects to the C API. (details)
  5. [clang] Exclude function pointers on DefaultedComparisonAnalyzer (details)
  6. [ORC] Use uint8_t rather than char for RPC wrapper-function calls. (details)
  7. [ORC][C-bindings] Re-order object transform function arguments. (details)
  8. [libclang] Fix error handler in translateSourceLocation. (details)
Commit 18c8c934d8584f706dfca9e633f0f89cefe3688e by uday
[MLIR] Introduce scf.execute_region op

Introduce the execute_region op that is able to hold a region which it
executes exactly once. The op encapsulates a CFG within itself while
isolating it from the surrounding control flow. Proposal discussed here:

execute_region enables one to inline a function without lowering out all
other higher level control flow constructs (affine.for/if, scf.for/if)
to the flat list of blocks / CFG form. It thus allows the benefit of
transforms on higher level control flow ops available in the presence of
the inlined calls. The inlined calls continue to benefit from
propagation of SSA values across their top boundary. Functions won’t
have to remain outlined until later than desired.  Abstractions like
affine execute_regions, lambdas with implicit captures could be lowered
to this without first lowering out structured loops/ifs or outlining.
But two potential early use cases are of: (1) an early inliner (which
can inline functions by introducing execute_region ops), (2) lowering of
an affine.execute_region, which cleanly maps to an scf.execute_region
when going from the affine dialect to the scf dialect.

Differential Revision:
The file was modifiedmlir/test/Dialect/SCF/canonicalize.mlir
The file was modifiedmlir/utils/vim/syntax/mlir.vim
The file was modifiedmlir/include/mlir/Dialect/SCF/
The file was modifiedmlir/test/Dialect/SCF/ops.mlir
The file was modifiedmlir/test/Dialect/SCF/invalid.mlir
The file was modifiedmlir/lib/Dialect/SCF/SCF.cpp
Commit de92287cf8d1b07516b7e006a54529f174d4f5ef by mkazantsev
[LoopDeletion] Break backedge if we can prove that the loop is exited on 1st iteration (try 3)

This patch handles one particular case of one-iteration loops for which SCEV
cannot straightforwardly prove BECount = 1. The idea of the optimization is to
symbolically execute conditional branches on the 1st iteration, moving in topoligical
order, and only visiting blocks that may be reached on the first iteration. If we find out
that we never reach header via the latch, then the backedge can be broken.

This implementation uses InstSimplify. SCEV version was rejected due to high
compile time impact.

Differential Revision:
Reviewed By: nikic
The file was modifiedllvm/test/Transforms/LoopDeletion/zero-btc.ll
The file was modifiedllvm/test/Transforms/LoopDeletion/unreachable-loops.ll
The file was modifiedllvm/lib/Transforms/Scalar/LoopDeletion.cpp
The file was modifiedllvm/test/Transforms/LoopDeletion/eval_first_iteration.ll
Commit 93183a41b962ce21ea168357172aaf00cdca5bd9 by taolq
Revert D104028 "[llvm][Inliner] Add an optional PriorityInlineOrder"
The file was modifiedllvm/test/Transforms/Inline/inline_call.ll
The file was modifiedllvm/test/Transforms/Inline/monster_scc.ll
The file was modifiedllvm/lib/Transforms/IPO/Inliner.cpp
The file was modifiedllvm/test/Transforms/Inline/last-callsite.ll
The file was modifiedllvm/test/Transforms/Inline/inline_invoke.ll
Commit cec8e69f01c3374cb38c6683058381b96fab8f89 by Lang Hames
[ORC] Add support for dumping objects to the C API.

Provides ObjectTransformLayer APIs, a getter to access the
ObjectTransformLayer member of LLJIT, and the DumpObjects utility
to make construction of a dump-to-disk transform easy.

An example showing how the new APIs can be used has been added in
The file was addedllvm/examples/OrcV2Examples/OrcV2CBindingsDumpObjects/OrcV2CBindingsDumpObjects.c
The file was modifiedllvm/lib/ExecutionEngine/Orc/OrcV2CBindings.cpp
The file was modifiedllvm/include/llvm-c/LLJIT.h
The file was modifiedllvm/examples/OrcV2Examples/CMakeLists.txt
The file was modifiedllvm/include/llvm-c/Orc.h
The file was addedllvm/examples/OrcV2Examples/OrcV2CBindingsDumpObjects/CMakeLists.txt
Commit 7ddd15cd5dea76a19a9c5315e2a9903d74a49be8 by mizvekov
[clang] Exclude function pointers on DefaultedComparisonAnalyzer

This implements a more comprehensive fix than was done at D95409.
Instead of excluding just function pointer subobjects, we also
exclude any user-defined function pointer conversion operators.

Signed-off-by: Matheus Izvekov <>

Reviewed By: rsmith

Differential Revision:
The file was modifiedclang/include/clang/Basic/
The file was modifiedclang/test/CXX/class/
The file was modifiedclang/lib/Sema/SemaDeclCXX.cpp
Commit cbfb12469ba312c8ff513397b29bef470f151caa by Lang Hames
[ORC] Use uint8_t rather than char for RPC wrapper-function calls.

This partially reverts 838490de7ed, which broke some Solaris bots. Apparently
Solaris defines int8_t as char rather than signed char, which made the
SerializationTypeName<char> specialization a redefinition.

This partial revert isolates use of uint8_t buffers to ORC-RPC handling of
wrapper functions only. The TargetProcessControl::runWrapper method will
continue to use char buffers.
The file was modifiedllvm/include/llvm/ExecutionEngine/Orc/TargetProcess/OrcRPCTPCServer.h
The file was modifiedllvm/include/llvm/ExecutionEngine/Orc/OrcRPCTargetProcessControl.h
The file was modifiedllvm/include/llvm/ExecutionEngine/Orc/Shared/Serialization.h
Commit 8962c68ad007a525f9daa987c99eda57e0d0069a by Lang Hames
[ORC][C-bindings] Re-order object transform function arguments.

ObjInOut is an in-out parameter not a return value argument, so by convention
it should come after the context value (Ctx).
The file was modifiedllvm/examples/OrcV2Examples/OrcV2CBindingsDumpObjects/OrcV2CBindingsDumpObjects.c
The file was modifiedllvm/include/llvm-c/Orc.h
The file was modifiedllvm/lib/ExecutionEngine/Orc/OrcV2CBindings.cpp
Commit fd569a11b585d13cdceac2d890c2beda0fa5f0eb by simon.tatham
[libclang] Fix error handler in translateSourceLocation.

Given an invalid SourceLocation, translateSourceLocation will call
clang_getNullLocation, and then do nothing with the result. But
clang_getNullLocation has no side effects: it just constructs and
returns a null CXSourceLocation value.

Surely the intention was to //return// that null CXSourceLocation to
the caller, instead of throwing it away and pressing on anyway.

Reviewed By: miyuki

Differential Revision:
The file was modifiedclang/tools/libclang/CXSourceLocation.h