SuccessChanges

Changes from Git (git http://labmaster3.local/git/llvm-project.git)

Summary

  1. [lldb] Remove XFAIL from now passing TestPtrRefs/TestPtreRefsObjC (details)
  2. Revert "[SLC] sprintf(dst, "%s", str) -> strcpy(dst, str)" (details)
  3. Revert "Separate the Registration from Loading dialects in the Context" (details)
  4. Separate the Registration from Loading dialects in the Context (details)
Commit 7208cb1ac43e4be806bcb91c622fc1f8641e010b by Raphael Isemann
[lldb] Remove XFAIL from now passing TestPtrRefs/TestPtreRefsObjC

8fcfe2862fd4fde4793e232cfeebe6c5540c80a5 and
0cceb54366b406649fdfe7bb11b133ab96f3cd70 fixed those tests.
The file was modifiedlldb/test/API/lang/objc/ptr_refs/TestPtrRefsObjC.py
The file was modifiedlldb/test/API/functionalities/ptr_refs/TestPtrRefs.py
Commit 3e7403a1346f9644511170e0b29b5adf68996309 by martin
Revert "[SLC] sprintf(dst, "%s", str) -> strcpy(dst, str)"

This reverts commit 6dbf0cfcf789365493f70ae69df8a7a59be41c75.

That commit caused failed assertions, e.g. like this:

$ cat sprintf-strcpy.c
char *ptr; void func(void) { ptr += sprintf(ptr, "%s", ""); }

$ clang -c sprintf-strcpy.c -O2 -target x86_64-linux-gnu
clang: ../lib/IR/Value.cpp:473: void llvm::Value::doRAUW(llvm::Value*,
llvm::Value::ReplaceMetadataUses): Assertion `New->getType() ==
getType() && "replaceAllUses of value with new value of different
type!"' failed.
The file was modifiedllvm/test/Transforms/InstCombine/2010-05-30-memcpy-Struct.ll
The file was modifiedllvm/lib/Transforms/Utils/SimplifyLibCalls.cpp
The file was modifiedllvm/test/Transforms/InstCombine/sprintf-1.ll
Commit ba92dadf05c50d53e6bc7345f081e0a5f540b01e by joker.eph
Revert "Separate the Registration from Loading dialects in the Context"

This was landed by accident, will reland with the right comments
addressed from the reviews.
Also revert dependent build fixes.
The file was modifiedmlir/test/lib/Transforms/TestLinalgTransforms.cpp
The file was modifiedmlir/include/mlir/Transforms/Passes.td
The file was modifiedmlir/lib/Conversion/StandardToLLVM/StandardToLLVM.cpp
The file was modifiedmlir/test/lib/Dialect/Affine/TestVectorizationUtils.cpp
The file was modifiedmlir/tools/mlir-opt/mlir-opt.cpp
The file was modifiedmlir/lib/Parser/DialectSymbolParser.cpp
The file was modifiedmlir/lib/Support/MlirOptMain.cpp
The file was modifiedmlir/lib/Target/LLVMIR/ConvertFromLLVMIR.cpp
The file was modifiedmlir/include/mlir/IR/Dialect.h
The file was modifiedmlir/examples/standalone/standalone-opt/standalone-opt.cpp
The file was modifiedmlir/test/lib/Transforms/TestLinalgHoisting.cpp
The file was modifiedmlir/lib/IR/Dialect.cpp
The file was modifiedmlir/include/mlir/Pass/PassManager.h
The file was modifiedmlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
The file was modifiedmlir/lib/Conversion/PassDetail.h
The file was modifiedmlir/tools/mlir-tblgen/DialectGen.cpp
The file was modifiedmlir/lib/Parser/Parser.cpp
The file was modifiedmlir/lib/Dialect/SCF/Transforms/PassDetail.h
The file was modifiedmlir/lib/Parser/AttributeParser.cpp
The file was modifiedmlir/examples/toy/Ch7/mlir/LowerToLLVM.cpp
The file was modifiedmlir/test/EDSC/builder-api-test.cpp
The file was modifiedmlir/tools/mlir-tblgen/PassGen.cpp
The file was modifiedmlir/include/mlir-c/IR.h
The file was modifiedmlir/unittests/Dialect/SPIRV/SerializationTest.cpp
The file was modifiedmlir/examples/toy/Ch2/toyc.cpp
The file was modifiedmlir/lib/Pass/PassDetail.h
The file was modifiedmlir/lib/Dialect/SDBM/SDBMExpr.cpp
The file was modifiedmlir/test/lib/Transforms/TestGpuMemoryPromotion.cpp
The file was modifiedmlir/include/mlir/Dialect/LLVMIR/LLVMDialect.h
The file was modifiedmlir/lib/Conversion/GPUToVulkan/ConvertGPULaunchFuncToVulkanLaunchFunc.cpp
The file was modifiedmlir/include/mlir/Dialect/Affine/Passes.td
The file was modifiedmlir/test/lib/Transforms/TestAllReduceLowering.cpp
The file was modifiedmlir/examples/toy/Ch6/toyc.cpp
The file was modifiedmlir/lib/TableGen/Pass.cpp
The file was modifiedmlir/include/mlir/Dialect/LLVMIR/ROCDLDialect.h
The file was modifiedflang/unittests/Lower/OpenMPLoweringTest.cpp
The file was modifiedmlir/test/lib/Transforms/TestBufferPlacement.cpp
The file was modifiedmlir/unittests/IR/AttributeTest.cpp
The file was modifiedmlir/lib/IR/Verifier.cpp
The file was modifiedmlir/lib/Transforms/PassDetail.h
The file was modifiedmlir/include/mlir/Support/MlirOptMain.h
The file was modifiedmlir/include/mlir/TableGen/Dialect.h
The file was modifiedmlir/unittests/SDBM/SDBMTest.cpp
The file was modifiedmlir/include/mlir/IR/OpBase.td
The file was modifiedmlir/test/lib/Dialect/SPIRV/TestAvailability.cpp
The file was modifiedmlir/lib/IR/Operation.cpp
The file was modifiedmlir/unittests/TableGen/OpBuildGen.cpp
The file was modifiedmlir/include/mlir/IR/FunctionSupport.h
The file was modifiedmlir/lib/ExecutionEngine/JitRunner.cpp
The file was modifiedmlir/include/mlir/TableGen/Pass.h
The file was modifiedmlir/include/mlir/IR/MLIRContext.h
The file was modifiedmlir/test/SDBM/sdbm-api-test.cpp
The file was modifiedmlir/examples/toy/Ch5/toyc.cpp
The file was modifiedmlir/include/mlir/Dialect/LLVMIR/LLVMOpBase.td
The file was modifiedmlir/include/mlir/Dialect/SCF/Passes.td
The file was modifiedmlir/lib/Target/LLVMIR/ModuleTranslation.cpp
The file was modifiedmlir/unittests/Pass/AnalysisManagerTest.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/Dialect/LLVMIR/NVVMOps.td
The file was modifiedmlir/unittests/Dialect/Quant/QuantizationUtilsTest.cpp
The file was modifiedmlir/include/mlir/Dialect/LLVMIR/ROCDLOps.td
The file was modifiedmlir/lib/Dialect/Affine/Transforms/PassDetail.h
The file was modifiedmlir/examples/toy/Ch6/mlir/LowerToAffineLoops.cpp
The file was modifiedmlir/include/mlir/Dialect/Linalg/Passes.td
The file was modifiedmlir/include/mlir/Conversion/Passes.td
The file was modifiedmlir/lib/CAPI/IR/IR.cpp
The file was modifiedmlir/examples/toy/Ch3/toyc.cpp
The file was modifiedmlir/examples/toy/Ch5/mlir/LowerToAffineLoops.cpp
The file was modifiedmlir/include/mlir/Dialect/LLVMIR/NVVMDialect.h
The file was modifiedmlir/lib/TableGen/Dialect.cpp
The file was modifiedmlir/test/lib/Dialect/Test/TestPatterns.cpp
The file was modifiedmlir/lib/Conversion/LinalgToLLVM/LinalgToLLVM.cpp
The file was modifiedmlir/unittests/TableGen/StructsGenTest.cpp
The file was modifiedmlir/unittests/IR/OperationSupportTest.cpp
The file was modifiedmlir/lib/Conversion/StandardToSPIRV/LegalizeStandardForSPIRV.cpp
The file was modifiedmlir/include/mlir/InitAllDialects.h
The file was modifiedmlir/lib/Pass/Pass.cpp
The file was modifiedmlir/test/CAPI/ir.c
The file was modifiedmlir/tools/mlir-linalg-ods-gen/mlir-linalg-ods-gen.cpp
The file was modifiedmlir/examples/toy/Ch7/mlir/LowerToAffineLoops.cpp
The file was modifiedmlir/lib/IR/MLIRContext.cpp
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/PassDetail.h
The file was modifiedmlir/unittests/IR/DialectTest.cpp
The file was modifiedmlir/examples/toy/Ch4/toyc.cpp
The file was modifiedmlir/test/lib/Transforms/TestVectorTransforms.cpp
The file was modifiedmlir/test/mlir-opt/commandline.mlir
The file was modifiedmlir/include/mlir/Pass/PassBase.td
The file was modifiedmlir/examples/toy/Ch7/toyc.cpp
The file was modifiedmlir/include/mlir/Pass/Pass.h
The file was modifiedmlir/unittests/Dialect/SPIRV/DeserializationTest.cpp
Commit 20563933875a9396c8ace9c9770ecf6a988c4ea6 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.

Differential Revision: https://reviews.llvm.org/D85622
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/PassDetail.h
The file was modifiedmlir/examples/toy/Ch6/mlir/LowerToAffineLoops.cpp
The file was modifiedmlir/include/mlir/Transforms/Passes.td
The file was modifiedmlir/test/lib/Dialect/Affine/TestVectorizationUtils.cpp
The file was modifiedmlir/examples/toy/Ch7/mlir/LowerToLLVM.cpp
The file was modifiedmlir/lib/Transforms/PassDetail.h
The file was modifiedmlir/examples/toy/Ch7/toyc.cpp
The file was modifiedmlir/lib/Pass/Pass.cpp
The file was modifiedmlir/examples/toy/Ch3/toyc.cpp
The file was modifiedmlir/lib/IR/Verifier.cpp
The file was modifiedmlir/lib/TableGen/Pass.cpp
The file was modifiedmlir/include/mlir/Support/MlirOptMain.h
The file was modifiedmlir/include/mlir/Dialect/LLVMIR/LLVMDialect.h
The file was modifiedmlir/unittests/Pass/AnalysisManagerTest.cpp
The file was modifiedmlir/include/mlir/IR/MLIRContext.h
The file was modifiedmlir/include/mlir/TableGen/Dialect.h
The file was modifiedmlir/tools/mlir-opt/mlir-opt.cpp
The file was modifiedmlir/lib/Support/MlirOptMain.cpp
The file was modifiedmlir/include/mlir/IR/FunctionSupport.h
The file was modifiedmlir/examples/toy/Ch7/mlir/LowerToAffineLoops.cpp
The file was modifiedmlir/include/mlir/Pass/Pass.h
The file was modifiedmlir/unittests/SDBM/SDBMTest.cpp
The file was modifiedmlir/include/mlir/Dialect/Affine/Passes.td
The file was modifiedmlir/include/mlir/Pass/PassManager.h
The file was modifiedmlir/test/SDBM/sdbm-api-test.cpp
The file was modifiedmlir/include/mlir/TableGen/Pass.h
The file was modifiedmlir/include/mlir/Dialect/LLVMIR/NVVMOps.td
The file was modifiedmlir/lib/IR/Operation.cpp
The file was modifiedmlir/examples/standalone/standalone-opt/standalone-opt.cpp
The file was modifiedmlir/include/mlir/InitAllDialects.h
The file was modifiedmlir/include/mlir/IR/OpBase.td
The file was modifiedmlir/tools/mlir-translate/mlir-translate.cpp
The file was modifiedmlir/include/mlir/Dialect/Linalg/Passes.td
The file was modifiedmlir/lib/Conversion/LinalgToLLVM/LinalgToLLVM.cpp
The file was modifiedmlir/test/lib/Dialect/Test/TestPatterns.cpp
The file was modifiedmlir/test/CAPI/ir.c
The file was modifiedmlir/unittests/Dialect/Quant/QuantizationUtilsTest.cpp
The file was modifiedmlir/lib/CAPI/IR/IR.cpp
The file was modifiedmlir/lib/IR/MLIRContext.cpp
The file was modifiedmlir/include/mlir/Dialect/LLVMIR/ROCDLDialect.h
The file was modifiedflang/unittests/Lower/OpenMPLoweringTest.cpp
The file was modifiedmlir/include/mlir/Dialect/LLVMIR/LLVMOpBase.td
The file was modifiedmlir/examples/toy/Ch6/toyc.cpp
The file was modifiedmlir/lib/IR/Dialect.cpp
The file was modifiedmlir/unittests/IR/DialectTest.cpp
The file was modifiedmlir/test/lib/Transforms/TestLinalgTransforms.cpp
The file was modifiedmlir/tools/mlir-tblgen/DialectGen.cpp
The file was modifiedmlir/test/lib/Transforms/TestAllReduceLowering.cpp
The file was modifiedmlir/unittests/Dialect/SPIRV/SerializationTest.cpp
The file was modifiedmlir/unittests/IR/OperationSupportTest.cpp
The file was modifiedmlir/unittests/IR/AttributeTest.cpp
The file was modifiedmlir/lib/Conversion/GPUToVulkan/ConvertGPULaunchFuncToVulkanLaunchFunc.cpp
The file was modifiedmlir/test/lib/Dialect/SPIRV/TestAvailability.cpp
The file was modifiedmlir/lib/Dialect/Affine/Transforms/PassDetail.h
The file was modifiedmlir/lib/Parser/AttributeParser.cpp
The file was modifiedmlir/test/lib/Transforms/TestGpuMemoryPromotion.cpp
The file was modifiedmlir/include/mlir/InitAllTranslations.h
The file was modifiedmlir/include/mlir/Pass/PassBase.td
The file was modifiedmlir/test/lib/Transforms/TestVectorTransforms.cpp
The file was modifiedmlir/unittests/TableGen/OpBuildGen.cpp
The file was modifiedmlir/unittests/TableGen/StructsGenTest.cpp
The file was modifiedmlir/lib/Target/LLVMIR/ConvertFromLLVMIR.cpp
The file was modifiedmlir/examples/toy/Ch5/toyc.cpp
The file was modifiedmlir/include/mlir-c/IR.h
The file was modifiedmlir/lib/Dialect/SDBM/SDBMExpr.cpp
The file was modifiedmlir/lib/Pass/PassDetail.h
The file was modifiedmlir/lib/TableGen/Dialect.cpp
The file was modifiedmlir/lib/Conversion/PassDetail.h
The file was modifiedmlir/include/mlir/Dialect/SCF/Passes.td
The file was modifiedmlir/examples/toy/Ch6/mlir/LowerToLLVM.cpp
The file was modifiedmlir/lib/Target/LLVMIR/ModuleTranslation.cpp
The file was modifiedmlir/lib/Parser/DialectSymbolParser.cpp
The file was modifiedmlir/tools/mlir-tblgen/PassGen.cpp
The file was modifiedmlir/examples/toy/Ch2/toyc.cpp
The file was modifiedmlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
The file was modifiedmlir/test/mlir-opt/commandline.mlir
The file was modifiedmlir/examples/toy/Ch5/mlir/LowerToAffineLoops.cpp
The file was modifiedmlir/test/EDSC/builder-api-test.cpp
The file was modifiedmlir/include/mlir/Dialect/LLVMIR/NVVMDialect.h
The file was modifiedmlir/include/mlir/Dialect/LLVMIR/ROCDLOps.td
The file was modifiedmlir/unittests/Dialect/SPIRV/DeserializationTest.cpp
The file was modifiedmlir/lib/Conversion/StandardToLLVM/StandardToLLVM.cpp
The file was modifiedmlir/include/mlir/Conversion/Passes.td
The file was modifiedmlir/lib/Parser/Parser.cpp
The file was modifiedmlir/examples/toy/Ch4/toyc.cpp
The file was modifiedmlir/lib/Dialect/SCF/Transforms/PassDetail.h
The file was modifiedmlir/lib/ExecutionEngine/JitRunner.cpp
The file was modifiedmlir/tools/mlir-linalg-ods-gen/mlir-linalg-ods-gen.cpp
The file was modifiedmlir/lib/Conversion/StandardToSPIRV/LegalizeStandardForSPIRV.cpp
The file was modifiedmlir/include/mlir/IR/Dialect.h
The file was modifiedmlir/test/lib/Transforms/TestBufferPlacement.cpp
The file was modifiedmlir/test/lib/Transforms/TestLinalgHoisting.cpp