1. [lldb/Utility] Simplify Scalar::PromoteToMaxType (details)
  2. [MLIR][Shape] Add custom assembly format for `shape.any` (details)
  3. [NFC][ARM] Port MaybeCall into ARMTTImpl method (details)
  4. [mlir] Mention mandatory RFC process for changes in Standard dialect (details)
  5. [mlir] do not emit bitcasts between structs in StandardToLLVM (details)
  6. [ORC] Add JITLink-compatible remote memory-manager and LLJITWithChildProcess example (details)
  7. [ORC] In LLLazyJIT provide public access to the CompileOnDemandLayer (details)
  8. [ORC][NFC] Refactor loop to determine name of init symbol in IRMaterializationUnit (details)
  9. [lldb] Display autosuggestion part in gray if there is one possible suggestion (details)
  10. Separate the Registration from Loading dialects in the Context (details)
  11. [ORC][NFC] Fix a header comment (details)
  12. [lldb] Deduplicate copy-pasted TypeSystemMap::GetTypeSystemForLanguage (details)
  13. [ORC] Fix missing include in OrcRemoteTargetClient.h (details)
  14. [lldb] Fix py3 incompatibility in (details)
  15. [lldb] Check Decl kind when completing -flimit-debug-info types (details)
  16. [lldb] Use SBProcess::Continue instead of 'run' command in (details)
  17. [NFC][StackSafety] Move out sort from the loop (details)
  18. [NFC][StackSafety] Change map key comparison (details)
Commit 40d774265b08fbfd0f3e2ffa79ce7feddbd060bc by pavel
[lldb/Utility] Simplify Scalar::PromoteToMaxType

The function had very complicated signature, because it was trying to
avoid making unnecessary copies of the Scalar object. However, this
class is not hot enough to worry about these kinds of optimizations. My
making copies unconditionally, we can simplify the function and all of
its call sites.

Differential Revision:
The file was modifiedlldb/include/lldb/Utility/Scalar.h
The file was modifiedlldb/source/Utility/Scalar.cpp
Commit a9a6f0fe1d65346ad86021af727058a31594a6b8 by frgossen
[MLIR][Shape] Add custom assembly format for `shape.any`

Add custom assembly format for `shape.any` with variadic operands.

Differential Revision:
The file was modifiedmlir/test/Dialect/Shape/canonicalize.mlir
The file was modifiedmlir/include/mlir/Dialect/Shape/IR/
The file was modifiedmlir/test/Dialect/Shape/ops.mlir
Commit eb82d58f83b24c0c23fa8dc79924dfdfe2d269e2 by sam.parker
[NFC][ARM] Port MaybeCall into ARMTTImpl method

Renamed to maybeLoweredToCall.
The file was modifiedllvm/lib/Target/ARM/ARMTargetTransformInfo.cpp
The file was modifiedllvm/lib/Target/ARM/ARMTargetTransformInfo.h
Commit 215c2df6478f65233f15f8978d4dd692fe60c757 by zinenko
[mlir] Mention mandatory RFC process for changes in Standard dialect

We have been asking for this systematically, mention it in the documentation.

Reviewed By: mehdi_amini

Differential Revision:
The file was modifiedmlir/docs/Dialects/
Commit 339eba0805fb73da5cc3d29eb7cd1085306db54e by zinenko
[mlir] do not emit bitcasts between structs in StandardToLLVM

The convresion of memref cast operaitons from the Standard dialect to the LLVM
dialect has been emitting bitcasts from a struct type to itself. Beyond being
useless, such casts are invalid as bitcast does not operate on aggregate types.
This kept working by accident because LLVM IR bitcast construction API skips
the construction if types are equal before it verifies that the types are
acceptable in a bitcast. Do not emit such bitcasts, the memref cast that only
adds/erases size information is in fact a noop on the current descriptor as it
always contains dynamic values for all sizes.

Reviewed By: pifon2a

Differential Revision:
The file was modifiedmlir/lib/Conversion/StandardToLLVM/StandardToLLVM.cpp
The file was modifiedmlir/test/Conversion/StandardToLLVM/convert-dynamic-memref-ops.mlir
Commit 30c4561e36ea634a067bf3b7de8b4668292c0931 by Stefan Gränitz
[ORC] Add JITLink-compatible remote memory-manager and LLJITWithChildProcess example

This adds RemoteJITLinkMemoryManager is a new subclass of OrcRemoteTargetClient. It implements jitlink::JITLinkMemoryManager and targets the OrcRemoteTargetRPCAPI.

Behavior should be very similar to RemoteRTDyldMemoryManager. The essential differnce with JITLink is that allocations work in isolation from its memory manager. Thus, the RemoteJITLinkMemoryManager might be seen as "JITLink allocation factory".

RPCMMAlloc is another subclass of OrcRemoteTargetClient and implements the actual functionality. It allocates working memory on the host and target memory on the remote target. Upon finalization working memory is copied over to the tagrte address space. Finalization can be asynchronous for JITLink allocations, but I don't see that it makes a difference here.

Differential Revision:
The file was modifiedllvm/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetRPCAPI.h
The file was addedllvm/examples/OrcV2Examples/LLJITWithChildProcess/CMakeLists.txt
The file was addedllvm/examples/OrcV2Examples/LLJITWithChildProcess/LLJITWithChildProcess.cpp
The file was addedllvm/examples/OrcV2Examples/LLJITWithChildProcess/RemoteJITUtils.h
The file was modifiedllvm/examples/OrcV2Examples/CMakeLists.txt
The file was modifiedllvm/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetServer.h
The file was modifiedllvm/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetClient.h
Commit 6bf74a924fe9312e6dc4ced20259ce25d55dd764 by Stefan Gränitz
[ORC] In LLLazyJIT provide public access to the CompileOnDemandLayer

This is analog to how LLJIT provides public access to all its layers.

Differential Revision:
The file was modifiedllvm/include/llvm/ExecutionEngine/Orc/LLJIT.h
Commit 9a47bcae7c564bb83de659be601509241f31cc11 by Stefan Gränitz
[ORC][NFC] Refactor loop to determine name of init symbol in IRMaterializationUnit

This loop caused me a little headache once, because I didn't see the assigned variable is a member. The refactored version appears more readable to me.

Differential Revision:
The file was modifiedllvm/lib/ExecutionEngine/Orc/Layer.cpp
Commit de9e85026fcb7c3e992f12a86594fd50bb101ad3 by Raphael Isemann
[lldb] Display autosuggestion part in gray if there is one possible suggestion

This is relanding D81001. The patch originally failed as on newer editline
versions it seems CC_REFRESH will move the cursor to the start of the line via
\r and then back to the original position. On older editline versions like
the one used by default on macOS, CC_REFRESH doesn't move the cursor at all.
As the patch changed the way we handle tab completion (previously we did
REDISPLAY but now we're doing CC_REFRESH), this caused a few completion tests
to receive this unexpected cursor movement in the output stream.
This patch updates those tests to also accept output that contains the specific
cursor movement commands (\r and then \x1b[XC). received an
utility method for generating the cursor movement escape sequence.

Original summary:

I implemented autosuggestion if there is one possible suggestion.
I set the keybinds for every character. When a character is typed, Editline::TypedCharacter is called.
Then, autosuggestion part is displayed in gray, and you can actually input by typing C-k.
Editline::Autosuggest is a function for finding completion, and it is like Editline::TabCommand now, but I will add more features to it.

Testing does not work well in my environment, so I can't confirm that it goes well, sorry. I am dealing with it now.

Reviewed By: teemperor, JDevlieghere, #lldb

Differential Revision:
The file was modifiedlldb/packages/Python/lldbsuite/test/
The file was addedlldb/test/API/iohandler/autosuggestion/
The file was modifiedlldb/include/lldb/Core/IOHandler.h
The file was modifiedlldb/test/API/iohandler/completion/
The file was modifiedlldb/source/Interpreter/CommandInterpreter.cpp
The file was modifiedlldb/include/lldb/Core/Debugger.h
The file was modifiedlldb/include/lldb/Interpreter/CommandInterpreter.h
The file was modifiedlldb/source/Core/
The file was modifiedlldb/include/lldb/Host/Editline.h
The file was modifiedlldb/source/Host/common/Editline.cpp
The file was modifiedlldb/source/Core/IOHandler.cpp
The file was modifiedlldb/source/Core/Debugger.cpp
The file was modifiedlldb/test/API/commands/expression/multiline-completion/
Commit ebf521e78483693e5cc9ba4ad3298f0397923624 by joker.eph
Separate the Registration from Loading dialects in the Context

This changes the behavior of constructing MLIRContext to no longer load globally registered dialects on construction. Instead Dialects are only loaded explicitly on demand:
- the Parser is lazily loading Dialects in the context as it encounters them during parsing. This is the only purpose for registering dialects and not load them in the context.
- Passes are expected to declare the dialects they will create entity from (Operations, Attributes, or Types), and the PassManager is loading Dialects into the Context when starting a pipeline.

This changes simplifies the configuration of the registration: a compiler only need to load the dialect for the IR it will emit, and the optimizer is self-contained and load the required Dialects. For example in the Toy tutorial, the compiler only needs to load the Toy dialect in the Context, all the others (linalg, affine, std, LLVM, ...) are automatically loaded depending on the optimization pipeline enabled.
The file was modifiedmlir/test/lib/Dialect/Affine/TestVectorizationUtils.cpp
The file was modifiedmlir/tools/mlir-linalg-ods-gen/mlir-linalg-ods-gen.cpp
The file was modifiedmlir/test/lib/Dialect/SPIRV/TestAvailability.cpp
The file was modifiedmlir/include/mlir/Support/MlirOptMain.h
The file was modifiedmlir/lib/TableGen/Dialect.cpp
The file was modifiedmlir/unittests/Dialect/SPIRV/DeserializationTest.cpp
The file was modifiedmlir/examples/toy/Ch6/toyc.cpp
The file was modifiedmlir/include/mlir/Dialect/Affine/
The file was modifiedmlir/include/mlir/TableGen/Pass.h
The file was modifiedmlir/test/CAPI/ir.c
The file was modifiedmlir/test/mlir-opt/commandline.mlir
The file was modifiedmlir/include/mlir-c/IR.h
The file was modifiedmlir/unittests/IR/DialectTest.cpp
The file was modifiedmlir/include/mlir/Dialect/LLVMIR/NVVMDialect.h
The file was modifiedmlir/lib/Parser/AttributeParser.cpp
The file was modifiedmlir/examples/toy/Ch5/mlir/LowerToAffineLoops.cpp
The file was modifiedmlir/examples/toy/Ch6/mlir/LowerToAffineLoops.cpp
The file was modifiedmlir/unittests/Dialect/SPIRV/SerializationTest.cpp
The file was modifiedmlir/examples/toy/Ch4/toyc.cpp
The file was modifiedmlir/include/mlir/Dialect/LLVMIR/
The file was modifiedmlir/include/mlir/InitAllDialects.h
The file was modifiedmlir/lib/Conversion/GPUToVulkan/ConvertGPULaunchFuncToVulkanLaunchFunc.cpp
The file was modifiedmlir/test/lib/Transforms/TestLinalgHoisting.cpp
The file was modifiedmlir/unittests/IR/AttributeTest.cpp
The file was modifiedmlir/lib/Parser/Parser.cpp
The file was modifiedmlir/include/mlir/Pass/Pass.h
The file was modifiedmlir/examples/standalone/standalone-opt/standalone-opt.cpp
The file was modifiedmlir/examples/toy/Ch5/toyc.cpp
The file was modifiedmlir/include/mlir/Dialect/LLVMIR/
The file was modifiedmlir/lib/CAPI/IR/IR.cpp
The file was modifiedmlir/test/lib/Dialect/Test/TestPatterns.cpp
The file was modifiedmlir/examples/toy/Ch7/mlir/LowerToAffineLoops.cpp
The file was modifiedmlir/unittests/IR/OperationSupportTest.cpp
The file was modifiedmlir/test/lib/Transforms/TestLinalgTransforms.cpp
The file was modifiedmlir/lib/Dialect/Affine/Transforms/PassDetail.h
The file was modifiedmlir/lib/Target/LLVMIR/ModuleTranslation.cpp
The file was modifiedmlir/lib/Dialect/SDBM/SDBMExpr.cpp
The file was modifiedmlir/examples/toy/Ch3/toyc.cpp
The file was modifiedmlir/examples/toy/Ch7/mlir/LowerToLLVM.cpp
The file was modifiedmlir/lib/ExecutionEngine/JitRunner.cpp
The file was modifiedmlir/lib/Support/MlirOptMain.cpp
The file was modifiedmlir/test/lib/Transforms/TestGpuMemoryPromotion.cpp
The file was modifiedmlir/test/lib/Transforms/TestAllReduceLowering.cpp
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/PassDetail.h
The file was modifiedmlir/lib/Transforms/PassDetail.h
The file was modifiedmlir/unittests/TableGen/OpBuildGen.cpp
The file was modifiedmlir/lib/Conversion/LinalgToLLVM/LinalgToLLVM.cpp
The file was modifiedmlir/unittests/TableGen/StructsGenTest.cpp
The file was modifiedmlir/unittests/Pass/AnalysisManagerTest.cpp
The file was modifiedmlir/include/mlir/Dialect/SCF/
The file was modifiedmlir/lib/Conversion/PassDetail.h
The file was modifiedmlir/lib/Parser/DialectSymbolParser.cpp
The file was modifiedmlir/include/mlir/IR/Dialect.h
The file was modifiedmlir/lib/IR/MLIRContext.cpp
The file was modifiedmlir/test/lib/Transforms/TestVectorTransforms.cpp
The file was modifiedmlir/include/mlir/TableGen/Dialect.h
The file was modifiedmlir/lib/Pass/PassDetail.h
The file was modifiedmlir/test/SDBM/sdbm-api-test.cpp
The file was modifiedmlir/tools/mlir-translate/mlir-translate.cpp
The file was modifiedmlir/examples/toy/Ch6/mlir/LowerToLLVM.cpp
The file was modifiedmlir/include/mlir/IR/MLIRContext.h
The file was modifiedmlir/lib/Dialect/SCF/Transforms/PassDetail.h
The file was modifiedmlir/unittests/SDBM/SDBMTest.cpp
The file was modifiedmlir/lib/Conversion/StandardToLLVM/StandardToLLVM.cpp
The file was modifiedmlir/include/mlir/Conversion/
The file was modifiedmlir/include/mlir/Pass/
The file was modifiedmlir/include/mlir/Dialect/LLVMIR/LLVMDialect.h
The file was modifiedmlir/include/mlir/IR/
The file was modifiedmlir/lib/IR/Operation.cpp
The file was modifiedmlir/include/mlir/Dialect/LLVMIR/ROCDLDialect.h
The file was modifiedmlir/include/mlir/Pass/PassManager.h
The file was modifiedmlir/examples/toy/Ch7/toyc.cpp
The file was modifiedmlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
The file was modifiedmlir/lib/TableGen/Pass.cpp
The file was modifiedmlir/unittests/Dialect/Quant/QuantizationUtilsTest.cpp
The file was modifiedmlir/include/mlir/Transforms/
The file was modifiedmlir/examples/toy/Ch2/toyc.cpp
The file was modifiedmlir/tools/mlir-tblgen/PassGen.cpp
The file was modifiedmlir/lib/Conversion/StandardToSPIRV/LegalizeStandardForSPIRV.cpp
The file was modifiedmlir/test/EDSC/builder-api-test.cpp
The file was modifiedmlir/lib/IR/Verifier.cpp
The file was modifiedmlir/include/mlir/IR/FunctionSupport.h
The file was modifiedmlir/lib/IR/Dialect.cpp
The file was modifiedmlir/lib/Target/LLVMIR/ConvertFromLLVMIR.cpp
The file was modifiedmlir/tools/mlir-opt/mlir-opt.cpp
The file was modifiedmlir/test/lib/Transforms/TestBufferPlacement.cpp
The file was modifiedmlir/include/mlir/Dialect/Linalg/
The file was modifiedmlir/lib/Pass/Pass.cpp
The file was modifiedflang/unittests/Lower/OpenMPLoweringTest.cpp
The file was modifiedmlir/include/mlir/Dialect/LLVMIR/
The file was modifiedmlir/tools/mlir-tblgen/DialectGen.cpp
Commit 397b3cc9e5aa949fcaaff7743a76e889d29b723c by Stefan Gränitz
[ORC][NFC] Fix a header comment
The file was modifiedllvm/examples/OrcV2Examples/LLJITWithChildProcess/LLJITWithChildProcess.cpp
Commit f974d64b372c5554783369bab901de8f4dee5e02 by Raphael Isemann
[lldb] Deduplicate copy-pasted TypeSystemMap::GetTypeSystemForLanguage

There are two implementations for `TypeSystemMap::GetTypeSystemForLanguage`
which are both identical beside one taking a `Module` and one taking a `Target`
(and then passing that argument to the `TypeSystem::CreateInstance` function).

This merges both implementations into one function with a lambda that wraps the
different calls to `TypeSystem::CreateInstance`.

Reviewed By: #lldb, JDevlieghere

Differential Revision:
The file was modifiedlldb/source/Symbol/TypeSystem.cpp
The file was modifiedlldb/include/lldb/Symbol/TypeSystem.h
Commit 28e1015e327ec56ac4bf93967d3aa2915b215e36 by Stefan Gränitz
[ORC] Fix missing include in OrcRemoteTargetClient.h
The file was modifiedllvm/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetClient.h
Commit e6b1b61054c285efad7bf4ee0a4da53e56944d87 by pavel
[lldb] Fix py3 incompatibility in

This didn't cause test failures since this variable is only used during
connection shutdown.
The file was modifiedlldb/packages/Python/lldbsuite/test/tools/lldb-server/
Commit fdc6aea3fd822b639baaa5b666fdf7598d08c8de by pavel
[lldb] Check Decl kind when completing -flimit-debug-info types

The search for the complete class definition can also produce entries
which are not of the expected type. This can happen for instance when
there is a function with the same name as the class we're looking up
(which means that the class needs to be disambiguated with the
struct/class tag in most contexts).

Previously we were just picking the first Decl that the lookup returned,
which later caused crashes or assertion failures if it was not of the
correct type. This patch changes that to search for an entry of the
correct type.

Differential Revision:
The file was modifiedlldb/test/API/functionalities/limit-debug-info/main.cpp
The file was modifiedlldb/test/API/functionalities/limit-debug-info/
The file was modifiedlldb/source/Plugins/ExpressionParser/Clang/ClangASTImporter.cpp
The file was modifiedlldb/test/API/functionalities/limit-debug-info/one.cpp
The file was modifiedlldb/test/API/functionalities/limit-debug-info/onetwo.h
Commit bb4efab9a4d9431dbedb27f04249effd0a73812e by Raphael Isemann
[lldb] Use SBProcess::Continue instead of 'run' command in

This test is flaky on Green Dragon as it often fails when the process state
is "Invalid" in the assert:
    self.assertEqual(process.GetState(), lldb.eStateExited)
It seems this is related to just doing "run" which apparently invalidates
the Target's process in case it's still running and needs to be restarted.
Just doing 'continue' on the process (and ignoring the error in case it already
finished) prevents that and makes this consistently pass for me.

Just pushing this out to get Green Dragon back online.
The file was modifiedlldb/test/API/python_api/target/
Commit 0426e28419799c35cf52fe3d773c5bab9928c699 by Vitaly Buka
[NFC][StackSafety] Move out sort from the loop
The file was modifiedllvm/lib/Analysis/StackSafetyAnalysis.cpp
The file was modifiedllvm/test/Bitcode/thinlto-function-summary-paramaccess.ll
Commit 4c30d4b4e5f2c2cb80910638e7827f7b85ee5568 by Vitaly Buka
[NFC][StackSafety] Change map key comparison
The file was modifiedllvm/lib/Analysis/StackSafetyAnalysis.cpp