[all-commits] [llvm/llvm-project] 926fb6: Express ownership transfer in PassManager API thro...

Mehdi Amini via All-commits all-commits at lists.llvm.org
Mon Dec 23 18:48:12 PST 2019


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 926fb685deadfed2042163145ac52311914bf5c2
      https://github.com/llvm/llvm-project/commit/926fb685deadfed2042163145ac52311914bf5c2
  Author: Mehdi Amini <aminim at google.com>
  Date:   2019-08-12 (Mon, 12 Aug 2019)

  Changed paths:
    M mlir/examples/Linalg/Linalg3/include/linalg3/Transforms.h
    M mlir/examples/Linalg/Linalg3/lib/Transforms.cpp
    M mlir/examples/toy/Ch4/include/toy/Passes.h
    M mlir/examples/toy/Ch4/mlir/ShapeInferencePass.cpp
    M mlir/examples/toy/Ch4/toyc.cpp
    M mlir/examples/toy/Ch5/include/toy/Lowering.h
    M mlir/examples/toy/Ch5/include/toy/Passes.h
    M mlir/examples/toy/Ch5/mlir/EarlyLowering.cpp
    M mlir/examples/toy/Ch5/mlir/LateLowering.cpp
    M mlir/examples/toy/Ch5/mlir/ShapeInferencePass.cpp
    M mlir/examples/toy/Ch5/toyc.cpp
    M mlir/include/mlir/Conversion/GPUToCUDA/GPUToCUDAPass.h
    M mlir/include/mlir/Conversion/GPUToNVVM/GPUToNVVMPass.h
    M mlir/include/mlir/Conversion/LoopsToGPU/LoopsToGPUPass.h
    M mlir/include/mlir/Conversion/StandardToLLVM/ConvertStandardToLLVMPass.h
    M mlir/include/mlir/Dialect/GPU/Passes.h
    M mlir/include/mlir/Dialect/QuantOps/Passes.h
    M mlir/include/mlir/Dialect/SPIRV/Passes.h
    M mlir/include/mlir/Linalg/Passes.h
    M mlir/include/mlir/Pass/Pass.h
    M mlir/include/mlir/Pass/PassManager.h
    M mlir/include/mlir/Pass/PassRegistry.h
    M mlir/include/mlir/Quantizer/Transforms/Passes.h
    M mlir/include/mlir/Transforms/Passes.h
    M mlir/lib/Conversion/GPUToCUDA/ConvertKernelFuncToCubin.cpp
    M mlir/lib/Conversion/GPUToCUDA/ConvertLaunchFuncToCudaCalls.cpp
    M mlir/lib/Conversion/GPUToCUDA/GenerateCubinAccessors.cpp
    M mlir/lib/Conversion/GPUToNVVM/LowerGpuOpsToNVVMOps.cpp
    M mlir/lib/Conversion/LoopsToGPU/LoopsToGPUPass.cpp
    M mlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp
    M mlir/lib/Conversion/StandardToSPIRV/ConvertStandardToSPIRVPass.cpp
    M mlir/lib/Dialect/GPU/Transforms/KernelOutlining.cpp
    M mlir/lib/Dialect/QuantOps/Transforms/ConvertConst.cpp
    M mlir/lib/Dialect/QuantOps/Transforms/ConvertSimQuant.cpp
    M mlir/lib/Linalg/Transforms/Fusion.cpp
    M mlir/lib/Linalg/Transforms/LowerToLLVMDialect.cpp
    M mlir/lib/Linalg/Transforms/LowerToLoops.cpp
    M mlir/lib/Linalg/Transforms/Tiling.cpp
    M mlir/lib/Pass/Pass.cpp
    M mlir/lib/Pass/PassDetail.h
    M mlir/lib/Quantizer/Transforms/AddDefaultStatsTestPass.cpp
    M mlir/lib/Quantizer/Transforms/InferQuantizedTypesPass.cpp
    M mlir/lib/Quantizer/Transforms/RemoveInstrumentationPass.cpp
    M mlir/lib/Transforms/AffineDataCopyGeneration.cpp
    M mlir/lib/Transforms/CSE.cpp
    M mlir/lib/Transforms/Canonicalizer.cpp
    M mlir/lib/Transforms/LoopCoalescing.cpp
    M mlir/lib/Transforms/LoopFusion.cpp
    M mlir/lib/Transforms/LoopInvariantCodeMotion.cpp
    M mlir/lib/Transforms/LoopTiling.cpp
    M mlir/lib/Transforms/LoopUnroll.cpp
    M mlir/lib/Transforms/LoopUnrollAndJam.cpp
    M mlir/lib/Transforms/LowerAffine.cpp
    M mlir/lib/Transforms/LowerVectorTransfers.cpp
    M mlir/lib/Transforms/MaterializeVectors.cpp
    M mlir/lib/Transforms/MemRefDataFlowOpt.cpp
    M mlir/lib/Transforms/PipelineDataTransfer.cpp
    M mlir/lib/Transforms/SimplifyAffineStructures.cpp
    M mlir/lib/Transforms/StripDebugInfo.cpp
    M mlir/lib/Transforms/Vectorize.cpp
    M mlir/test/lib/TestDialect/TestPatterns.cpp
    M mlir/test/lib/Transforms/TestConstantFold.cpp
    M mlir/test/lib/Transforms/TestLoopFusion.cpp
    M mlir/test/lib/Transforms/TestLoopMapping.cpp
    M mlir/test/lib/Transforms/TestLoopParametricTiling.cpp
    M mlir/test/lib/Transforms/TestVectorizationUtils.cpp

  Log Message:
  -----------
  Express ownership transfer in PassManager API through std::unique_ptr (NFC)

Since raw pointers are always passed around for IR construct without
implying any ownership transfer, it can be error prone to have implicit
ownership transferred the same way.
For example this code can seem harmless:

  Pass *pass = ....
  pm.addPass(pass);
  pm.addPass(pass);
  pm.run(module);

PiperOrigin-RevId: 263053082


  Commit: 88de8b2a2bb09e4e3ebb829949e0256c3e86c609
      https://github.com/llvm/llvm-project/commit/88de8b2a2bb09e4e3ebb829949e0256c3e86c609
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2019-08-13 (Tue, 13 Aug 2019)

  Changed paths:
    M mlir/lib/Conversion/GPUToCUDA/GenerateCubinAccessors.cpp
    M mlir/test/Conversion/GPUToCUDA/insert-cubin-getter.mlir

  Log Message:
  -----------
  GenerateCubinAccessors: use LLVM dialect constants

The GenerateCubinAccessors was generating functions that fill
dynamically-allocated memory with the binary constant of a CUBIN attached as a
stirng attribute to the GPU kernel.  This approach was taken to circumvent the
missing support for global constants in the LLVM dialect (and MLIR in general).
Global constants were recently added to the LLVM dialect.  Change the
GenerateCubinAccessors pass to emit a global constant array of characters and a
function that returns a pointer to the first character in the array.

PiperOrigin-RevId: 263092052


  Commit: 5f0a843144289050844109f16693c86168135dac
      https://github.com/llvm/llvm-project/commit/5f0a843144289050844109f16693c86168135dac
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2019-08-13 (Tue, 13 Aug 2019)

  Changed paths:
    M mlir/include/mlir/LLVMIR/LLVMOps.td
    A mlir/test/Target/llvmir-intrinsics.mlir

  Log Message:
  -----------
  LLVM dialect: introduce fmuladd intrinsic as operation

This operation is important to achieve decent performance in computational
kernels.  In LLVM, it is implemented as an intrinsic (through function
declaration and function call).  Thanks to MLIR's extendable set of operations,
it does not have to differentiate between built-ins and intrinsics, so fmuladd
is introduced as a general type-polymorphic operation.  Custom printing and
parsing will be added later.

PiperOrigin-RevId: 263106305


  Commit: b09dfcb1d761fcf88ac80cfa98b7e39c45242286
      https://github.com/llvm/llvm-project/commit/b09dfcb1d761fcf88ac80cfa98b7e39c45242286
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2019-08-13 (Tue, 13 Aug 2019)

  Changed paths:
    M mlir/lib/Linalg/Transforms/LowerToLLVMDialect.cpp
    M mlir/test/Linalg/llvm.mlir

  Log Message:
  -----------
  Fix indexing issue in lowering of linalg.slice

This CL fixes the stepping through operands when emitting the view sizes of linalg.slice to LLVMIR. This is now consistent with the strides emission.

A relevant test is added.

Fix suggested by Alex Zinenko, thanks!

PiperOrigin-RevId: 263150922


  Commit: 12ff145ebfb54358e16649e8cc888f76292e2f75
      https://github.com/llvm/llvm-project/commit/12ff145ebfb54358e16649e8cc888f76292e2f75
  Author: jpienaar <jpienaar at google.com>
  Date:   2019-08-13 (Tue, 13 Aug 2019)

  Changed paths:
    M mlir/lib/TableGen/Pattern.cpp

  Log Message:
  -----------
  Add unreachable to avoid GCC -Wreturn-type warning

GCC warns of control reaching end of non-void function (-Wreturn-type).

Closes tensorflow/mlir#75

PiperOrigin-RevId: 263214601


  Commit: a9d4015da9489786f063bea07029056e037cbdd3
      https://github.com/llvm/llvm-project/commit/a9d4015da9489786f063bea07029056e037cbdd3
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-08-13 (Tue, 13 Aug 2019)

  Changed paths:
    A mlir/utils/generate-test-checks.py

  Log Message:
  -----------
  Add a utility script to auto-generate CHECK commands for mlir test cases.

This script is a utility to add FileCheck patterns to an mlir file. The script will heuristically insert CHECK/CHECK-LABEL commands for each line within the file. By default this script will also try to insert string substitution blocks for all SSA value names. The script is designed to make adding checks to a test case fast, it is *not* designed to be authoritative about what constitutes a good test!

Note: Some cases may not be handled well, e.g. operands to operations with regions, but this script is only intended to be a starting point.

Example usage:
$ generate-test-checks.py foo.mlir
$ mlir-opt foo.mlir -transformation | generate-test-checks.py

module {
  func @fold_extract_element(%arg0: index) -> (f32, f16, f16, i32) {
    %cst = constant 4.500000e+00 : f32
    %cst_0 = constant -2.000000e+00 : f16
    %cst_1 = constant 0.000000e+00 : f16
    %c64_i32 = constant 64 : i32
    return %cst, %cst_0, %cst_1, %c64_i32 : f32, f16, f16, i32
  }
}

// CHECK-LABEL:   func @fold_extract_element(
// CHECK-SAME:                               [[VAL_0:%.*]]: index) -> (f32, f16, f16, i32) {
// CHECK:           [[VAL_1:%.*]] = constant 4.500000e+00 : f32
// CHECK:           [[VAL_2:%.*]] = constant -2.000000e+00 : f16
// CHECK:           [[VAL_3:%.*]] = constant 0.000000e+00 : f16
// CHECK:           [[VAL_4:%.*]] = constant 64 : i32
// CHECK:           return [[VAL_1]], [[VAL_2]], [[VAL_3]], [[VAL_4]] : f32, f16, f16, i32
// CHECK:         }

PiperOrigin-RevId: 263242983


  Commit: 4286c52ae8f1e8491c9031702691ce2d0d9c1366
      https://github.com/llvm/llvm-project/commit/4286c52ae8f1e8491c9031702691ce2d0d9c1366
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2019-08-14 (Wed, 14 Aug 2019)

  Changed paths:
    M mlir/include/mlir/Linalg/IR/LinalgBase.td
    M mlir/include/mlir/Linalg/IR/LinalgOps.h
    M mlir/include/mlir/Linalg/IR/LinalgOps.td
    M mlir/lib/Linalg/Analysis/DependenceAnalysis.cpp
    M mlir/lib/Linalg/IR/LinalgOps.cpp
    M mlir/lib/Linalg/IR/LinalgTypes.cpp
    M mlir/lib/Linalg/Transforms/LowerToLLVMDialect.cpp
    R mlir/test/Linalg/invalid-generic-op.mlir
    A mlir/test/Linalg/invalid.mlir

  Log Message:
  -----------
  Move linalg.slice to ODS

PiperOrigin-RevId: 263334168


  Commit: 4f10c9b1cefe187947b9a3be60fc88c8548396e3
      https://github.com/llvm/llvm-project/commit/4f10c9b1cefe187947b9a3be60fc88c8548396e3
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2019-08-14 (Wed, 14 Aug 2019)

  Changed paths:
    M mlir/lib/Linalg/Transforms/LowerToLLVMDialect.cpp
    M mlir/test/Linalg/llvm.mlir

  Log Message:
  -----------
  Refactor linalg.view lowering to LLVM - NFC

This CL fuses the emission of size and stride information and makes it clearer which indexings are stepped over when querying the positions. This refactor was motivated by an index calculation bug in the stride computation.

PiperOrigin-RevId: 263341610


  Commit: ae9ec43e4631d1624afd36f7618c0f7bbf9bd2a5
      https://github.com/llvm/llvm-project/commit/ae9ec43e4631d1624afd36f7618c0f7bbf9bd2a5
  Author: Ben Vanik <benvanik at google.com>
  Date:   2019-08-14 (Wed, 14 Aug 2019)

  Changed paths:
    M mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp

  Log Message:
  -----------
  Allow the use of the $cppClass template variable in verifier code blocks.

PiperOrigin-RevId: 263378198


  Commit: f32f291b375f25f86b93b8b1d41f0c8e98bf5ae4
      https://github.com/llvm/llvm-project/commit/f32f291b375f25f86b93b8b1d41f0c8e98bf5ae4
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2019-08-14 (Wed, 14 Aug 2019)

  Changed paths:
    M mlir/include/mlir/Linalg/IR/LinalgOps.h
    M mlir/include/mlir/Linalg/IR/LinalgOps.td
    M mlir/lib/Linalg/IR/LinalgOps.cpp
    M mlir/lib/Linalg/IR/LinalgTypes.cpp
    M mlir/test/Linalg/invalid.mlir
    M mlir/test/Linalg/roundtrip.mlir

  Log Message:
  -----------
  Move remaining linalg ops to ODS - NFC

This CL moves the linalg.load/range/store ops to ODS.
Minor cleanups are performed.
Additional invalid IR tests are added for coverage.

PiperOrigin-RevId: 263432110


  Commit: a481032a3313c44996c3414d91473b494ddb098e
      https://github.com/llvm/llvm-project/commit/a481032a3313c44996c3414d91473b494ddb098e
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-08-14 (Wed, 14 Aug 2019)

  Changed paths:
    M mlir/examples/toy/Ch5/mlir/LateLowering.cpp
    M mlir/include/mlir/IR/Attributes.h
    M mlir/lib/Dialect/SPIRV/Serialization/Serializer.cpp
    M mlir/lib/IR/Attributes.cpp
    M mlir/lib/Quantizer/Configurations/FxpMathConfig.cpp
    M mlir/lib/Quantizer/Support/Statistics.cpp
    M mlir/lib/StandardOps/Ops.cpp
    M mlir/test/Transforms/constant-fold.mlir

  Log Message:
  -----------
  Refactor ElementsAttr::getValue and DenseElementsAttr::getSplatValue.

All 'getValue' variants now require that the index is valid, queryable via 'isValidIndex'. 'getSplatValue' now requires that the attribute is a proper splat. This allows for querying these methods on DenseElementAttr with all possible value types; e.g. float, int, APInt, etc. This also allows for removing unnecessary conversions to Attribute that really want the underlying value.

PiperOrigin-RevId: 263437337


  Commit: 92a7b1080eb055d3af031be2b88b0e487fdc1ff2
      https://github.com/llvm/llvm-project/commit/92a7b1080eb055d3af031be2b88b0e487fdc1ff2
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-08-14 (Wed, 14 Aug 2019)

  Changed paths:
    A mlir/g3doc/Interfaces.md
    M mlir/include/mlir/IR/Dialect.h
    A mlir/include/mlir/IR/DialectInterface.h
    M mlir/lib/IR/Dialect.cpp

  Log Message:
  -----------
  Add support for Dialect interfaces.

Dialect interfaces are virtual apis registered to a specific dialect instance. Dialect interfaces are generally useful for transformation passes, or analyses, that want to opaquely operate on operations within a given dialect. These interfaces generally involve wide coverage over the entire dialect.

A dialect interface can be defined by inheriting from the CRTP base class DialectInterfaceBase::Base. This class provides the necessary utilities for registering an interface with the dialect so that it can be looked up later. Dialects overriding an interface may register an instance via 'Dialect::addInterfaces'. This API works very similarly to the respective addOperations/addTypes/etc. This will allow for a transformation/utility to later query the interface from an opaque dialect instance via 'getInterface<T>'.

A utility class 'DialectInterfaceCollection' is also provided that will collect all of the dialects that implement a specific interface within a given module. This allows for simplifying the API of interface lookups.

PiperOrigin-RevId: 263489015


  Commit: 30e9c2fe4fe93f288307159ba2a3e762c7ab2304
      https://github.com/llvm/llvm-project/commit/30e9c2fe4fe93f288307159ba2a3e762c7ab2304
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2019-08-15 (Thu, 15 Aug 2019)

  Changed paths:
    M mlir/lib/ExecutionEngine/ExecutionEngine.cpp

  Log Message:
  -----------
  ExecutionEngine: fix after upstream LLVM ORC update

LLVM r368707 updated the APIs in llvm::orc::DynamicLibrarySearchGenerator to
use unique_ptr for holding the instance of the generator.  Update our uses of
DynamicLibrarySearchGenerator in the ExecutionEngine to reflect that.

PiperOrigin-RevId: 263539855


  Commit: d71915420b39e2adacafe1a81fcdc37b9bf8c5c2
      https://github.com/llvm/llvm-project/commit/d71915420b39e2adacafe1a81fcdc37b9bf8c5c2
  Author: Mahesh Ravishankar <ravishankarm at google.com>
  Date:   2019-08-15 (Thu, 15 Aug 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/SPIRV/SPIRVBase.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVOps.td
    M mlir/lib/Dialect/SPIRV/SPIRVOps.cpp
    M mlir/lib/Dialect/SPIRV/Serialization/Deserializer.cpp
    M mlir/lib/Dialect/SPIRV/Serialization/Serializer.cpp
    M mlir/test/Dialect/SPIRV/Serialization/variables.mlir
    M mlir/test/Dialect/SPIRV/ops.mlir
    M mlir/utils/spirv/gen_spirv_dialect.py

  Log Message:
  -----------
  Add BuiltIn EnumAttr to SPIR-V dialect

Generate the EnumAttr to represent BuiltIns in SPIR-V dialect. The
builtIn can be specified as a StringAttr with value being the
name of the builtin. Extend Decoration (de)serialization to handle
BuiltIns.
Also fix an error in the SPIR-V dialect generator script.

PiperOrigin-RevId: 263596624


  Commit: cc980aa41651c2cbfcbd9048fb0788f4aa9ae475
      https://github.com/llvm/llvm-project/commit/cc980aa41651c2cbfcbd9048fb0788f4aa9ae475
  Author: Mahesh Ravishankar <ravishankarm at google.com>
  Date:   2019-08-15 (Thu, 15 Aug 2019)

  Changed paths:
    M mlir/include/mlir/Conversion/StandardToSPIRV/ConvertStandardToSPIRV.h
    M mlir/lib/Conversion/GPUToSPIRV/GPUToSPIRV.cpp
    M mlir/lib/Conversion/StandardToSPIRV/ConvertStandardToSPIRV.cpp

  Log Message:
  -----------
  Simplify the classes that support SPIR-V conversion.

Modify the Type converters to have a SPIRVBasicTypeConverter which
only handles conversion from standard types to SPIRV types. Rename
SPIRVEntryFnConverter to SPIRVTypeConverter. This contains the
SPIRVBasicTypeConverter within it.

Remove SPIRVFnLowering class and have separate utility methods to
lower a function as entry function or a non-entry function. The
current setup could end with diamond inheritence that is not very
friendly to use.  For example, you could define the following Op
conversion methods that lower from a dialect "Foo" which resuls in
diamond inheritance.

template<typename OpTy>
class FooDialect : public SPIRVOpLowering<OpTy> {...};
class FooFnLowering : public FooDialect, SPIRVFnLowering {...};

PiperOrigin-RevId: 263597101


  Commit: f826ceef3ce8bfea1b78ab7bb2c60c53eb13729a
      https://github.com/llvm/llvm-project/commit/f826ceef3ce8bfea1b78ab7bb2c60c53eb13729a
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2019-08-16 (Fri, 16 Aug 2019)

  Changed paths:
    M mlir/include/mlir/Conversion/VectorToLLVM/VectorToLLVM.h
    M mlir/include/mlir/VectorOps/VectorOps.td
    M mlir/lib/Conversion/VectorToLLVM/VectorToLLVM.cpp
    M mlir/lib/VectorOps/VectorOps.cpp
    M mlir/test/Conversion/VectorToLLVM/vector-to-llvm.mlir
    M mlir/test/Dialect/VectorOps/invalid.mlir
    M mlir/test/Dialect/VectorOps/ops.mlir

  Log Message:
  -----------
  Extend vector.outerproduct with an optional 3rd argument

This CL adds an optional third argument to the vector.outerproduct instruction.
When such a third argument is specified, it is added to the result of the outerproduct and  is lowered to FMA intrinsic when the lowering supports it.

In the future, we can add an attribute on the `vector.outerproduct` instruction to modify the operations for which to emit code (e.g. "+/*", "max/+", "min/+", "log/exp" ...).

This CL additionally performs minor cleanups in the vector lowering and adds tests to improve coverage.

This has been independently verified to result in proper fma instructions for haswell as follows.

Input:
```
func @outerproduct_add(%arg0: vector<17xf32>, %arg1: vector<8xf32>, %arg2: vector<17x8xf32>) -> vector<17x8xf32> {
  %2 = vector.outerproduct %arg0, %arg1, %arg2 : vector<17xf32>, vector<8xf32>
  return %2 : vector<17x8xf32>
}
}
```

Command:
```
mlir-opt vector-to-llvm.mlir -vector-lower-to-llvm-dialect --disable-pass-threading | mlir-opt -lower-to-cfg -lower-to-llvm | mlir-translate --mlir-to-llvmir | opt -O3 | llc -O3 -march=x86-64 -mcpu=haswell -mattr=fma,avx2
```

Output:
```
outerproduct_add:                       # @outerproduct_add
# %bb.0:
        ...
        vmovaps 112(%rbp), %ymm8
        vbroadcastss    %xmm0, %ymm0
        ...
        vbroadcastss    64(%rbp), %ymm15
        vfmadd213ps     144(%rbp), %ymm8, %ymm0 # ymm0 = (ymm8 * ymm0) + mem
        ...
        vfmadd213ps     400(%rbp), %ymm8, %ymm9 # ymm9 = (ymm8 * ymm9) + mem
        ...
```
PiperOrigin-RevId: 263743359


  Commit: c93c938df28250abb6f980ddaf7b444fcabfa59a
      https://github.com/llvm/llvm-project/commit/c93c938df28250abb6f980ddaf7b444fcabfa59a
  Author: Jacques Pienaar <jpienaar at google.com>
  Date:   2019-08-16 (Fri, 16 Aug 2019)

  Changed paths:
    M mlir/CMakeLists.txt

  Log Message:
  -----------
  Remove C++11 requirement set in cmakelists

C++14 is now the required.

PiperOrigin-RevId: 263772579


  Commit: f79fc1c181a01037d3cbdbc272752c15e05b3c78
      https://github.com/llvm/llvm-project/commit/f79fc1c181a01037d3cbdbc272752c15e05b3c78
  Author: Jacques Pienaar <jpienaar at google.com>
  Date:   2019-08-16 (Fri, 16 Aug 2019)

  Changed paths:
    M mlir/README.md

  Log Message:
  -----------
  C++14 is now default enabled in LLVM, remove obsolete CMake flag.

PiperOrigin-RevId: 263776602


  Commit: 9c29273ddc4666dd2dc1df53cc2901a59bad0b03
      https://github.com/llvm/llvm-project/commit/9c29273ddc4666dd2dc1df53cc2901a59bad0b03
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-08-16 (Fri, 16 Aug 2019)

  Changed paths:
    M mlir/lib/Transforms/DialectConversion.cpp

  Log Message:
  -----------
  Refactor DialectConversion to convert the signatures of blocks when they are moved.

Often we want to ensure that block arguments are converted before operations that use them. This refactors the current implementation to be cleaner/less frequent by triggering conversion when a set of blocks are moved/inlined; or when legalization is successful.

PiperOrigin-RevId: 263795005


  Commit: cf358017e644c1b35fde151adc444ac058771b45
      https://github.com/llvm/llvm-project/commit/cf358017e644c1b35fde151adc444ac058771b45
  Author: Denis Khalikov <dennis.khalikov at gmail.com>
  Date:   2019-08-16 (Fri, 16 Aug 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/SPIRV/SPIRVTypes.h
    M mlir/lib/Dialect/SPIRV/SPIRVDialect.cpp
    M mlir/lib/Dialect/SPIRV/SPIRVTypes.cpp
    M mlir/lib/Dialect/SPIRV/Serialization/Deserializer.cpp
    M mlir/lib/Dialect/SPIRV/Serialization/Serializer.cpp
    A mlir/test/Dialect/SPIRV/Serialization/array_stride.mlir
    M mlir/test/Dialect/SPIRV/types.mlir

  Log Message:
  -----------
  [spirv] Extend spv.array with Layoutinfo

Extend spv.array with Layoutinfo to support (de)serialization.

Closes tensorflow/mlir#80

PiperOrigin-RevId: 263795304


  Commit: 3191f9c5e074de8d9d220ee702d5298870bde032
      https://github.com/llvm/llvm-project/commit/3191f9c5e074de8d9d220ee702d5298870bde032
  Author: MLIR Team <no-reply at google.com>
  Date:   2019-08-16 (Fri, 16 Aug 2019)

  Changed paths:
    M mlir/g3doc/Dialects/Affine.md
    M mlir/g3doc/LangRef.md

  Log Message:
  -----------
  Fix minor typos in the documentation

PiperOrigin-RevId: 263805025


  Commit: 36c373129d2605a81fbb606b36f9e95b31e29a95
      https://github.com/llvm/llvm-project/commit/36c373129d2605a81fbb606b36f9e95b31e29a95
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-08-16 (Fri, 16 Aug 2019)

  Changed paths:
    M mlir/include/mlir/IR/StandardTypes.h
    M mlir/lib/IR/StandardTypes.cpp

  Log Message:
  -----------
  NFC: Move the Type::is* predicates to StandardTypes.cpp

These methods are currently defined 'inline' in StandardTypes.h, but this may create linker errors if StandardTypes.h isn't included at the use site.

PiperOrigin-RevId: 263850328


  Commit: 4fb971a9c4752f3e0e8407e0728fa57036400b90
      https://github.com/llvm/llvm-project/commit/4fb971a9c4752f3e0e8407e0728fa57036400b90
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-08-16 (Fri, 16 Aug 2019)

  Changed paths:
    M mlir/g3doc/WritingAPass.md
    M mlir/include/mlir/Pass/PassInstrumentation.h
    M mlir/lib/Pass/IRPrinting.cpp
    M mlir/lib/Pass/Pass.cpp
    M mlir/lib/Pass/PassTiming.cpp

  Log Message:
  -----------
  NFC: Refactor the PassInstrumentation framework to operate on Operation instead of llvm::Any.

Now that functions and modules are operations, Operation makes more sense as the opaque object to refer to both.

PiperOrigin-RevId: 263883913


  Commit: c268666f15ee5ad36ed39b0a38ec5bf9d58216d4
      https://github.com/llvm/llvm-project/commit/c268666f15ee5ad36ed39b0a38ec5bf9d58216d4
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-08-16 (Fri, 16 Aug 2019)

  Changed paths:
    M mlir/lib/StandardOps/Ops.cpp

  Log Message:
  -----------
  NFC: Modernize and cleanup standard ops.
PiperOrigin-RevId: 263891926


  Commit: d745101339f3e56f202311a0243d1ba7ef04f56a
      https://github.com/llvm/llvm-project/commit/d745101339f3e56f202311a0243d1ba7ef04f56a
  Author: Mahesh Ravishankar <ravishankarm at google.com>
  Date:   2019-08-17 (Sat, 17 Aug 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/SPIRV/SPIRVOps.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVStructureOps.td
    M mlir/include/mlir/IR/OpBase.td
    M mlir/lib/Conversion/StandardToSPIRV/ConvertStandardToSPIRV.cpp
    M mlir/lib/Dialect/SPIRV/SPIRVOps.cpp
    M mlir/lib/Dialect/SPIRV/Serialization/Deserializer.cpp
    M mlir/lib/Dialect/SPIRV/Serialization/Serializer.cpp
    M mlir/test/Conversion/GPUToSPIRV/simple.mlir
    M mlir/test/Dialect/SPIRV/Serialization/entry_interface.mlir
    M mlir/test/Dialect/SPIRV/Serialization/variables.mlir
    M mlir/test/Dialect/SPIRV/Serialization/variables_init.mlir
    M mlir/test/Dialect/SPIRV/ops.mlir

  Log Message:
  -----------
  Add spirv::GlobalVariableOp that allows module level definition of variables

FuncOps in MLIR use explicit capture. So global variables defined in
module scope need to have a symbol name and this should be used to
refer to the variable within the function. This deviates from SPIR-V
spec, which assigns an SSA value to variables at all scopes that can
be used to refer to the variable, which requires SPIR-V functions to
allow implicit capture. To handle this add a new op,
spirv::GlobalVariableOp that can be used to define module scope
variables.
Since instructions need an SSA value, an new spirv::AddressOfOp is
added to convert a symbol reference to an SSA value for use with other
instructions.
This also means the spirv::EntryPointOp instruction needs to change to
allow initializers to be specified using symbol reference instead of
SSA value
The current spirv::VariableOp which returns an SSA value (as defined
by SPIR-V spec) can still be used to define function-scope variables.
PiperOrigin-RevId: 263951109


  Commit: dbf8538b64a61d0b93420b293b8508b158377757
      https://github.com/llvm/llvm-project/commit/dbf8538b64a61d0b93420b293b8508b158377757
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-08-17 (Sat, 17 Aug 2019)

  Changed paths:
    M mlir/lib/IR/Types.cpp

  Log Message:
  -----------
  NFC: Add header blocks to improve readability.
PiperOrigin-RevId: 263951251


  Commit: 79f53b0cf1fd204af0a09c8e085dd09a1ce0b6d9
      https://github.com/llvm/llvm-project/commit/79f53b0cf1fd204af0a09c8e085dd09a1ce0b6d9
  Author: Jacques Pienaar <jpienaar at google.com>
  Date:   2019-08-17 (Sat, 17 Aug 2019)

  Changed paths:
    M mlir/examples/Linalg/Linalg3/lib/Transforms.cpp
    M mlir/examples/toy/Ch1/include/toy/Parser.h
    M mlir/examples/toy/Ch2/include/toy/Parser.h
    M mlir/examples/toy/Ch2/mlir/MLIRGen.cpp
    M mlir/examples/toy/Ch3/include/toy/Parser.h
    M mlir/examples/toy/Ch3/mlir/MLIRGen.cpp
    M mlir/examples/toy/Ch4/include/toy/Parser.h
    M mlir/examples/toy/Ch4/mlir/MLIRGen.cpp
    M mlir/examples/toy/Ch4/mlir/ShapeInferencePass.cpp
    M mlir/examples/toy/Ch5/include/toy/Parser.h
    M mlir/examples/toy/Ch5/mlir/EarlyLowering.cpp
    M mlir/examples/toy/Ch5/mlir/LateLowering.cpp
    M mlir/examples/toy/Ch5/mlir/MLIRGen.cpp
    M mlir/examples/toy/Ch5/mlir/ShapeInferencePass.cpp
    M mlir/g3doc/Tutorials/Toy/Ch-4.md
    M mlir/include/mlir/Conversion/StandardToLLVM/ConvertStandardToLLVMPass.h
    M mlir/include/mlir/IR/Dialect.h
    M mlir/include/mlir/IR/PatternMatch.h
    M mlir/include/mlir/Pass/AnalysisManager.h
    M mlir/include/mlir/Pass/Pass.h
    M mlir/include/mlir/Pass/PassRegistry.h
    M mlir/include/mlir/Quantizer/Support/ConstraintAnalysisGraph.h
    M mlir/lib/Analysis/AffineStructures.cpp
    M mlir/lib/Analysis/Dominance.cpp
    M mlir/lib/Analysis/Utils.cpp
    M mlir/lib/Conversion/GPUToCUDA/ConvertKernelFuncToCubin.cpp
    M mlir/lib/Conversion/GPUToCUDA/ConvertLaunchFuncToCudaCalls.cpp
    M mlir/lib/Conversion/GPUToCUDA/GenerateCubinAccessors.cpp
    M mlir/lib/Conversion/GPUToNVVM/LowerGpuOpsToNVVMOps.cpp
    M mlir/lib/Conversion/LoopsToGPU/LoopsToGPUPass.cpp
    M mlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp
    M mlir/lib/Conversion/StandardToSPIRV/ConvertStandardToSPIRVPass.cpp
    M mlir/lib/Dialect/GPU/Transforms/KernelOutlining.cpp
    M mlir/lib/Dialect/QuantOps/Transforms/ConvertConst.cpp
    M mlir/lib/Dialect/QuantOps/Transforms/ConvertSimQuant.cpp
    M mlir/lib/ExecutionEngine/ExecutionEngine.cpp
    M mlir/lib/IR/Diagnostics.cpp
    M mlir/lib/Linalg/Transforms/Fusion.cpp
    M mlir/lib/Linalg/Transforms/LowerToLLVMDialect.cpp
    M mlir/lib/Linalg/Transforms/LowerToLoops.cpp
    M mlir/lib/Linalg/Transforms/Tiling.cpp
    M mlir/lib/Pass/Pass.cpp
    M mlir/lib/Quantizer/Configurations/FxpMathConfig.cpp
    M mlir/lib/Quantizer/Support/ConstraintAnalysisGraph.cpp
    M mlir/lib/Quantizer/Transforms/AddDefaultStatsTestPass.cpp
    M mlir/lib/Quantizer/Transforms/InferQuantizedTypesPass.cpp
    M mlir/lib/Quantizer/Transforms/RemoveInstrumentationPass.cpp
    M mlir/lib/Support/FileUtilities.cpp
    M mlir/lib/TableGen/Pattern.cpp
    M mlir/lib/Transforms/AffineDataCopyGeneration.cpp
    M mlir/lib/Transforms/CSE.cpp
    M mlir/lib/Transforms/Canonicalizer.cpp
    M mlir/lib/Transforms/LoopCoalescing.cpp
    M mlir/lib/Transforms/LoopFusion.cpp
    M mlir/lib/Transforms/LoopInvariantCodeMotion.cpp
    M mlir/lib/Transforms/LoopTiling.cpp
    M mlir/lib/Transforms/LoopUnroll.cpp
    M mlir/lib/Transforms/LoopUnrollAndJam.cpp
    M mlir/lib/Transforms/LowerAffine.cpp
    M mlir/lib/Transforms/LowerVectorTransfers.cpp
    M mlir/lib/Transforms/MaterializeVectors.cpp
    M mlir/lib/Transforms/MemRefDataFlowOpt.cpp
    M mlir/lib/Transforms/PipelineDataTransfer.cpp
    M mlir/lib/Transforms/SimplifyAffineStructures.cpp
    M mlir/lib/Transforms/StripDebugInfo.cpp
    M mlir/lib/Transforms/Utils/Utils.cpp
    M mlir/lib/Transforms/Vectorize.cpp
    M mlir/test/lib/TestDialect/TestPatterns.cpp
    M mlir/test/lib/Transforms/TestConstantFold.cpp
    M mlir/test/lib/Transforms/TestLoopFusion.cpp
    M mlir/test/lib/Transforms/TestLoopMapping.cpp
    M mlir/test/lib/Transforms/TestLoopParametricTiling.cpp
    M mlir/test/lib/Transforms/TestVectorizationUtils.cpp
    M mlir/tools/mlir-cuda-runner/mlir-cuda-runner.cpp

  Log Message:
  -----------
  Change from llvm::make_unique to std::make_unique

Switch to C++14 standard method as llvm::make_unique has been removed (
https://reviews.llvm.org/D66259). Also mark some targets as c++14 to ease next
integrates.

PiperOrigin-RevId: 263953918


  Commit: 33a8642f537c409575a53b82f2607d730bdff639
      https://github.com/llvm/llvm-project/commit/33a8642f537c409575a53b82f2607d730bdff639
  Author: Jacques Pienaar <jpienaar at google.com>
  Date:   2019-08-18 (Sun, 18 Aug 2019)

  Changed paths:
    M mlir/lib/Support/JitRunner.cpp
    M mlir/tools/mlir-opt/mlir-opt.cpp
    M mlir/tools/mlir-tblgen/mlir-tblgen.cpp
    M mlir/tools/mlir-translate/mlir-translate.cpp

  Log Message:
  -----------
  InitLLVM already initializes PrettyStackTraceProgram

Remove extra PrettyStackTraceProgram and use InitLLVM consistently.

PiperOrigin-RevId: 264041205


  Commit: c9f37fca379035b6334b50380ef05b00026de0cc
      https://github.com/llvm/llvm-project/commit/c9f37fca379035b6334b50380ef05b00026de0cc
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2019-08-18 (Sun, 18 Aug 2019)

  Changed paths:
    M mlir/include/mlir/LLVMIR/LLVMOps.td
    M mlir/lib/LLVMIR/IR/LLVMDialect.cpp
    M mlir/test/LLVMIR/invalid.mlir
    M mlir/test/LLVMIR/roundtrip.mlir
    M mlir/test/Target/llvmir.mlir

  Log Message:
  -----------
  Add alignment support for llvm.alloca

Extend the LLVM dialect AllocaOp with an alignment attribute.

PiperOrigin-RevId: 264068306


  Commit: 9bf69e6a2e9d1ef60ac9e4efa8fda9b6c3560e63
      https://github.com/llvm/llvm-project/commit/9bf69e6a2e9d1ef60ac9e4efa8fda9b6c3560e63
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2019-08-19 (Mon, 19 Aug 2019)

  Changed paths:
    M mlir/include/mlir/LLVMIR/LLVMOps.td
    M mlir/include/mlir/Linalg/IR/LinalgBase.td
    M mlir/lib/Conversion/GPUToCUDA/ConvertLaunchFuncToCudaCalls.cpp
    M mlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp
    M mlir/lib/Linalg/Transforms/LowerToLLVMDialect.cpp
    M mlir/test/Linalg/llvm.mlir
    M mlir/test/mlir-cpu-runner/cblas_interface.cpp

  Log Message:
  -----------
  Refactor linalg lowering to LLVM

The linalg.view type used to be lowered to a struct containing a data pointer, offset, sizes/strides information. This was problematic when passing to external functions due to ABI, struct padding and alignment issues.

The linalg.view type is now lowered to LLVMIR as a *pointer* to a struct containing the data pointer, offset and sizes/strides. This simplifies the interfacing with external library functions and makes it trivial to add new functions without creating a shim that would go from a value type struct to a pointer type.

The consequences are that:
1. lowering explicitly uses llvm.alloca in lieu of llvm.undef and performs the proper llvm.load/llvm.store where relevant.
2. the shim creation function `getLLVMLibraryCallDefinition` disappears.
3. views are passed by pointer, scalars are passed by value. In the future, other structs will be passed by pointer (on a per-need basis).

PiperOrigin-RevId: 264183671


  Commit: 64abcd983ddcde4b9f27377fd718d04e88e35ab9
      https://github.com/llvm/llvm-project/commit/64abcd983ddcde4b9f27377fd718d04e88e35ab9
  Author: Lei Zhang <antiagainst at google.com>
  Date:   2019-08-19 (Mon, 19 Aug 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/SPIRV/SPIRVBase.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVOps.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVStructureOps.td
    M mlir/lib/Dialect/SPIRV/SPIRVOps.cpp
    A mlir/test/Dialect/SPIRV/Serialization/terminator.mlir
    M mlir/test/Dialect/SPIRV/ops.mlir
    M mlir/test/Dialect/SPIRV/structure-ops.mlir

  Log Message:
  -----------
  [spirv] Add spv.ReturnValue

This CL adds the spv.ReturnValue op and its tests. Also adds a
InFunctionScope trait to make sure that the op stays inside
a function. To be consistent, ModuleOnly trait is changed to
InModuleScope.

PiperOrigin-RevId: 264193081


  Commit: ba0fa92524ce0aea2385858016bdb08bd941a10d
      https://github.com/llvm/llvm-project/commit/ba0fa92524ce0aea2385858016bdb08bd941a10d
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-08-19 (Mon, 19 Aug 2019)

  Changed paths:
    M mlir/examples/Linalg/Linalg1/include/linalg1/Common.h
    M mlir/examples/Linalg/Linalg1/include/linalg1/LLVMIntrinsics.h
    M mlir/examples/Linalg/Linalg1/lib/Common.cpp
    M mlir/examples/Linalg/Linalg1/lib/ConvertToLLVMDialect.cpp
    M mlir/examples/Linalg/Linalg3/lib/ConvertToLLVMDialect.cpp
    M mlir/examples/toy/Ch2/mlir/MLIRGen.cpp
    M mlir/examples/toy/Ch3/mlir/MLIRGen.cpp
    M mlir/examples/toy/Ch4/mlir/MLIRGen.cpp
    M mlir/examples/toy/Ch4/mlir/ShapeInferencePass.cpp
    M mlir/examples/toy/Ch5/mlir/EarlyLowering.cpp
    M mlir/examples/toy/Ch5/mlir/LateLowering.cpp
    M mlir/examples/toy/Ch5/mlir/MLIRGen.cpp
    M mlir/examples/toy/Ch5/mlir/ShapeInferencePass.cpp
    M mlir/include/mlir/CMakeLists.txt
    M mlir/include/mlir/Dialect/CMakeLists.txt
    A mlir/include/mlir/Dialect/LLVMIR/CMakeLists.txt
    A mlir/include/mlir/Dialect/LLVMIR/LLVMDialect.h
    A mlir/include/mlir/Dialect/LLVMIR/LLVMOpBase.td
    A mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
    A mlir/include/mlir/Dialect/LLVMIR/NVVMDialect.h
    A mlir/include/mlir/Dialect/LLVMIR/NVVMOps.td
    A mlir/include/mlir/Dialect/SDBM/SDBM.h
    A mlir/include/mlir/Dialect/SDBM/SDBMDialect.h
    A mlir/include/mlir/Dialect/SDBM/SDBMExpr.h
    A mlir/include/mlir/Dialect/StandardOps/CMakeLists.txt
    A mlir/include/mlir/Dialect/StandardOps/Ops.h
    A mlir/include/mlir/Dialect/StandardOps/Ops.td
    M mlir/include/mlir/EDSC/Builders.h
    R mlir/include/mlir/LLVMIR/CMakeLists.txt
    R mlir/include/mlir/LLVMIR/LLVMDialect.h
    R mlir/include/mlir/LLVMIR/LLVMOpBase.td
    R mlir/include/mlir/LLVMIR/LLVMOps.td
    R mlir/include/mlir/LLVMIR/NVVMDialect.h
    R mlir/include/mlir/LLVMIR/NVVMOps.td
    R mlir/include/mlir/SDBM/SDBM.h
    R mlir/include/mlir/SDBM/SDBMDialect.h
    R mlir/include/mlir/SDBM/SDBMExpr.h
    R mlir/include/mlir/StandardOps/CMakeLists.txt
    R mlir/include/mlir/StandardOps/Ops.h
    R mlir/include/mlir/StandardOps/Ops.td
    M mlir/include/mlir/Transforms/Utils.h
    M mlir/lib/AffineOps/AffineOps.cpp
    M mlir/lib/Analysis/AffineAnalysis.cpp
    M mlir/lib/Analysis/AffineStructures.cpp
    M mlir/lib/Analysis/LoopAnalysis.cpp
    M mlir/lib/Analysis/MemRefBoundCheck.cpp
    M mlir/lib/Analysis/NestedMatcher.cpp
    M mlir/lib/Analysis/TestMemRefDependenceCheck.cpp
    M mlir/lib/Analysis/Utils.cpp
    M mlir/lib/Analysis/VectorAnalysis.cpp
    M mlir/lib/CMakeLists.txt
    M mlir/lib/Conversion/ControlFlowToCFG/ConvertControlFlowToCFG.cpp
    M mlir/lib/Conversion/GPUToCUDA/ConvertLaunchFuncToCudaCalls.cpp
    M mlir/lib/Conversion/GPUToCUDA/GenerateCubinAccessors.cpp
    M mlir/lib/Conversion/GPUToNVVM/LowerGpuOpsToNVVMOps.cpp
    M mlir/lib/Conversion/LoopsToGPU/LoopsToGPU.cpp
    M mlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp
    M mlir/lib/Conversion/StandardToSPIRV/ConvertStandardToSPIRV.cpp
    M mlir/lib/Conversion/StandardToSPIRV/StandardToSPIRV.td
    M mlir/lib/Conversion/VectorToLLVM/VectorToLLVM.cpp
    M mlir/lib/Dialect/CMakeLists.txt
    M mlir/lib/Dialect/FxpMathOps/Transforms/LowerUniformRealMath.cpp
    M mlir/lib/Dialect/GPU/IR/GPUDialect.cpp
    M mlir/lib/Dialect/GPU/Transforms/KernelOutlining.cpp
    A mlir/lib/Dialect/LLVMIR/CMakeLists.txt
    A mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
    A mlir/lib/Dialect/LLVMIR/IR/NVVMDialect.cpp
    M mlir/lib/Dialect/LoopOps/LoopOps.cpp
    M mlir/lib/Dialect/QuantOps/Transforms/ConvertConst.cpp
    A mlir/lib/Dialect/SDBM/CMakeLists.txt
    A mlir/lib/Dialect/SDBM/SDBM.cpp
    A mlir/lib/Dialect/SDBM/SDBMDialect.cpp
    A mlir/lib/Dialect/SDBM/SDBMExpr.cpp
    A mlir/lib/Dialect/SDBM/SDBMExprDetail.h
    M mlir/lib/Dialect/SPIRV/Serialization/ConvertFromBinary.cpp
    A mlir/lib/Dialect/StandardOps/CMakeLists.txt
    A mlir/lib/Dialect/StandardOps/DialectRegistration.cpp
    A mlir/lib/Dialect/StandardOps/Ops.cpp
    M mlir/lib/EDSC/Builders.cpp
    M mlir/lib/EDSC/Helpers.cpp
    R mlir/lib/LLVMIR/CMakeLists.txt
    R mlir/lib/LLVMIR/IR/LLVMDialect.cpp
    R mlir/lib/LLVMIR/IR/NVVMDialect.cpp
    M mlir/lib/Linalg/Transforms/LowerToLLVMDialect.cpp
    M mlir/lib/Linalg/Transforms/LowerToLoops.cpp
    M mlir/lib/Linalg/Utils/Utils.cpp
    M mlir/lib/Quantizer/Configurations/FxpMathConfig.cpp
    R mlir/lib/SDBM/CMakeLists.txt
    R mlir/lib/SDBM/SDBM.cpp
    R mlir/lib/SDBM/SDBMDialect.cpp
    R mlir/lib/SDBM/SDBMExpr.cpp
    R mlir/lib/SDBM/SDBMExprDetail.h
    R mlir/lib/StandardOps/CMakeLists.txt
    R mlir/lib/StandardOps/DialectRegistration.cpp
    R mlir/lib/StandardOps/Ops.cpp
    M mlir/lib/Support/JitRunner.cpp
    M mlir/lib/Target/LLVMIR/ConvertToNVVMIR.cpp
    M mlir/lib/Target/LLVMIR/ModuleTranslation.cpp
    M mlir/lib/Transforms/AffineDataCopyGeneration.cpp
    M mlir/lib/Transforms/LoopCoalescing.cpp
    M mlir/lib/Transforms/LoopFusion.cpp
    M mlir/lib/Transforms/LoopInvariantCodeMotion.cpp
    M mlir/lib/Transforms/LowerAffine.cpp
    M mlir/lib/Transforms/LowerVectorTransfers.cpp
    M mlir/lib/Transforms/MaterializeVectors.cpp
    M mlir/lib/Transforms/MemRefDataFlowOpt.cpp
    M mlir/lib/Transforms/PipelineDataTransfer.cpp
    M mlir/lib/Transforms/Utils/FoldUtils.cpp
    M mlir/lib/Transforms/Utils/GreedyPatternRewriteDriver.cpp
    M mlir/lib/Transforms/Utils/LoopFusionUtils.cpp
    M mlir/lib/Transforms/Utils/LoopUtils.cpp
    M mlir/lib/Transforms/Utils/Utils.cpp
    M mlir/lib/Transforms/Vectorize.cpp
    M mlir/test/EDSC/builder-api-test.cpp
    M mlir/test/SDBM/sdbm-api-test.cpp
    M mlir/test/lib/Transforms/TestConstantFold.cpp
    M mlir/test/lib/Transforms/TestLoopFusion.cpp
    M mlir/tools/mlir-cuda-runner/mlir-cuda-runner.cpp
    M mlir/unittests/SDBM/SDBMTest.cpp

  Log Message:
  -----------
  NFC: Move LLVMIR, SDBM, and StandardOps to the Dialect/ directory.
PiperOrigin-RevId: 264193915


  Commit: 377bfb3a142a83a8ecee5de5a6b5d571881fc2b6
      https://github.com/llvm/llvm-project/commit/377bfb3a142a83a8ecee5de5a6b5d571881fc2b6
  Author: Mahesh Ravishankar <ravishankarm at google.com>
  Date:   2019-08-19 (Mon, 19 Aug 2019)

  Changed paths:
    M mlir/lib/Dialect/SPIRV/SPIRVOps.cpp
    M mlir/test/Conversion/GPUToSPIRV/simple.mlir
    M mlir/test/Dialect/SPIRV/Serialization/entry_interface.mlir
    A mlir/test/Dialect/SPIRV/Serialization/variable_reference.mlir
    M mlir/test/Dialect/SPIRV/Serialization/variables.mlir
    M mlir/test/Dialect/SPIRV/Serialization/variables_init.mlir
    M mlir/test/Dialect/SPIRV/ops.mlir
    M mlir/test/Dialect/SPIRV/structure-ops.mlir

  Log Message:
  -----------
  Fix parsing/printing of spv.globalVariable and  spv._address_of

Change the prining/parsing of spv.globalVariable to print the type of
the variable after the ':' to be consistent with MLIR convention.
The spv._address_of should print the variable type after the ':'. It was
mistakenly printing the address of the return value. Add a (missing)
test that should have caught that.
Also move spv.globalVariable and spv._address_of tests to
structure-ops.mlir.

PiperOrigin-RevId: 264204686


  Commit: e152f0194fdaff632a5a9737d4ea057218871782
      https://github.com/llvm/llvm-project/commit/e152f0194fdaff632a5a9737d4ea057218871782
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-08-19 (Mon, 19 Aug 2019)

  Changed paths:
    M mlir/include/mlir/IR/OpBase.td
    M mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
    M mlir/tools/mlir-tblgen/RewriterGen.cpp

  Log Message:
  -----------
  NFC: Don't assume that all operation traits are within the 'OpTrait::' namespace.

This places an unnecessary restriction that all traits are within this namespace.

PiperOrigin-RevId: 264212000


  Commit: 8165f181d9a1ff503919d3625f6a48955a226b3c
      https://github.com/llvm/llvm-project/commit/8165f181d9a1ff503919d3625f6a48955a226b3c
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-08-19 (Mon, 19 Aug 2019)

  Changed paths:
    M mlir/g3doc/Interfaces.md
    M mlir/include/mlir/IR/OpBase.td
    M mlir/include/mlir/IR/OpDefinition.h
    M mlir/include/mlir/IR/OperationSupport.h
    M mlir/include/mlir/Linalg/IR/LinalgLibraryOps.td
    M mlir/include/mlir/Linalg/IR/LinalgOps.h

  Log Message:
  -----------
  Add support for Operation interfaces.

Operation interfaces, as the name suggests, are those registered at the
Operation level. These interfaces provide an opaque view into derived
operations, by providing a virtual interface that must be implemented. As an
example, the Linalg dialect implements an interface LinalgOp that provides
general queries about some of the dialects library operations. These queries may
provide things like: the number of parallel loops, the number of inputs and
outputs, etc.

Operation interfaces are defined by overriding the CRTP base class OpInterface.
This class takes as a template parameter, a `Traits` class that defines a
Concept and a Model class. These classes provide an implementation of
concept-based polymorphism, where the Concept defines a set of virtual methods
that are overridden by the Model that is templated on the concrete operation
type. It is important to note that these classes should be pure in that they
contain no non-static data members.

PiperOrigin-RevId: 264218741


  Commit: 36f48063ddb9eb43399d604f11653fc4c63894c9
      https://github.com/llvm/llvm-project/commit/36f48063ddb9eb43399d604f11653fc4c63894c9
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2019-08-19 (Mon, 19 Aug 2019)

  Changed paths:
    M mlir/include/mlir/Linalg/IR/LinalgOps.td
    M mlir/lib/Linalg/IR/LinalgOps.cpp
    M mlir/lib/Linalg/Transforms/LowerToLLVMDialect.cpp
    M mlir/test/Linalg/invalid.mlir
    M mlir/test/Linalg/llvm.mlir
    M mlir/test/Linalg/roundtrip.mlir
    M mlir/test/mlir-cpu-runner/linalg_integration_test.mlir

  Log Message:
  -----------
  Add alignment support to linalg.buffer_alloc

This CL adds an integer attribute to linalg.buffer_alloc and lowering to LLVM.
The alignment is constrained to be a positive power of 2.

Lowering to LLVM produces the pattern:
```
%[[alloc:.*]] = llvm.call @malloc(%[[s]]) : (!llvm.i64) -> !llvm<"i8*">
%[[cast:.*]] = llvm.bitcast %[[alloc]] : !llvm<"i8*"> to !llvm.i64
%[[rem:.*]] = llvm.urem %[[cast]], %[[c16]] : !llvm.i64
%[[drem:.*]] = llvm.sub %[[c16]], %[[rem]] : !llvm.i64
%[[off:.*]] = llvm.urem %[[drem]], %[[c16]] : !llvm.i64
llvm.getelementptr %{{.*}}[%[[off]]] : (!llvm<"i8*">, !llvm.i64) -> !llvm<"i8*">
```

where `ptr` is aligned on `align` by computing the address
`ptr + (align - ptr % align) % align`.

To allow dealloc op to still be able to free memory, additional information is needed in
the buffer type. The buffer type is thus extended with an extra i8* for the base allocation address.

PiperOrigin-RevId: 264244455


  Commit: 305516fcd386d0d3e186cd78e23cabfcb9ebe1bb
      https://github.com/llvm/llvm-project/commit/305516fcd386d0d3e186cd78e23cabfcb9ebe1bb
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-08-19 (Mon, 19 Aug 2019)

  Changed paths:
    M mlir/include/mlir/IR/OpBase.td
    M mlir/include/mlir/IR/OpImplementation.h
    M mlir/lib/Parser/Parser.cpp
    M mlir/test/IR/invalid-ops.mlir
    M mlir/test/IR/invalid.mlir
    M mlir/test/IR/parser.mlir
    M mlir/test/Transforms/test-legalizer.mlir
    M mlir/test/lib/TestDialect/TestDialect.cpp
    M mlir/test/lib/TestDialect/TestOps.td

  Log Message:
  -----------
  Allow isolated regions to form isolated SSA name scopes in the printer.

This will allow for naming values the same as existing SSA values for regions attached to operations that are isolated from above. This fits in with how the system already allows separate name scopes for sibling regions. This name shadowing can be enabled in the custom parser of operations by setting the 'enableNameShadowing' flag to true when calling 'parseRegion'.

%arg = constant 10 : i32
foo.op {
  %arg = constant 10 : i32
}

PiperOrigin-RevId: 264255999


  Commit: 2277b9fb5c235dccfbfb803fd81f3ffe3c09872a
      https://github.com/llvm/llvm-project/commit/2277b9fb5c235dccfbfb803fd81f3ffe3c09872a
  Author: Rob Suderman <suderman at google.com>
  Date:   2019-08-19 (Mon, 19 Aug 2019)

  Changed paths:
    M mlir/include/mlir/IR/OpBase.td

  Log Message:
  -----------
  Add DictionaryAttr to OpBase.td

PiperOrigin-RevId: 264262369


  Commit: 774b37b89b88e063aa4df47bd2637cf51283740c
      https://github.com/llvm/llvm-project/commit/774b37b89b88e063aa4df47bd2637cf51283740c
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-08-19 (Mon, 19 Aug 2019)

  Changed paths:
    A mlir/g3doc/DialectConversion.md
    M mlir/include/mlir/Transforms/DialectConversion.h

  Log Message:
  -----------
  Add a DialectConversion document detailing the conversion infrastructure.

This is an important piece of the infrastructure that is missing proper high level documentation on usage.

PiperOrigin-RevId: 264275482


  Commit: b628194013088e7b04f25d776908b4dd96ea7bbd
      https://github.com/llvm/llvm-project/commit/b628194013088e7b04f25d776908b4dd96ea7bbd
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2019-08-19 (Mon, 19 Aug 2019)

  Changed paths:
    M mlir/include/mlir/CMakeLists.txt
    M mlir/include/mlir/Dialect/CMakeLists.txt
    A mlir/include/mlir/Dialect/Linalg/Analysis/DependenceAnalysis.h
    A mlir/include/mlir/Dialect/Linalg/CMakeLists.txt
    A mlir/include/mlir/Dialect/Linalg/IR/CMakeLists.txt
    A mlir/include/mlir/Dialect/Linalg/IR/LinalgBase.td
    A mlir/include/mlir/Dialect/Linalg/IR/LinalgLibraryOps.td
    A mlir/include/mlir/Dialect/Linalg/IR/LinalgOps.h
    A mlir/include/mlir/Dialect/Linalg/IR/LinalgOps.td
    A mlir/include/mlir/Dialect/Linalg/IR/LinalgTraits.h
    A mlir/include/mlir/Dialect/Linalg/IR/LinalgTypes.h
    A mlir/include/mlir/Dialect/Linalg/Passes.h
    A mlir/include/mlir/Dialect/Linalg/Utils/Intrinsics.h
    A mlir/include/mlir/Dialect/Linalg/Utils/Utils.h
    A mlir/include/mlir/Dialect/VectorOps/CMakeLists.txt
    A mlir/include/mlir/Dialect/VectorOps/VectorOps.h
    A mlir/include/mlir/Dialect/VectorOps/VectorOps.td
    M mlir/include/mlir/EDSC/Builders.h
    R mlir/include/mlir/Linalg/Analysis/DependenceAnalysis.h
    R mlir/include/mlir/Linalg/CMakeLists.txt
    R mlir/include/mlir/Linalg/IR/CMakeLists.txt
    R mlir/include/mlir/Linalg/IR/LinalgBase.td
    R mlir/include/mlir/Linalg/IR/LinalgLibraryOps.td
    R mlir/include/mlir/Linalg/IR/LinalgOps.h
    R mlir/include/mlir/Linalg/IR/LinalgOps.td
    R mlir/include/mlir/Linalg/IR/LinalgTraits.h
    R mlir/include/mlir/Linalg/IR/LinalgTypes.h
    R mlir/include/mlir/Linalg/Passes.h
    R mlir/include/mlir/Linalg/Utils/Intrinsics.h
    R mlir/include/mlir/Linalg/Utils/Utils.h
    R mlir/include/mlir/VectorOps/CMakeLists.txt
    R mlir/include/mlir/VectorOps/VectorOps.h
    R mlir/include/mlir/VectorOps/VectorOps.td
    M mlir/lib/Analysis/LoopAnalysis.cpp
    M mlir/lib/Analysis/VectorAnalysis.cpp
    M mlir/lib/CMakeLists.txt
    M mlir/lib/Conversion/VectorToLLVM/VectorToLLVM.cpp
    M mlir/lib/Dialect/CMakeLists.txt
    A mlir/lib/Dialect/Linalg/Analysis/DependenceAnalysis.cpp
    A mlir/lib/Dialect/Linalg/CMakeLists.txt
    A mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
    A mlir/lib/Dialect/Linalg/IR/LinalgTypes.cpp
    A mlir/lib/Dialect/Linalg/LinalgRegistration.cpp
    A mlir/lib/Dialect/Linalg/Transforms/Fusion.cpp
    A mlir/lib/Dialect/Linalg/Transforms/LowerToLLVMDialect.cpp
    A mlir/lib/Dialect/Linalg/Transforms/LowerToLoops.cpp
    A mlir/lib/Dialect/Linalg/Transforms/Tiling.cpp
    A mlir/lib/Dialect/Linalg/Utils/Utils.cpp
    A mlir/lib/Dialect/VectorOps/CMakeLists.txt
    A mlir/lib/Dialect/VectorOps/DialectRegistration.cpp
    A mlir/lib/Dialect/VectorOps/VectorOps.cpp
    M mlir/lib/EDSC/Intrinsics.cpp
    R mlir/lib/Linalg/Analysis/DependenceAnalysis.cpp
    R mlir/lib/Linalg/CMakeLists.txt
    R mlir/lib/Linalg/IR/LinalgOps.cpp
    R mlir/lib/Linalg/IR/LinalgTypes.cpp
    R mlir/lib/Linalg/LinalgRegistration.cpp
    R mlir/lib/Linalg/Transforms/Fusion.cpp
    R mlir/lib/Linalg/Transforms/LowerToLLVMDialect.cpp
    R mlir/lib/Linalg/Transforms/LowerToLoops.cpp
    R mlir/lib/Linalg/Transforms/Tiling.cpp
    R mlir/lib/Linalg/Utils/Utils.cpp
    M mlir/lib/Transforms/LowerVectorTransfers.cpp
    M mlir/lib/Transforms/MaterializeVectors.cpp
    M mlir/lib/Transforms/Vectorize.cpp
    R mlir/lib/VectorOps/CMakeLists.txt
    R mlir/lib/VectorOps/DialectRegistration.cpp
    R mlir/lib/VectorOps/VectorOps.cpp
    M mlir/test/CMakeLists.txt
    M mlir/test/lit.site.cfg.py.in

  Log Message:
  -----------
  Move Linalg and VectorOps dialects to the Dialect subdir - NFC

PiperOrigin-RevId: 264277760


  Commit: 92c485a3b82c1fd389e4ce27fd3f4d315b1d08b4
      https://github.com/llvm/llvm-project/commit/92c485a3b82c1fd389e4ce27fd3f4d315b1d08b4
  Author: Chintan Kaur <kaurc at google.com>
  Date:   2019-08-19 (Mon, 19 Aug 2019)

  Changed paths:
    M mlir/g3doc/LangRef.md

  Log Message:
  -----------
  Fix minor typos and add missing syntax in the documentation.

PiperOrigin-RevId: 264281501


  Commit: 07ecb011a759ce8641c90caee239aadcaa39e7a9
      https://github.com/llvm/llvm-project/commit/07ecb011a759ce8641c90caee239aadcaa39e7a9
  Author: Uday Bondhugula <udayb at iisc.ac.in>
  Date:   2019-08-20 (Tue, 20 Aug 2019)

  Changed paths:
    M mlir/lib/IR/AffineExpr.cpp
    M mlir/test/IR/affine-map.mlir

  Log Message:
  -----------
  Fix AffineExpr::simplifyAdd bug

- fix missing check while simplifying an expression with floordiv to a
  mod
- fixes issue tensorflow/mlir#82

Signed-off-by: Uday Bondhugula <uday at polymagelabs.com>

Closes tensorflow/mlir#84

PiperOrigin-RevId: 264338353


  Commit: f55ac5c07643efa28a5bb621b08c0e5dc2f97f84
      https://github.com/llvm/llvm-project/commit/f55ac5c07643efa28a5bb621b08c0e5dc2f97f84
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2019-08-20 (Tue, 20 Aug 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/LLVMIR/LLVMDialect.h
    M mlir/include/mlir/IR/Builders.h
    M mlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp
    M mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
    M mlir/lib/IR/Builders.cpp
    M mlir/test/LLVMIR/convert-to-llvmir.mlir

  Log Message:
  -----------
  Add support for LLVM lowering of binary ops on n-D vector types

This CL allows binary operations on n-D vector types to be lowered to LLVMIR by performing an (n-1)-D extractvalue, 1-D vector operation and an (n-1)-D insertvalue.

PiperOrigin-RevId: 264339118


  Commit: 0f974817b5a1103ce5a17450dca7f09a16a4bd13
      https://github.com/llvm/llvm-project/commit/0f974817b5a1103ce5a17450dca7f09a16a4bd13
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2019-08-20 (Tue, 20 Aug 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
    M mlir/include/mlir/Dialect/VectorOps/VectorOps.td
    M mlir/test/Conversion/VectorToLLVM/vector-to-llvm.mlir
    M mlir/test/Target/llvmir-intrinsics.mlir

  Log Message:
  -----------
  LLVM dialect: prefix operations that correspond to intrinsics with "intr."

LLVM intrinsics have an open name space and their names can potentially overlap
with names of LLVM instructions (LLVM intrinsics are functions, not
instructions).  In MLIR, LLVM intrinsics are modeled as operations, so it needs
to make sure their names cannot clash with the instructions.  Use the "intr."
prefix for intrinsics in the LLVM dialect.

PiperOrigin-RevId: 264372173


  Commit: 0d82a292b0ddcee9737ac2a1234bedd3b149b7f1
      https://github.com/llvm/llvm-project/commit/0d82a292b0ddcee9737ac2a1234bedd3b149b7f1
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2019-08-20 (Tue, 20 Aug 2019)

  Changed paths:
    M mlir/lib/Support/JitRunner.cpp
    M mlir/test/mlir-cuda-runner/gpu-to-cubin.mlir

  Log Message:
  -----------
  JitRunner: support entry functions returning void

JitRunner can use as entry points functions that produce either a single
'!llvm.f32' value or a list of memrefs.  Memref support is legacy and was
introduced before MLIR could lower memref allocation and deallocation to
malloc/free calls so as to allocate the memory externally, and is likely to be
dropped in the future since it unconditionally runs affine+standard-to-llvm
lowering on the module instead of accepting the LLVM dialect.  CUDA runner
relies on memref-based flow in the runner without actually returning anything.
Introduce a runner flow to use functions that return void as entry points.

PiperOrigin-RevId: 264381686


  Commit: 006fcce44a2560c9a12e82c99a494971e5b1d7be
      https://github.com/llvm/llvm-project/commit/006fcce44a2560c9a12e82c99a494971e5b1d7be
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2019-08-20 (Tue, 20 Aug 2019)

  Changed paths:
    M mlir/include/mlir/Conversion/GPUToCUDA/GPUToCUDAPass.h
    M mlir/include/mlir/Dialect/LLVMIR/LLVMDialect.h
    M mlir/lib/Conversion/GPUToCUDA/ConvertLaunchFuncToCudaCalls.cpp
    M mlir/lib/Conversion/GPUToCUDA/GenerateCubinAccessors.cpp
    M mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
    M mlir/test/Conversion/GPUToCUDA/lower-launch-func-to-cuda.mlir

  Log Message:
  -----------
  ConvertLaunchFuncToCudaCalls: use LLVM dialect globals

This conversion has been using a stack-allocated array of i8 to store the
null-terminated kernel name in order to pass it to the CUDA wrappers expecting
a C string because the LLVM dialect was missing support for globals.  Now that
the suport is introduced, use a global instead.

Refactor global string construction from GenerateCubinAccessors into a common
utility function living in the LLVM namespace.

PiperOrigin-RevId: 264382489


  Commit: 5c7fd5ff32591ed3dee15257238002e676563069
      https://github.com/llvm/llvm-project/commit/5c7fd5ff32591ed3dee15257238002e676563069
  Author: Zhang <5205699+Naville at users.noreply.github.com>
  Date:   2019-08-20 (Tue, 20 Aug 2019)

  Changed paths:
    M mlir/g3doc/Tutorials/Toy/Ch-2.md

  Log Message:
  -----------
  Update Ch-2.md
--
406f1e8211f8f5017f44f46af750dec061e707a2 by Zhang <5205699+Naville at users.noreply.github.com>:

Update Ch-2.md

Closes tensorflow/mlir#93

PiperOrigin-RevId: 264392995


  Commit: 3d32ca97767c28b508711b382c91153c64b2a807
      https://github.com/llvm/llvm-project/commit/3d32ca97767c28b508711b382c91153c64b2a807
  Author: Andy Davis <andydavis at google.com>
  Date:   2019-08-20 (Tue, 20 Aug 2019)

  Changed paths:
    M mlir/g3doc/Passes.md

  Log Message:
  -----------
  Update MLIR code examples in Passes.md doc to use new affine.load/store dma_start/wait operations.

PiperOrigin-RevId: 264415037


  Commit: 9e6cf0d0258aa79b759db9c68a447071ab6ee4ab
      https://github.com/llvm/llvm-project/commit/9e6cf0d0258aa79b759db9c68a447071ab6ee4ab
  Author: Diego Caballero <diego.caballero at intel.com>
  Date:   2019-08-20 (Tue, 20 Aug 2019)

  Changed paths:
    M mlir/include/mlir/IR/AffineMap.h
    M mlir/lib/AffineOps/AffineOps.cpp
    M mlir/lib/IR/AffineMap.cpp
    M mlir/lib/IR/AffineMapDetail.h
    M mlir/lib/IR/AsmPrinter.cpp
    M mlir/lib/IR/Attributes.cpp
    M mlir/lib/IR/MLIRContext.cpp
    M mlir/test/EDSC/builder-api-test.cpp

  Log Message:
  -----------
  Fix build of affine load/store with empty map

tensorflow/mlir#58 fixed and exercised
verification of load/store ops using empty affine maps. Unfortunately,
it didn't exercise the creation of them. This PR addresses that aspect.
It removes the assumption of AffineMap having at least one result and
stores a pointer to MLIRContext as member of AffineMap.

* Add empty map support to affine.store + test
* Move MLIRContext to AffineMapStorage

Closes tensorflow/mlir#74

PiperOrigin-RevId: 264416260


  Commit: 82cf6051ee7157a2883210baab191345cbd075bc
      https://github.com/llvm/llvm-project/commit/82cf6051ee7157a2883210baab191345cbd075bc
  Author: Denis Khalikov <dennis.khalikov at gmail.com>
  Date:   2019-08-20 (Tue, 20 Aug 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/SPIRV/SPIRVBase.td
    M mlir/lib/Dialect/SPIRV/Serialization/Deserializer.cpp
    M mlir/lib/Dialect/SPIRV/Serialization/Serializer.cpp
    A mlir/test/Dialect/SPIRV/Serialization/struct.mlir

  Log Message:
  -----------
  [spirv] Support (de)serialization of spv.struct

Support (de)serialization of spv.struct with offset decorations.

Closes tensorflow/mlir#94

PiperOrigin-RevId: 264421427


  Commit: f4934bcc3e38812051f37a1aadbc4d20913ebadc
      https://github.com/llvm/llvm-project/commit/f4934bcc3e38812051f37a1aadbc4d20913ebadc
  Author: Lei Zhang <antiagainst at google.com>
  Date:   2019-08-20 (Tue, 20 Aug 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/SPIRV/SPIRVStructureOps.td
    M mlir/lib/Dialect/SPIRV/SPIRVOps.cpp
    M mlir/lib/Dialect/SPIRV/Serialization/Deserializer.cpp
    M mlir/lib/Dialect/SPIRV/Serialization/Serializer.cpp
    M mlir/test/Dialect/SPIRV/Serialization/spec_constant.mlir
    M mlir/test/Dialect/SPIRV/ops.mlir
    M mlir/test/Dialect/SPIRV/structure-ops.mlir

  Log Message:
  -----------
  Add spv.specConstant and spv._reference_of

Similar to global variables, specialization constants also live
in the module scope and can be referenced by instructions in
functions in native SPIR-V. A direct modelling would be to allow
functions in the SPIR-V dialect to implicit capture, but it means
we are losing the ability to write passes for Functions. While
in SPIR-V normally we want to process the module as a whole,
it's not common to see multiple functions get used so we'd like
to leave the door open for those cases. Therefore, similar to
global variables, we introduce spv.specConstant to model three
SPIR-V instructions: OpSpecConstantTrue, OpSpecConstantFalse,
and OpSpecConstant. They do not return SSA value results;
instead they have symbols and can only be referenced by the
symbols. To use it in a function, we need to have another op
spv._reference_of to turn the symbol into an SSA value. This
breaks the tie and makes functions still explicit capture.
Previously specialization constants were handled similarly as
normal constants. That is incorrect given that specialization
constant actually acts more like variable (without need to
load and store). E.g., they cannot be de-duplicated like normal
constants.

This CL also refines various documents and comments.

PiperOrigin-RevId: 264455172


  Commit: ffde975e215e8ccba2b96a05f66a5756bebc8b64
      https://github.com/llvm/llvm-project/commit/ffde975e215e8ccba2b96a05f66a5756bebc8b64
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-08-20 (Tue, 20 Aug 2019)

  Changed paths:
    M mlir/examples/Linalg/Linalg1/include/linalg1/Common.h
    M mlir/examples/Linalg/Linalg4/lib/Transforms.cpp
    R mlir/include/mlir/AffineOps/AffineOps.h
    R mlir/include/mlir/AffineOps/AffineOps.td
    R mlir/include/mlir/AffineOps/AffineOpsBase.td
    R mlir/include/mlir/AffineOps/CMakeLists.txt
    M mlir/include/mlir/CMakeLists.txt
    A mlir/include/mlir/Dialect/AffineOps/AffineOps.h
    A mlir/include/mlir/Dialect/AffineOps/AffineOps.td
    A mlir/include/mlir/Dialect/AffineOps/AffineOpsBase.td
    A mlir/include/mlir/Dialect/AffineOps/CMakeLists.txt
    M mlir/include/mlir/Dialect/CMakeLists.txt
    M mlir/include/mlir/Dialect/Linalg/IR/LinalgLibraryOps.td
    M mlir/include/mlir/EDSC/Builders.h
    R mlir/lib/AffineOps/AffineOps.cpp
    R mlir/lib/AffineOps/CMakeLists.txt
    R mlir/lib/AffineOps/DialectRegistration.cpp
    M mlir/lib/Analysis/AffineAnalysis.cpp
    M mlir/lib/Analysis/AffineStructures.cpp
    M mlir/lib/Analysis/LoopAnalysis.cpp
    M mlir/lib/Analysis/MemRefBoundCheck.cpp
    M mlir/lib/Analysis/NestedMatcher.cpp
    M mlir/lib/Analysis/SliceAnalysis.cpp
    M mlir/lib/Analysis/TestMemRefDependenceCheck.cpp
    M mlir/lib/Analysis/TestParallelismDetection.cpp
    M mlir/lib/Analysis/Utils.cpp
    M mlir/lib/Analysis/VectorAnalysis.cpp
    M mlir/lib/CMakeLists.txt
    M mlir/lib/Conversion/LoopsToGPU/LoopsToGPU.cpp
    M mlir/lib/Conversion/LoopsToGPU/LoopsToGPUPass.cpp
    A mlir/lib/Dialect/AffineOps/AffineOps.cpp
    A mlir/lib/Dialect/AffineOps/CMakeLists.txt
    A mlir/lib/Dialect/AffineOps/DialectRegistration.cpp
    M mlir/lib/Dialect/CMakeLists.txt
    M mlir/lib/Dialect/Linalg/Transforms/LowerToLoops.cpp
    M mlir/lib/Transforms/AffineDataCopyGeneration.cpp
    M mlir/lib/Transforms/LoopFusion.cpp
    M mlir/lib/Transforms/LoopInvariantCodeMotion.cpp
    M mlir/lib/Transforms/LoopTiling.cpp
    M mlir/lib/Transforms/LoopUnroll.cpp
    M mlir/lib/Transforms/LoopUnrollAndJam.cpp
    M mlir/lib/Transforms/LowerAffine.cpp
    M mlir/lib/Transforms/MaterializeVectors.cpp
    M mlir/lib/Transforms/MemRefDataFlowOpt.cpp
    M mlir/lib/Transforms/PipelineDataTransfer.cpp
    M mlir/lib/Transforms/Utils/LoopFusionUtils.cpp
    M mlir/lib/Transforms/Utils/LoopUtils.cpp
    M mlir/lib/Transforms/Utils/Utils.cpp
    M mlir/lib/Transforms/Vectorize.cpp
    M mlir/test/EDSC/builder-api-test.cpp
    M mlir/test/lib/Transforms/TestConstantFold.cpp
    M mlir/test/lib/Transforms/TestLoopFusion.cpp
    M mlir/test/lib/Transforms/TestVectorizationUtils.cpp

  Log Message:
  -----------
  NFC: Move AffineOps dialect to the Dialect sub-directory.
PiperOrigin-RevId: 264482571


  Commit: 35102ea2c3a98ee0707caea75711da77ac2b026b
      https://github.com/llvm/llvm-project/commit/35102ea2c3a98ee0707caea75711da77ac2b026b
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-08-20 (Tue, 20 Aug 2019)

  Changed paths:
    M mlir/g3doc/Dialects/Affine.md
    A mlir/g3doc/Dialects/Standard.md
    M mlir/g3doc/LangRef.md

  Log Message:
  -----------
  NFC: Move the LangRef documentation on StandardOps to a new document.

The LangRef should contain documentation about the core system, and standard ops is a dialect just like any other. This will also simplify the transition when StandardOps is eventually split apart.

PiperOrigin-RevId: 264514988


  Commit: 5e17730cdeed88551806e2587c65bb3690c7d06b
      https://github.com/llvm/llvm-project/commit/5e17730cdeed88551806e2587c65bb3690c7d06b
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-08-20 (Tue, 20 Aug 2019)

  Changed paths:
    M mlir/include/mlir/IR/DialectInterface.h
    M mlir/lib/IR/Dialect.cpp

  Log Message:
  -----------
  NFC: Use a DenseSet instead of a DenseMap for DialectInterfaceCollection.

The interfaces are looked up by dialect, which can always be retrieved from an interface instance.

PiperOrigin-RevId: 264516023


  Commit: ad8b410f161d9bdf830771683a010cd97553676d
      https://github.com/llvm/llvm-project/commit/ad8b410f161d9bdf830771683a010cd97553676d
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-08-20 (Tue, 20 Aug 2019)

  Changed paths:
    M mlir/lib/IR/MLIRContext.cpp

  Log Message:
  -----------
  NFC: Keep the dialect list in the context sorted by namespace.

Most dialects are initialized statically, which does not have a guaranteed initialization order. By keeping the dialect list sorted, we can guarantee a deterministic iteration order of dialects.

PiperOrigin-RevId: 264522875


  Commit: 69cf811d5b73c78144dad6234ad94c7c90bed370
      https://github.com/llvm/llvm-project/commit/69cf811d5b73c78144dad6234ad94c7c90bed370
  Author: Lei Zhang <antiagainst at google.com>
  Date:   2019-08-21 (Wed, 21 Aug 2019)

  Changed paths:
    M mlir/lib/Dialect/SPIRV/Serialization/Deserializer.cpp
    M mlir/test/Dialect/SPIRV/Serialization/constant.mlir
    M mlir/test/Dialect/SPIRV/Serialization/variable_reference.mlir

  Log Message:
  -----------
  Materialize spv.constants at use sites

In SPIR-V binary format, constants are placed at the module level
and referenced by instructions inside functions using their result
<id>s. To model this natively (using SSA values for result <id>s),
it means we need to have implicit capturing functions. We will
lose the ability to have function passes if going down that path.

Instead, this CL changes to materialize constants at their use
sites in deserialization. It's cheap to copy constants in MLIR
given that attributes is uniqued to MLIRContext. By localizing
constants into functions, we can preserve isolated functions.

PiperOrigin-RevId: 264582532


  Commit: 31cfee60773c6277f652aab5fa1f8f824a551627
      https://github.com/llvm/llvm-project/commit/31cfee60773c6277f652aab5fa1f8f824a551627
  Author: Lei Zhang <antiagainst at google.com>
  Date:   2019-08-21 (Wed, 21 Aug 2019)

  Changed paths:
    M mlir/include/mlir/TableGen/Pattern.h
    M mlir/lib/TableGen/Pattern.cpp
    M mlir/test/lib/TestDialect/TestOps.td
    M mlir/test/mlir-tblgen/pattern.mlir
    M mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
    M mlir/tools/mlir-tblgen/RewriterGen.cpp

  Log Message:
  -----------
  Support variadic ops in declarative rewrite rules

This CL extends declarative rewrite rules to support matching and
generating ops with variadic operands/results. For this, the
generated `matchAndRewrite()` method for each pattern now are
changed to

* Use "range" types for the local variables used to store captured
  values (`operand_range` for operands, `ArrayRef<Value *>` for
  values, *Op for results). This allows us to have a unified way
  of handling both single values and value ranges.
* Create local variables for each operand for op creation. If the
  operand is variadic, then a `SmallVector<Value*>` will be created
  to collect all values for that operand; otherwise a `Value*` will
  be created.
* Use a collective result type builder. All result types are
  specified via a single parameter to the builder.

We can use one result pattern to replace multiple results of the
matched root op. When that happens, it will require specifying
types for multiple results. Add a new collective-type builder.

PiperOrigin-RevId: 264588559


  Commit: 8d18fdf2d3dcd626ee326978ce6fdc948213fb4d
      https://github.com/llvm/llvm-project/commit/8d18fdf2d3dcd626ee326978ce6fdc948213fb4d
  Author: Lei Zhang <antiagainst at google.com>
  Date:   2019-08-21 (Wed, 21 Aug 2019)

  Changed paths:
    M mlir/lib/Dialect/SPIRV/SPIRVDialect.cpp
    M mlir/test/Dialect/SPIRV/Serialization/constant.mlir
    M mlir/test/Dialect/SPIRV/types.mlir

  Log Message:
  -----------
  [spirv] Support i1 as bool type

PiperOrigin-RevId: 264612014


  Commit: 7e1af594d2d3769d160659709a03b3a9bb22a6fa
      https://github.com/llvm/llvm-project/commit/7e1af594d2d3769d160659709a03b3a9bb22a6fa
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-08-21 (Wed, 21 Aug 2019)

  Changed paths:
    M mlir/include/mlir/IR/Dialect.h
    M mlir/include/mlir/IR/DialectInterface.h
    M mlir/include/mlir/IR/OpImplementation.h
    M mlir/lib/IR/AsmPrinter.cpp
    M mlir/lib/IR/Dialect.cpp

  Log Message:
  -----------
  Move the parser extensions for aliases currently on Dialect to a new OpAsmDialectInterface.

This will allow for adding more hooks for controlling parser behavior without bloating Dialect in the common case. This cl also adds iteration support to the DialectInterfaceCollection.

PiperOrigin-RevId: 264627846


  Commit: b9dc2e481818315f2f0d87455349f497f6118a4c
      https://github.com/llvm/llvm-project/commit/b9dc2e481818315f2f0d87455349f497f6118a4c
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-08-21 (Wed, 21 Aug 2019)

  Changed paths:
    M mlir/include/mlir/IR/Attributes.h
    M mlir/lib/IR/Attributes.cpp
    M mlir/lib/Target/LLVMIR/ModuleTranslation.cpp
    M mlir/test/Target/llvmir.mlir

  Log Message:
  -----------
  Add iterator support to ElementsAttr and SparseElementsAttr.

This will allow iterating the values of a non-opaque ElementsAttr, with all of the types currently supported by DenseElementsAttr. This should help reduce the amount of specialization on DenseElementsAttr.

PiperOrigin-RevId: 264637293


  Commit: 2e59b86541f61bbd7573c136b46b09599460876d
      https://github.com/llvm/llvm-project/commit/2e59b86541f61bbd7573c136b46b09599460876d
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-08-21 (Wed, 21 Aug 2019)

  Changed paths:
    M mlir/lib/IR/AsmPrinter.cpp

  Log Message:
  -----------
  NFC: Make the ModuleState field in the ModulePrinter optional.

The ModuleState is only used for printing aliases, which is only done when printing the top-level module.

PiperOrigin-RevId: 264664138


  Commit: b6182213504412292de137f3dd1feee8b96ad511
      https://github.com/llvm/llvm-project/commit/b6182213504412292de137f3dd1feee8b96ad511
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-08-21 (Wed, 21 Aug 2019)

  Changed paths:
    M mlir/include/mlir/IR/Attributes.h
    M mlir/lib/IR/Attributes.cpp
    M mlir/lib/Target/LLVMIR/ModuleTranslation.cpp
    M mlir/test/Target/llvmir.mlir

  Log Message:
  -----------
  Automated rollback of commit b9dc2e481818315f2f0d87455349f497f6118a4c

PiperOrigin-RevId: 264672975


  Commit: d661eda8114614bad69bb9901e30df941c6de061
      https://github.com/llvm/llvm-project/commit/d661eda8114614bad69bb9901e30df941c6de061
  Author: MLIR Team <no-reply at google.com>
  Date:   2019-08-21 (Wed, 21 Aug 2019)

  Changed paths:
    M mlir/include/mlir/IR/OpBase.td
    M mlir/test/lib/TestDialect/TestOps.td
    M mlir/test/mlir-tblgen/types.mlir

  Log Message:
  -----------
  [TableGen] Add a `StaticShapeMemRefOf` trait.

The trait specifies that the `MemRefOf` has to have a static shape.

PiperOrigin-RevId: 264692758


  Commit: c400c9a1ec8659fadc04326da3d3f586e29d4c5d
      https://github.com/llvm/llvm-project/commit/c400c9a1ec8659fadc04326da3d3f586e29d4c5d
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-08-21 (Wed, 21 Aug 2019)

  Changed paths:
    M mlir/include/mlir/IR/OpImplementation.h
    M mlir/lib/Dialect/StandardOps/Ops.cpp
    M mlir/lib/IR/AsmPrinter.cpp

  Log Message:
  -----------
  Add a hook to the OpAsmDialectInterface to allow providing a special name for the operation result.

This generalizes the current special handling for constant operations(they get named 'cst'/'true'/'false'/etc.)

PiperOrigin-RevId: 264723379


  Commit: 8869de5fbc5ea25899c379291270f9fe0305bca8
      https://github.com/llvm/llvm-project/commit/8869de5fbc5ea25899c379291270f9fe0305bca8
  Author: MLIR Team <no-reply at google.com>
  Date:   2019-08-21 (Wed, 21 Aug 2019)

  Changed paths:
    M mlir/lib/Parser/Parser.cpp

  Log Message:
  -----------
  NFC: Update in-code documentation for function-type.
PiperOrigin-RevId: 264723462


  Commit: 35ad095305b9c13fb4db9b9c4ec5d1dc8748bce7
      https://github.com/llvm/llvm-project/commit/35ad095305b9c13fb4db9b9c4ec5d1dc8748bce7
  Author: Chintan Kaur <kaurc at google.com>
  Date:   2019-08-21 (Wed, 21 Aug 2019)

  Changed paths:
    M mlir/g3doc/OpDefinitions.md
    M mlir/g3doc/TestingGuide.md

  Log Message:
  -----------
  Fix minor typos in TestingGuide and OpDefinitions.

PiperOrigin-RevId: 264733092


  Commit: cc0d337620ceeee7db346024050334d622cfc2c2
      https://github.com/llvm/llvm-project/commit/cc0d337620ceeee7db346024050334d622cfc2c2
  Author: MLIR Team <no-reply at google.com>
  Date:   2019-08-21 (Wed, 21 Aug 2019)

  Changed paths:
    M mlir/lib/Parser/Parser.cpp

  Log Message:
  -----------
  NFC: Update in-code documentation for type.
PiperOrigin-RevId: 264734014


  Commit: 748edce6b831a453831bf8d8688fdbae68d44e14
      https://github.com/llvm/llvm-project/commit/748edce6b831a453831bf8d8688fdbae68d44e14
  Author: Lei Zhang <antiagainst at google.com>
  Date:   2019-08-21 (Wed, 21 Aug 2019)

  Changed paths:
    M mlir/lib/Dialect/SPIRV/Serialization/ConvertFromBinary.cpp
    M mlir/lib/Dialect/SPIRV/Serialization/ConvertToBinary.cpp
    M mlir/test/Dialect/SPIRV/Serialization/access_chain.mlir
    M mlir/test/Dialect/SPIRV/Serialization/array_stride.mlir
    M mlir/test/Dialect/SPIRV/Serialization/bin_ops.mlir
    M mlir/test/Dialect/SPIRV/Serialization/constant.mlir
    M mlir/test/Dialect/SPIRV/Serialization/entry.mlir
    M mlir/test/Dialect/SPIRV/Serialization/entry_interface.mlir
    M mlir/test/Dialect/SPIRV/Serialization/execution_mode.mlir
    M mlir/test/Dialect/SPIRV/Serialization/load_store.mlir
    M mlir/test/Dialect/SPIRV/Serialization/minimal-module.mlir
    M mlir/test/Dialect/SPIRV/Serialization/spec_constant.mlir
    M mlir/test/Dialect/SPIRV/Serialization/struct.mlir
    M mlir/test/Dialect/SPIRV/Serialization/terminator.mlir
    M mlir/test/Dialect/SPIRV/Serialization/variable_reference.mlir
    M mlir/test/Dialect/SPIRV/Serialization/variables.mlir
    M mlir/test/Dialect/SPIRV/Serialization/variables_init.mlir

  Log Message:
  -----------
  Remove the wrapping function in SPIR-V (de)serialization

Previously Module and Function are builtinn constructs in MLIR.
Due to the structural requirements we must wrap the SPIR-V
module inside a Function inside a Module. Now the requirement
is lifted and we can remove the wrapping function! :)

PiperOrigin-RevId: 264736051


  Commit: fe3594f745f70244c0c32b8b3287799ff2cdcbc7
      https://github.com/llvm/llvm-project/commit/fe3594f745f70244c0c32b8b3287799ff2cdcbc7
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2019-08-21 (Wed, 21 Aug 2019)

  Changed paths:
    M mlir/include/mlir/ExecutionEngine/ExecutionEngine.h
    M mlir/lib/ExecutionEngine/CMakeLists.txt
    M mlir/lib/ExecutionEngine/ExecutionEngine.cpp

  Log Message:
  -----------
  Reduce reliance on custom grown Jit implementation - NFC

This CL makes use of the standard LLVM LLJIT and removes the need for a custom JIT implementation within MLIR.

To achieve this, one needs to clone (i.e. serde) the produced llvm::Module into a new LLVMContext. This is currently necessary because the llvm::LLVMContext is owned by the LLVMDialect, somewhat deep in the call hierarchy.

In the future we should remove the reliance of serding the llvm::Module by allowing the injection of an LLVMContext from the top-level. Unfortunately this will require deeper API changes and impact multiple places. It is therefore left for future work.

PiperOrigin-RevId: 264737459


  Commit: 62ced387e02a4ee7ad062462acaa0f9478c7deb7
      https://github.com/llvm/llvm-project/commit/62ced387e02a4ee7ad062462acaa0f9478c7deb7
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2019-08-21 (Wed, 21 Aug 2019)

  Changed paths:
    M mlir/lib/Dialect/Linalg/Transforms/LowerToLLVMDialect.cpp

  Log Message:
  -----------
  Remove dead getLLVMLibraryCallImplDefinition in Linalg's LowerToLLVMDialect.cpp - NFC

PiperOrigin-RevId: 264740014


  Commit: 1d10eb162c89e84e8a4470e3c2b1b93e60dd2644
      https://github.com/llvm/llvm-project/commit/1d10eb162c89e84e8a4470e3c2b1b93e60dd2644
  Author: Lei Zhang <antiagainst at google.com>
  Date:   2019-08-21 (Wed, 21 Aug 2019)

  Changed paths:
    M mlir/lib/Dialect/SPIRV/SPIRVOps.cpp
    M mlir/test/Dialect/SPIRV/ops.mlir

  Log Message:
  -----------
  Point to spv.AccessChain when reporting spv.AccessChain errors

PiperOrigin-RevId: 264742130


  Commit: 85bc8655f067f66f392124f06c91ca39ac065d57
      https://github.com/llvm/llvm-project/commit/85bc8655f067f66f392124f06c91ca39ac065d57
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-08-21 (Wed, 21 Aug 2019)

  Changed paths:
    M mlir/lib/Support/JitRunner.cpp

  Log Message:
  -----------
  Avoid assigning to an unchecked Error.

Fixes tensorflow/mlir#97

PiperOrigin-RevId: 264743395


  Commit: b9377d7ec6e6feca28a31df63e81eeb3e17b195b
      https://github.com/llvm/llvm-project/commit/b9377d7ec6e6feca28a31df63e81eeb3e17b195b
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-08-21 (Wed, 21 Aug 2019)

  Changed paths:
    M mlir/g3doc/Interfaces.md
    M mlir/g3doc/OpDefinitions.md
    M mlir/include/mlir/Dialect/Linalg/IR/CMakeLists.txt
    M mlir/include/mlir/Dialect/Linalg/IR/LinalgLibraryOps.td
    M mlir/include/mlir/Dialect/Linalg/IR/LinalgOps.h
    M mlir/include/mlir/IR/OpBase.td
    M mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
    M mlir/tools/mlir-tblgen/CMakeLists.txt
    A mlir/tools/mlir-tblgen/OpInterfacesGen.cpp

  Log Message:
  -----------
  Add support for generating operation interfaces from the ODS framework.

Operation interfaces generally require a bit of boilerplate code to connect all of the pieces together. This cl introduces mechanisms in the ODS to allow for generating operation interfaces via the 'OpInterface' class.

Providing a definition of the `OpInterface` class will auto-generate the c++
classes for the interface. An `OpInterface` includes a name, for the c++ class,
along with a list of interface methods. There are two types of methods that can be used with an interface, `InterfaceMethod` and `StaticInterfaceMethod`. They are both comprised of the same core components, with the distinction that `StaticInterfaceMethod` models a static method on the derived operation.

An `InterfaceMethod` is comprised of the following components:
    * ReturnType
      - A string corresponding to the c++ return type of the method.
    * MethodName
      - A string corresponding to the desired name of the method.
    * Arguments
      - A dag of strings that correspond to a c++ type and variable name
        respectively.
    * MethodBody (Optional)
      - An optional explicit implementation of the interface method.

def MyInterface : OpInterface<"MyInterface"> {
  let methods = [
    // A simple non-static method with no inputs.
    InterfaceMethod<"unsigned", "foo">,

    // A new non-static method accepting an input argument.
    InterfaceMethod<"Value *", "bar", (ins "unsigned":$i)>,

    // Query a static property of the derived operation.
    StaticInterfaceMethod<"unsigned", "fooStatic">,

    // Provide the definition of a static interface method.
    // Note: `ConcreteOp` corresponds to the derived operation typename.
    StaticInterfaceMethod<"Operation *", "create",
      (ins "OpBuilder &":$builder, "Location":$loc), [{
        return builder.create<ConcreteOp>(loc);
    }]>,

    // Provide a definition of the non-static method.
    // Note: `op` corresponds to the derived operation variable.
    InterfaceMethod<"unsigned", "getNumInputsAndOutputs", (ins), [{
      return op.getNumInputs() + op.getNumOutputs();
    }]>,
  ];

PiperOrigin-RevId: 264754898


  Commit: 38d4e0b6a1b00beb93436a9bcd47c05b3953361c
      https://github.com/llvm/llvm-project/commit/38d4e0b6a1b00beb93436a9bcd47c05b3953361c
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-08-22 (Thu, 22 Aug 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/Linalg/IR/LinalgOps.h
    M mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp

  Log Message:
  -----------
  NFC: Fix path of LinalgLibraryOpInterfaces inc files.
PiperOrigin-RevId: 264827908


  Commit: fa592908afe6f5459f05ee82f8908869a66e12cc
      https://github.com/llvm/llvm-project/commit/fa592908afe6f5459f05ee82f8908869a66e12cc
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2019-08-22 (Thu, 22 Aug 2019)

  Changed paths:
    M mlir/include/mlir/Conversion/StandardToLLVM/ConvertStandardToLLVM.h
    M mlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp

  Log Message:
  -----------
  Let LLVMOpLowering specify a PatternBenefit - NFC

Currently the benefit is always set to 1 which limits the ability to do A->B->C lowering

PiperOrigin-RevId: 264854146


  Commit: 0c7f3f7108de731ebf1f2393c422ee24bccafb73
      https://github.com/llvm/llvm-project/commit/0c7f3f7108de731ebf1f2393c422ee24bccafb73
  Author: Jacques Pienaar <jpienaar at google.com>
  Date:   2019-08-22 (Thu, 22 Aug 2019)

  Changed paths:
    M mlir/lib/Parser/Parser.cpp

  Log Message:
  -----------
  Split out parsing location into separate functions per instance

Split out method into specialized instances + add an early exit. Should be NFC, but simplifies reading the logic slightly IMHO.

PiperOrigin-RevId: 264855529


  Commit: b1ce4df505d7a4c04eac5fbabf4bb41216b3db8c
      https://github.com/llvm/llvm-project/commit/b1ce4df505d7a4c04eac5fbabf4bb41216b3db8c
  Author: Logan Chien <loganchien at google.com>
  Date:   2019-08-22 (Thu, 22 Aug 2019)

  Changed paths:
    M mlir/include/mlir/IR/OpBase.td
    M mlir/test/IR/attribute.mlir
    M mlir/test/lib/TestDialect/TestOps.td
    M mlir/test/mlir-tblgen/types.mlir

  Log Message:
  -----------
  Add Positive{I32,I64}Attr and HasAnyRankOfPred

This commit adds `PositiveI32Attr` and `PositiveI64Attr` to match positive
integers but not zero nor negative integers.  This commit also adds
`HasAnyRankOfPred` to match tensors with the specified ranks.

PiperOrigin-RevId: 264867046


  Commit: 27ed82f99c808289c56a6c51fd1cfe7c18fd73e1
      https://github.com/llvm/llvm-project/commit/27ed82f99c808289c56a6c51fd1cfe7c18fd73e1
  Author: Lei Zhang <antiagainst at google.com>
  Date:   2019-08-22 (Thu, 22 Aug 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/SPIRV/SPIRVBase.td
    M mlir/lib/Dialect/SPIRV/SPIRVOps.cpp
    M mlir/lib/Dialect/SPIRV/Serialization/Deserializer.cpp
    M mlir/lib/Dialect/SPIRV/Serialization/Serializer.cpp
    A mlir/test/Dialect/SPIRV/Serialization/capability.mlir
    M mlir/test/Dialect/SPIRV/structure-ops.mlir

  Log Message:
  -----------
  [spirv] Add support for capability (de)serialization

This CL pulls in capabilities defined in the spec and adds
support for (de)serialize capabilities of a spv.module.

PiperOrigin-RevId: 264877413


  Commit: 140b28ec129f4f0906150f04b702978f08d7d87e
      https://github.com/llvm/llvm-project/commit/140b28ec129f4f0906150f04b702978f08d7d87e
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-08-22 (Thu, 22 Aug 2019)

  Changed paths:
    M mlir/tools/mlir-tblgen/OpInterfacesGen.cpp

  Log Message:
  -----------
  NFC: Avoid reconstructing the OpInterface methods.
PiperOrigin-RevId: 264881293


  Commit: 6f1d4bb8dfde5023aad26319e14d7e051dfc4d95
      https://github.com/llvm/llvm-project/commit/6f1d4bb8dfde5023aad26319e14d7e051dfc4d95
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2019-08-22 (Thu, 22 Aug 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
    M mlir/lib/Dialect/Linalg/Transforms/LowerToLLVMDialect.cpp
    M mlir/test/Linalg/llvm.mlir

  Log Message:
  -----------
  Avoid overflow when lowering linalg.slice

linalg.subview used to lower to a slice with a bounded range resulting in correct bounded accesses. However linalg.slice could still index out of bounds. This CL moves the bounding to linalg.slice.

LLVM select and cmp ops gain a more idiomatic builder.

PiperOrigin-RevId: 264897125


  Commit: 02c8b0689196a5e6e17ed5c44f5d2384f71dd69d
      https://github.com/llvm/llvm-project/commit/02c8b0689196a5e6e17ed5c44f5d2384f71dd69d
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-08-22 (Thu, 22 Aug 2019)

  Changed paths:
    M mlir/g3doc/LangRef.md

  Log Message:
  -----------
  NFC: Remove mentions of the TensorFlow dialect from the langref.
PiperOrigin-RevId: 264904489


  Commit: 986f93001a8c004e87b9999ca98e5184bb7c075f
      https://github.com/llvm/llvm-project/commit/986f93001a8c004e87b9999ca98e5184bb7c075f
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-08-22 (Thu, 22 Aug 2019)

  Changed paths:
    M mlir/g3doc/LangRef.md

  Log Message:
  -----------
  NFC: Rework and cleanup the High-Level structure and Dialect sections.

Both sections are out-of-date and need to be updated. The dialect section is particularly bad in that it never actually mentions what a 'Dialect' is.

PiperOrigin-RevId: 264937905


  Commit: 51cbf97b53410f300329d39382af4511e36fa7b1
      https://github.com/llvm/llvm-project/commit/51cbf97b53410f300329d39382af4511e36fa7b1
  Author: Lei Zhang <antiagainst at google.com>
  Date:   2019-08-22 (Thu, 22 Aug 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/SPIRV/SPIRVBase.td
    M mlir/lib/Dialect/SPIRV/SPIRVOps.cpp
    M mlir/lib/Dialect/SPIRV/Serialization/Deserializer.cpp
    M mlir/lib/Dialect/SPIRV/Serialization/Serializer.cpp
    A mlir/test/Dialect/SPIRV/Serialization/extension.mlir
    M mlir/test/Dialect/SPIRV/structure-ops.mlir

  Log Message:
  -----------
  [spirv] Add support for extension (de)serialization

Only a few important KHR extensions are registered to the
SPIR-V dialect for now.

PiperOrigin-RevId: 264939428


  Commit: 9fc1657af09911e646650dc9086ab4bd790e34ef
      https://github.com/llvm/llvm-project/commit/9fc1657af09911e646650dc9086ab4bd790e34ef
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-08-22 (Thu, 22 Aug 2019)

  Changed paths:
    M mlir/g3doc/LangRef.md

  Log Message:
  -----------
  NFC: Cleanup the type system section of the LangRef.

* Alphabetize the type definitions
* Make 'Dialect specific types' a type-system subsection
* Merge Builtin types and Standard types

PiperOrigin-RevId: 264947721


  Commit: fc86c57bd09b455b141ce51abc20bf490e175447
      https://github.com/llvm/llvm-project/commit/fc86c57bd09b455b141ce51abc20bf490e175447
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-08-22 (Thu, 22 Aug 2019)

  Changed paths:
    M mlir/g3doc/LangRef.md

  Log Message:
  -----------
  NFC: Cleanup the Attribute section in the LangRef.

* Add a section on dialect attribute values and attribute aliases
* Move FloatAttr into its alphabetically correct place
* Add a "Standard Attribute Values" section

PiperOrigin-RevId: 264959306


  Commit: d906f84b52a6fea283d2f758cd1b98f450f12865
      https://github.com/llvm/llvm-project/commit/d906f84b52a6fea283d2f758cd1b98f450f12865
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-08-22 (Thu, 22 Aug 2019)

  Changed paths:
    M mlir/include/mlir/IR/Attributes.h
    M mlir/lib/IR/Attributes.cpp
    M mlir/lib/Target/LLVMIR/ModuleTranslation.cpp
    M mlir/test/Target/llvmir.mlir

  Log Message:
  -----------
  Add iterator support to ElementsAttr and SparseElementsAttr.

This will allow iterating the values of a non-opaque ElementsAttr, with all of the types currently supported by DenseElementsAttr. This should help reduce the amount of specialization on DenseElementsAttr.

PiperOrigin-RevId: 264968151


  Commit: a329d33b4fb7bab7dde086cc53ba5f64f99a50c1
      https://github.com/llvm/llvm-project/commit/a329d33b4fb7bab7dde086cc53ba5f64f99a50c1
  Author: MLIR Team <no-reply at google.com>
  Date:   2019-08-22 (Thu, 22 Aug 2019)

  Changed paths:
    M mlir/include/mlir/IR/OpBase.td
    M mlir/test/lib/TestDialect/TestOps.td
    M mlir/test/mlir-tblgen/types.mlir

  Log Message:
  -----------
  Add I32ElementsAttr to OpBase

PiperOrigin-RevId: 264969142


  Commit: f772d2c90cfa6d6c6d80ac652234108ab72c3c5a
      https://github.com/llvm/llvm-project/commit/f772d2c90cfa6d6c6d80ac652234108ab72c3c5a
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-08-23 (Fri, 23 Aug 2019)

  Changed paths:
    M mlir/g3doc/LangRef.md

  Log Message:
  -----------
  NFC: Move the operation, region, and block sections to after the dialect section.

Operations/Regions/Blocks represent the core IR building blocks and should be introduced before types and attributes.

PiperOrigin-RevId: 265079103


  Commit: 988dab0abc226b1b83f21cc5502f3d5070619caa
      https://github.com/llvm/llvm-project/commit/988dab0abc226b1b83f21cc5502f3d5070619caa
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2019-08-23 (Fri, 23 Aug 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/Linalg/IR/LinalgOps.td

  Log Message:
  -----------
  Fix BufferAllocOp builder.

One of the BufferAllocOp builders was improperly specified which triggered infinite recursion. This CL fixes it.

PiperOrigin-RevId: 265080371


  Commit: 21b77fc11ff6b5046fba3920c56a95ac8199e237
      https://github.com/llvm/llvm-project/commit/21b77fc11ff6b5046fba3920c56a95ac8199e237
  Author: Lei Zhang <antiagainst at google.com>
  Date:   2019-08-23 (Fri, 23 Aug 2019)

  Changed paths:
    A mlir/include/mlir/Dialect/SPIRV/SPIRVArithmeticOps.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVBase.td
    A mlir/include/mlir/Dialect/SPIRV/SPIRVLogicalOps.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVOps.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVStructureOps.td
    A mlir/test/Dialect/SPIRV/arithmetic-ops.mlir
    A mlir/test/Dialect/SPIRV/logical-ops.mlir
    M mlir/test/Dialect/SPIRV/ops.mlir

  Log Message:
  -----------
  [spirv] NFC: move arithmetic and logical ops to separate files

This is purely moving code around for better file organization.

PiperOrigin-RevId: 265082517


  Commit: 00177962ed13d58cd9d8825e093d7d25d3b9450f
      https://github.com/llvm/llvm-project/commit/00177962ed13d58cd9d8825e093d7d25d3b9450f
  Author: MLIR Team <no-reply at google.com>
  Date:   2019-08-23 (Fri, 23 Aug 2019)

  Changed paths:
    M mlir/lib/Parser/Parser.cpp

  Log Message:
  -----------
  NFC: Update in-code documentation. Make the two grammar definitions of static-dimension-list consistent.
PiperOrigin-RevId: 265084348


  Commit: 31a003dc3c17eba12f7dcb4dda626bc7ca41c0c5
      https://github.com/llvm/llvm-project/commit/31a003dc3c17eba12f7dcb4dda626bc7ca41c0c5
  Author: Chris Lattner <clattner at google.com>
  Date:   2019-08-23 (Fri, 23 Aug 2019)

  Changed paths:
    M mlir/include/mlir/IR/OpImplementation.h
    M mlir/lib/IR/AsmPrinter.cpp
    M mlir/test/IR/parser.mlir
    M mlir/test/lib/TestDialect/TestDialect.cpp
    M mlir/test/lib/TestDialect/TestOps.td

  Log Message:
  -----------
  Introduce the ability for "isolated from above" ops to introduce shadowing
names for the basic block arguments in their body.

PiperOrigin-RevId: 265084627


  Commit: 0e131d83fe2efd8e993ef1e348f098fa90871e00
      https://github.com/llvm/llvm-project/commit/0e131d83fe2efd8e993ef1e348f098fa90871e00
  Author: Lei Zhang <antiagainst at google.com>
  Date:   2019-08-23 (Fri, 23 Aug 2019)

  Changed paths:
    A mlir/include/mlir/Dialect/SPIRV/SPIRVControlFlowOps.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVOps.td
    M mlir/lib/Dialect/SPIRV/SPIRVOps.cpp
    A mlir/test/Dialect/SPIRV/control-flow-ops.mlir
    M mlir/test/Dialect/SPIRV/ops.mlir

  Log Message:
  -----------
  [spirv] NFC: move SPIR-V control flow ops to a separate file

This CL is also purely moving code around for better file organization.

PiperOrigin-RevId: 265092566


  Commit: 3d409386a06a946b5f32e19f110f3faa81151ce3
      https://github.com/llvm/llvm-project/commit/3d409386a06a946b5f32e19f110f3faa81151ce3
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2019-08-23 (Fri, 23 Aug 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/Linalg/IR/LinalgOps.td

  Log Message:
  -----------
  Update Linalg slice and subview documentation - NFC

PiperOrigin-RevId: 265092922


  Commit: 7f42b3d72130c2ef70e254fc89cb4a297fbdab7a
      https://github.com/llvm/llvm-project/commit/7f42b3d72130c2ef70e254fc89cb4a297fbdab7a
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2019-08-23 (Fri, 23 Aug 2019)

  Changed paths:
    M mlir/lib/Dialect/Linalg/Transforms/LowerToLLVMDialect.cpp
    M mlir/test/Linalg/llvm.mlir
    M mlir/test/mlir-cpu-runner/cblas_interface.cpp
    M mlir/test/mlir-cpu-runner/linalg_integration_test.mlir

  Log Message:
  -----------
  Add lowering of linalg.copy to an external C++ library and a test.

This CL extends support for lowering of linalg to external C++ libraries with CopyOp. Currently this can only work when the permutation maps in the copies are identity. Future support for permutations will be added later.

PiperOrigin-RevId: 265093025


  Commit: 32052c841713ff22a3b44c42b83b3b88bc44d21b
      https://github.com/llvm/llvm-project/commit/32052c841713ff22a3b44c42b83b3b88bc44d21b
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-08-23 (Fri, 23 Aug 2019)

  Changed paths:
    M mlir/include/mlir/IR/PatternMatch.h
    M mlir/lib/Transforms/Utils/GreedyPatternRewriteDriver.cpp

  Log Message:
  -----------
  NFC: Add a note to 'applyPatternsGreedily' that it also performs folding/dce.

Fixes tensorflow/mlir#72

PiperOrigin-RevId: 265097597


  Commit: 2c2c9ffd80c786775c7187d35a74b771f61d91e4
      https://github.com/llvm/llvm-project/commit/2c2c9ffd80c786775c7187d35a74b771f61d91e4
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2019-08-23 (Fri, 23 Aug 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/Linalg/IR/LinalgOps.td
    M mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
    M mlir/test/Linalg/invalid.mlir
    M mlir/test/Linalg/roundtrip.mlir

  Log Message:
  -----------
  Add a linalg.transpose op

A linalg.transpose op is a pure metadata operation that takes a view + permutation map and produces
another view of the same underlying data, with a different reindexing. This is a
pure metadata operation that does not touch the underlying data.

Example:

```
  %t = linalg.transpose %v (i, j) -> (j, i) : !linalg.view<?x?xf32>
```

PiperOrigin-RevId: 265139429


  Commit: 28e28e5d651b19a3f2a22c4fe4209a9d3d8c2689
      https://github.com/llvm/llvm-project/commit/28e28e5d651b19a3f2a22c4fe4209a9d3d8c2689
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2019-08-23 (Fri, 23 Aug 2019)

  Changed paths:
    M mlir/include/mlir/IR/Builders.h
    M mlir/lib/Dialect/Linalg/Transforms/LowerToLLVMDialect.cpp
    M mlir/test/Linalg/llvm.mlir

  Log Message:
  -----------
  Lower linalg.transpose to LLVM dialect

Add a conversion pattern that transforms a linalg.transpose op into:
   1. A function entry `alloca` operation to allocate a ViewDescriptor.
   2. A load of the ViewDescriptor from the pointer allocated in 1.
   3. Updates to the ViewDescriptor to introduce the data ptr, offset, size
      and stride. Size and stride are permutations of the original values.
   4. A store of the resulting ViewDescriptor to the alloca'ed pointer.
The linalg.transpose op is replaced by the alloca'ed pointer.

PiperOrigin-RevId: 265169112


  Commit: 46084c03f42f598f766028e63325dffd9d66b3d7
      https://github.com/llvm/llvm-project/commit/46084c03f42f598f766028e63325dffd9d66b3d7
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2019-08-23 (Fri, 23 Aug 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/Linalg/IR/LinalgLibraryOps.td
    M mlir/lib/Dialect/Linalg/Transforms/LowerToLLVMDialect.cpp
    M mlir/test/Linalg/llvm.mlir

  Log Message:
  -----------
  Lower linalg.copy to LLVM dialect in the presence of transposes.

Add an extra RewritePattern that does not convert types to rewrite a CopyOp that has non-identity permutations into a sequence of TransposeOp followed by a CopyOp without such permutations.

This RewitePattern is made to fail in the non-permutation case so that the conversion pattern can kick in to lower to LLVM.

This is an instance of A->A->B lowering where A->A is done by a RewritePattern in case_1 and A->B is done by a ConversionPatternRewriter when not(case_1).

PiperOrigin-RevId: 265171380


  Commit: 4da37417adcd78e95bfa554dbbfd29026dad5f71
      https://github.com/llvm/llvm-project/commit/4da37417adcd78e95bfa554dbbfd29026dad5f71
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-08-23 (Fri, 23 Aug 2019)

  Changed paths:
    M mlir/examples/toy/Ch1/include/toy/AST.h
    M mlir/examples/toy/Ch1/include/toy/Lexer.h
    M mlir/g3doc/Tutorials/Toy/Ch-1.md

  Log Message:
  -----------
  NFC: Update Ch.1 of the Toy tutorial.

Change the use of 'array' to 'tensor' to reflect the new flow that the tutorial will follow. Also tidy up some of the documentation, code comments, and fix a few out-dated links.

PiperOrigin-RevId: 265174676


  Commit: 96e96e0243ea8a4ce4d179a368639a1a565768d7
      https://github.com/llvm/llvm-project/commit/96e96e0243ea8a4ce4d179a368639a1a565768d7
  Author: Alina Sbirlea <asbirlea at google.com>
  Date:   2019-08-23 (Fri, 23 Aug 2019)

  Changed paths:
    M mlir/lib/Parser/Lexer.cpp

  Log Message:
  -----------
  NFC: Add doc for id-punct
PiperOrigin-RevId: 265190168


  Commit: 6a501e3d1b6725bf63f9cf053f7674c042794d49
      https://github.com/llvm/llvm-project/commit/6a501e3d1b6725bf63f9cf053f7674c042794d49
  Author: Andy Ly <lyandy at google.com>
  Date:   2019-08-26 (Mon, 26 Aug 2019)

  Changed paths:
    M mlir/lib/Transforms/Utils/GreedyPatternRewriteDriver.cpp
    M mlir/test/Transforms/test-canonicalize.mlir
    M mlir/test/lib/TestDialect/TestDialect.cpp
    M mlir/test/lib/TestDialect/TestOps.td

  Log Message:
  -----------
  Support folding of ops with inner ops in GreedyPatternRewriteDriver.

This fixes a bug when folding ops with inner ops and inner ops are still being visited.

PiperOrigin-RevId: 265475780


  Commit: cb8c451541390a4096584bb1fbe9501711d67c35
      https://github.com/llvm/llvm-project/commit/cb8c451541390a4096584bb1fbe9501711d67c35
  Author: MLIR Team <no-reply at google.com>
  Date:   2019-08-26 (Mon, 26 Aug 2019)

  Changed paths:
    M mlir/g3doc/QuickstartRewrites.md

  Log Message:
  -----------
  Update documentation for custom rewrite specs.

PiperOrigin-RevId: 265485862


  Commit: 23251f9f3a3dd518bd7cc9c3289d3a04e58c07bc
      https://github.com/llvm/llvm-project/commit/23251f9f3a3dd518bd7cc9c3289d3a04e58c07bc
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-08-26 (Mon, 26 Aug 2019)

  Changed paths:
    M mlir/include/mlir/IR/Location.h
    M mlir/lib/IR/Location.cpp
    M mlir/lib/Parser/Parser.cpp

  Log Message:
  -----------
  NFC: Remove unnecessary context parameters from several Location getters.

The context can be recovered by other means in these methods and doesn't need to be passed explicitly.

PiperOrigin-RevId: 265532956


  Commit: 761d57d1876919f47e3f4199f919efd233fd4cd9
      https://github.com/llvm/llvm-project/commit/761d57d1876919f47e3f4199f919efd233fd4cd9
  Author: Eric Schweitz <eric.schweitz at pgroup.com>
  Date:   2019-08-26 (Mon, 26 Aug 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
    M mlir/test/Target/llvmir.mlir

  Log Message:
  -----------
  Add FPToSI/FPExt/FPTrunc cast ops to the LLVM dialect.

Closes tensorflow/mlir#99

PiperOrigin-RevId: 265538731


  Commit: 2f59f7687636d7140298bdc5fbbb5911e0d223ef
      https://github.com/llvm/llvm-project/commit/2f59f7687636d7140298bdc5fbbb5911e0d223ef
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-08-26 (Mon, 26 Aug 2019)

  Changed paths:
    M mlir/include/mlir/IR/Operation.h
    M mlir/include/mlir/IR/OperationSupport.h
    M mlir/lib/IR/Operation.cpp
    M mlir/lib/IR/OperationSupport.cpp
    M mlir/lib/Parser/Parser.cpp
    M mlir/lib/Transforms/DialectConversion.cpp
    M mlir/test/lib/TestDialect/TestOps.td
    M mlir/unittests/IR/OperationSupportTest.cpp

  Log Message:
  -----------
  NFC: Remove the explicit context from Operation::create and OperationState.

The context can easily be recovered from the Location in these situations.

PiperOrigin-RevId: 265578574


  Commit: 8f2dfb51d4a448754f0c76a8f4d97643d73add3c
      https://github.com/llvm/llvm-project/commit/8f2dfb51d4a448754f0c76a8f4d97643d73add3c
  Author: Denis Khalikov <dennis.khalikov at gmail.com>
  Date:   2019-08-27 (Tue, 27 Aug 2019)

  Changed paths:
    M mlir/lib/Dialect/SPIRV/Serialization/Deserializer.cpp
    M mlir/lib/Dialect/SPIRV/Serialization/Serializer.cpp
    M mlir/unittests/Dialect/SPIRV/CMakeLists.txt
    A mlir/unittests/Dialect/SPIRV/SerializationTest.cpp

  Log Message:
  -----------
  [spirv] Add Block decoration for spv.struct.

Add Block decoration for top-level spv.struct.

Closes tensorflow/mlir#102

PiperOrigin-RevId: 265716241


  Commit: 4ced99c085e62f681276a06e0ce842b190900d32
      https://github.com/llvm/llvm-project/commit/4ced99c085e62f681276a06e0ce842b190900d32
  Author: Mahesh Ravishankar <ravishankarm at google.com>
  Date:   2019-08-27 (Tue, 27 Aug 2019)

  Changed paths:
    M mlir/include/mlir/Conversion/StandardToSPIRV/ConvertStandardToSPIRV.h
    M mlir/include/mlir/Dialect/SPIRV/SPIRVOps.td
    M mlir/lib/Conversion/GPUToSPIRV/GPUToSPIRV.cpp
    M mlir/lib/Conversion/StandardToSPIRV/ConvertStandardToSPIRV.cpp
    M mlir/lib/Conversion/StandardToSPIRV/StandardToSPIRV.td
    M mlir/lib/Dialect/SPIRV/SPIRVOps.cpp
    A mlir/test/Conversion/GPUToSPIRV/builtins.mlir
    A mlir/test/Conversion/GPUToSPIRV/load_store.mlir

  Log Message:
  -----------
  Enhance GPU To SPIR-V conversion to support builtins and load/store ops.

To support a conversion of a simple load-compute-store kernel from GPU
dialect to SPIR-V dialect, the conversion of operations like
"gpu.block_dim", "gpu.thread_id" which allow threads to get the launch
conversion is needed. In SPIR-V these are specified as global
variables with builin attributes. This CL adds support to specify
builtin variables in SPIR-V conversion framework. This is used to
convert the relevant operations from GPU dialect to SPIR-V dialect.
Also add support for conversion of load/store operation in Standard
dialect to SPIR-V dialect.
To simplify the conversion add a method to build a spv.AccessChain
operation that automatically determines the return type based on the
base pointer type and the indices provided.

PiperOrigin-RevId: 265718525


  Commit: 3af6b533812ce43b2b53f3c8ef905f73881ea7f8
      https://github.com/llvm/llvm-project/commit/3af6b533812ce43b2b53f3c8ef905f73881ea7f8
  Author: Lei Zhang <antiagainst at google.com>
  Date:   2019-08-27 (Tue, 27 Aug 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/SPIRV/SPIRVBase.td
    M mlir/lib/Dialect/SPIRV/Serialization/Deserializer.cpp
    M mlir/lib/Dialect/SPIRV/Serialization/Serializer.cpp
    M mlir/unittests/Dialect/SPIRV/DeserializationTest.cpp

  Log Message:
  -----------
  [spirv] Fix the entry block to start with OpLabel

Each basic block in SPIR-V must start with an OpLabel instruction.
We don't support control flow yet, so this CL just makes sure that
the entry block follows this rule and is valid.

PiperOrigin-RevId: 265718841


  Commit: 696fcb7520e13b8c712146b6bcb6a55815af660c
      https://github.com/llvm/llvm-project/commit/696fcb7520e13b8c712146b6bcb6a55815af660c
  Author: MLIR Team <no-reply at google.com>
  Date:   2019-08-27 (Tue, 27 Aug 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/LLVMIR/NVVMOps.td
    M mlir/lib/Dialect/LLVMIR/IR/NVVMDialect.cpp
    M mlir/lib/Target/LLVMIR/ConvertToNVVMIR.cpp
    M mlir/test/LLVMIR/nvvm.mlir
    M mlir/test/Target/nvvmir.mlir

  Log Message:
  -----------
  Add 3 additional intrinsic ops to NVVM dialect, in preparation to implement block-wide reduce.

PiperOrigin-RevId: 265720077


  Commit: 6f68def852c2443782b8ed61e9320d6aebb2ec76
      https://github.com/llvm/llvm-project/commit/6f68def852c2443782b8ed61e9320d6aebb2ec76
  Author: River Riddle <riddleriver at gmail.com>
  Date:   2019-08-27 (Tue, 27 Aug 2019)

  Changed paths:
    M mlir/examples/toy/Ch1/include/toy/AST.h
    M mlir/examples/toy/Ch2/include/toy/AST.h
    M mlir/examples/toy/Ch2/include/toy/Lexer.h
    M mlir/examples/toy/Ch2/mlir/MLIRGen.cpp
    M mlir/examples/toy/Ch2/toyc.cpp
    M mlir/g3doc/Tutorials/Toy/Ch-2.md
    M mlir/test/Examples/Toy/Ch2/codegen.toy

  Log Message:
  -----------
  Update Ch.2 of the Toy tutorial.

The code and documentation for this chapter of the tutorial have been updated to follow the new flow. The toy 'array' type has been replaced by usages of the MLIR tensor type. The code has also been cleaned up and modernized.

Closes tensorflow/mlir#101

PiperOrigin-RevId: 265744086


  Commit: aa2cee9cf53678dde2950087548f502009fec814
      https://github.com/llvm/llvm-project/commit/aa2cee9cf53678dde2950087548f502009fec814
  Author: Uday Bondhugula <udayb at iisc.ac.in>
  Date:   2019-08-27 (Tue, 27 Aug 2019)

  Changed paths:
    M mlir/include/mlir/Transforms/Utils.h
    M mlir/lib/Transforms/LoopFusion.cpp
    M mlir/lib/Transforms/PipelineDataTransfer.cpp
    M mlir/lib/Transforms/Utils/Utils.cpp
    M mlir/test/Transforms/pipeline-data-transfer.mlir

  Log Message:
  -----------
  Refactor / improve replaceAllMemRefUsesWith

Refactor replaceAllMemRefUsesWith to split it into two methods: the new
method does the replacement on a single op, and is used by the existing
one.

- make the methods return LogicalResult instead of bool

- Earlier, when replacement failed (due to non-deferencing uses of the
  memref), the set of ops that had already been processed would have
  been replaced leaving the IR in an inconsistent state. Now, a
  pass is made over all ops to first check for non-deferencing
  uses, and then replacement is performed. No test cases were affected
  because all clients of this method were first checking for
  non-deferencing uses before calling this method (for other reasons).
  This isn't true for a use case in another upcoming PR (scalar
  replacement); clients can now bail out with consistent IR on failure
  of replaceAllMemRefUsesWith. Add test case.

- multiple deferencing uses of the same memref in a single op is
  possible (we have no such use cases/scenarios), and this has always
  remained unsupported. Add an assertion for this.

- minor fix to another test pipeline-data-transfer case.

Signed-off-by: Uday Bondhugula <uday at polymagelabs.com>

Closes tensorflow/mlir#87

PiperOrigin-RevId: 265808183


  Commit: 545c3e489f82cd14bbafbf45b99ef8be81ce6b62
      https://github.com/llvm/llvm-project/commit/545c3e489f82cd14bbafbf45b99ef8be81ce6b62
  Author: Stephan Herhut <herhut at google.com>
  Date:   2019-08-28 (Wed, 28 Aug 2019)

  Changed paths:
    M mlir/include/mlir/Conversion/GPUToNVVM/GPUToNVVMPass.h
    M mlir/include/mlir/Dialect/LLVMIR/NVVMDialect.h
    M mlir/lib/Conversion/GPUToNVVM/LowerGpuOpsToNVVMOps.cpp
    M mlir/tools/mlir-cuda-runner/mlir-cuda-runner.cpp

  Log Message:
  -----------
  Port mlir-cuda-runner to use dialect conversion framework.

Instead of lowering the program in two steps (Standard->LLVM followed
by GPU->NVVM), leading to invalid IR inbetween, the runner now uses
one pattern based rewrite step to go directly from Standard+GPU to
LLVM+NVVM.

PiperOrigin-RevId: 265861934


  Commit: c60c490356a8908b21315a72d813d148eddf146f
      https://github.com/llvm/llvm-project/commit/c60c490356a8908b21315a72d813d148eddf146f
  Author: Stephan Herhut <herhut at google.com>
  Date:   2019-08-28 (Wed, 28 Aug 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/StandardOps/Ops.td
    M mlir/include/mlir/IR/OpBase.td
    M mlir/include/mlir/IR/OpDefinition.h
    M mlir/lib/Dialect/StandardOps/Ops.cpp
    M mlir/lib/IR/Operation.cpp
    M mlir/test/IR/core-ops.mlir
    M mlir/test/IR/traits.mlir
    M mlir/test/lib/TestDialect/TestOps.td

  Log Message:
  -----------
  Add implementation for tensor_load and tensor_store operations.

This change adds definitions, parsing and verification for both ops.

PiperOrigin-RevId: 265954051


  Commit: 22254116903763d49be0a9fff226fcce498c6772
      https://github.com/llvm/llvm-project/commit/22254116903763d49be0a9fff226fcce498c6772
  Author: Eric Schweitz <eric.schweitz at pgroup.com>
  Date:   2019-08-28 (Wed, 28 Aug 2019)

  Changed paths:
    M mlir/lib/IR/AsmPrinter.cpp
    M mlir/lib/Parser/Parser.cpp
    M mlir/test/IR/invalid.mlir
    M mlir/test/IR/parser.mlir

  Log Message:
  -----------
  Tweak to the pretty type parser to recognize that `->` is a special token.

Tweak to the pretty type parser to recognize that `->` is a special token that
shouldn't be split into two characters.  This change allows dialect
types to wrap function types as in `!my.ptr_type<(i32) -> i32>`.

Closes tensorflow/mlir#105

COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/105 from schweitzpgi:parse-arrow 8b2d768053f419daae5a1a864121a44c4319acbe
PiperOrigin-RevId: 265986240


  Commit: 29099e03ce2f8e4546f3ba1086fb51749abc0c62
      https://github.com/llvm/llvm-project/commit/29099e03ce2f8e4546f3ba1086fb51749abc0c62
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-08-28 (Wed, 28 Aug 2019)

  Changed paths:
    M mlir/g3doc/WritingAPass.md
    M mlir/include/mlir/Pass/AnalysisManager.h
    M mlir/include/mlir/Pass/Pass.h
    M mlir/lib/Pass/Pass.cpp
    M mlir/lib/Pass/PassDetail.h
    M mlir/unittests/Pass/AnalysisManagerTest.cpp

  Log Message:
  -----------
  Generalize the analysis manager framework to work on any operation at any nesting.

The pass manager is moving towards being able to run on operations at arbitrary nesting. An operation may have both parent and child operations, and the AnalysisManager must be able to handle this generalization. The AnalysisManager class now contains generic 'getCachedParentAnalysis' and 'getChildAnalysis/getCachedChildAnalysis' functions to query analyses on parent/child operations. This removes the hard coded nesting relationship between Module/Function.

PiperOrigin-RevId: 266003636


  Commit: 7dd5efdf2c216330a1ae8d866ad4a0e0bf86265e
      https://github.com/llvm/llvm-project/commit/7dd5efdf2c216330a1ae8d866ad4a0e0bf86265e
  Author: Feng Liu <fengliuai at google.com>
  Date:   2019-08-28 (Wed, 28 Aug 2019)

  Changed paths:
    M mlir/lib/Dialect/QuantOps/Utils/FakeQuantSupport.cpp

  Log Message:
  -----------
  Fix the equality check of two floating point values

PiperOrigin-RevId: 266022088


  Commit: e8d43cafe6a8a3db86324010d0e417307bfcb72f
      https://github.com/llvm/llvm-project/commit/e8d43cafe6a8a3db86324010d0e417307bfcb72f
  Author: Uday Bondhugula <udayb at iisc.ac.in>
  Date:   2019-08-28 (Wed, 28 Aug 2019)

  Changed paths:
    A mlir/utils/vim/README
    A mlir/utils/vim/ftdetect/mlir.vim
    A mlir/utils/vim/ftplugin/mlir.vim
    A mlir/utils/vim/indent/mlir.vim
    R mlir/utils/vim/mlir.vim
    A mlir/utils/vim/syntax/mlir.vim

  Log Message:
  -----------
  Add vim scripts for indent/syntax

- some of it has been adapted from LLVM's vim utils

Signed-off-by: Uday Bondhugula <uday at polymagelabs.com>

Closes tensorflow/mlir#90

COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/90 from bondhugula:vim 22b1c958818c4b09de0ec8e1d7a4893171a03dbf
PiperOrigin-RevId: 266071752


  Commit: e90542c03b998800f61272b56a12f2f98c47aca7
      https://github.com/llvm/llvm-project/commit/e90542c03b998800f61272b56a12f2f98c47aca7
  Author: Stephan Herhut <herhut at google.com>
  Date:   2019-08-28 (Wed, 28 Aug 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/GPU/GPUOps.td
    M mlir/lib/Dialect/GPU/IR/GPUDialect.cpp
    M mlir/test/Dialect/GPU/invalid.mlir

  Log Message:
  -----------
  Add verification for dimension attribute on GPUDialect index operations.

PiperOrigin-RevId: 266073204


  Commit: bc2a543225abdd3876ae0b31fac89a3b31872d86
      https://github.com/llvm/llvm-project/commit/bc2a543225abdd3876ae0b31fac89a3b31872d86
  Author: Uday Bondhugula <udayb at iisc.ac.in>
  Date:   2019-08-28 (Wed, 28 Aug 2019)

  Changed paths:
    M mlir/lib/Transforms/LoopUnrollAndJam.cpp
    M mlir/test/Transforms/unroll-jam.mlir

  Log Message:
  -----------
  fix loop unroll and jam - operand mapping - imperfect nest case

- fix operand mapping while cloning sub-blocks to jam - was incorrect
  for imperfect nests where def/use was across sub-blocks
- strengthen/generalize the first test case to cover the previously
  missed scenario
- clean up the other cases while on this.

Previously, unroll-jamming the following nest
```
    affine.for %arg0 = 0 to 2048 {
      %0 = alloc() : memref<512x10xf32>
      affine.for %arg1 = 0 to 10 {
        %1 = affine.load %0[%arg0, %arg1] : memref<512x10xf32>
      }
      dealloc %0 : memref<512x10xf32>
    }
```

would yield

```
      %0 = alloc() : memref<512x10xf32>
      %1 = affine.apply #map0(%arg0)
      %2 = alloc() : memref<512x10xf32>
      affine.for %arg1 = 0 to 10 {
        %4 = affine.load %0[%arg0, %arg1] : memref<512x10xf32>
        %5 = affine.apply #map0(%arg0)
        %6 = affine.load %0[%5, %arg1] : memref<512x10xf32>
      }
      dealloc %0 : memref<512x10xf32>
      %3 = affine.apply #map0(%arg0)
      dealloc %0 : memref<512x10xf32>

```

instead of

```

module {
    affine.for %arg0 = 0 to 2048 step 2 {
      %0 = alloc() : memref<512x10xf32>
      %1 = affine.apply #map0(%arg0)
      %2 = alloc() : memref<512x10xf32>
      affine.for %arg1 = 0 to 10 {
        %4 = affine.load %0[%arg0, %arg1] : memref<512x10xf32>
        %5 = affine.apply #map0(%arg0)
        %6 = affine.load %2[%5, %arg1] : memref<512x10xf32>
      }
      dealloc %0 : memref<512x10xf32>
      %3 = affine.apply #map0(%arg0)
      dealloc %2 : memref<512x10xf32>
    }
```

Signed-off-by: Uday Bondhugula <uday at polymagelabs.com>

Closes tensorflow/mlir#98

COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/98 from bondhugula:ujam ddbc853f69b5608b3e8ff9b5ac1f6a5a0bb315a4
PiperOrigin-RevId: 266073460


  Commit: 4bb6f8ecdb54f4ee096d8f92603d628d0cac4ed6
      https://github.com/llvm/llvm-project/commit/4bb6f8ecdb54f4ee096d8f92603d628d0cac4ed6
  Author: Uday Bondhugula <udayb at iisc.ac.in>
  Date:   2019-08-29 (Thu, 29 Aug 2019)

  Changed paths:
    M mlir/examples/Linalg/Linalg4/Example.cpp
    M mlir/lib/Dialect/AffineOps/AffineOps.cpp
    M mlir/test/AffineOps/canonicalize.mlir
    M mlir/test/EDSC/builder-api-test.cpp
    M mlir/test/Linalg/tile_conv.mlir
    M mlir/test/Transforms/dma-generate.mlir
    M mlir/test/Transforms/loop-fusion-slice-computation.mlir
    M mlir/test/Transforms/loop-fusion.mlir
    M mlir/test/Transforms/pipeline-data-transfer.mlir

  Log Message:
  -----------
  Extend map canonicalization to propagate constant operands

- extend canonicalizeMapAndOperands to propagate constant operands into
  the map's expressions (and thus drop those operands).
- canonicalizeMapAndOperands previously only dropped duplicate and
  unused operands; however, operands that were constants were
  retained.

This change makes IR maps/expressions generated by various
utilities/passes even simpler; also makes some of the test checks more
accurate and simpler -- for eg., 0' instead of symbol(%{{.*}}).

Signed-off-by: Uday Bondhugula <uday at polymagelabs.com>

Closes tensorflow/mlir#107

COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/107 from bondhugula:canonicalize-maps c889a51486d14fbf7db489f224f881e7e1ff7d72
PiperOrigin-RevId: 266085289


  Commit: 6de6c2c13828742249377585fd1ef19d9cfd1773
      https://github.com/llvm/llvm-project/commit/6de6c2c13828742249377585fd1ef19d9cfd1773
  Author: Feng Liu <fengliuai at google.com>
  Date:   2019-08-29 (Thu, 29 Aug 2019)

  Changed paths:
    M mlir/lib/Dialect/QuantOps/Utils/FakeQuantSupport.cpp
    M mlir/test/Dialect/QuantOps/convert-const.mlir
    M mlir/test/Dialect/QuantOps/convert-fakequant.mlir

  Log Message:
  -----------
  Add tests to verify 0.0 is quantized correctly

We should consider both signed and narrow_range cases.

PiperOrigin-RevId: 266167366


  Commit: a085700311cec4644381d71c6afeee021a7e8e25
      https://github.com/llvm/llvm-project/commit/a085700311cec4644381d71c6afeee021a7e8e25
  Author: Jacques Pienaar <jpienaar at google.com>
  Date:   2019-08-29 (Thu, 29 Aug 2019)

  Changed paths:
    M mlir/include/mlir/IR/OpImplementation.h
    M mlir/lib/IR/AsmPrinter.cpp

  Log Message:
  -----------
  Make dumping using generic form more robust when IR ill-formed

PiperOrigin-RevId: 266198057


  Commit: 4bfae66d70aea0df4bf9948e51f4bfa8895a4f4e
      https://github.com/llvm/llvm-project/commit/4bfae66d70aea0df4bf9948e51f4bfa8895a4f4e
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-08-29 (Thu, 29 Aug 2019)

  Changed paths:
    M mlir/examples/Linalg/Linalg2/Example.cpp
    M mlir/examples/Linalg/Linalg3/lib/Transforms.cpp
    M mlir/include/mlir/IR/Block.h
    M mlir/include/mlir/IR/OpDefinition.h
    M mlir/include/mlir/IR/Operation.h
    M mlir/include/mlir/IR/Region.h
    A mlir/include/mlir/IR/Visitors.h
    M mlir/include/mlir/Support/LLVM.h
    M mlir/lib/Analysis/TestParallelismDetection.cpp
    M mlir/lib/Conversion/GPUToCUDA/ConvertLaunchFuncToCudaCalls.cpp
    M mlir/lib/Dialect/GPU/Transforms/KernelOutlining.cpp
    M mlir/lib/Dialect/Linalg/Transforms/Fusion.cpp
    M mlir/lib/Dialect/Linalg/Transforms/LowerToLLVMDialect.cpp
    M mlir/lib/Dialect/Linalg/Transforms/Tiling.cpp
    M mlir/lib/IR/Block.cpp
    M mlir/lib/IR/Operation.cpp
    M mlir/lib/IR/Region.cpp
    A mlir/lib/IR/Visitors.cpp
    M mlir/lib/Transforms/LoopCoalescing.cpp
    M mlir/lib/Transforms/LoopInvariantCodeMotion.cpp
    M mlir/lib/Transforms/LoopUnroll.cpp
    M mlir/lib/Transforms/MemRefDataFlowOpt.cpp
    M mlir/lib/Transforms/PipelineDataTransfer.cpp
    M mlir/lib/Transforms/Utils/LoopFusionUtils.cpp
    M mlir/lib/Transforms/Utils/LoopUtils.cpp
    M mlir/lib/Transforms/Vectorize.cpp
    M mlir/test/lib/Transforms/TestLoopMapping.cpp
    M mlir/test/lib/Transforms/TestLoopParametricTiling.cpp

  Log Message:
  -----------
  Refactor the 'walk' methods for operations.

This change refactors and cleans up the implementation of the operation walk methods. After this refactoring is that the explicit template parameter for the operation type is no longer needed for the explicit op walks. For example:

    op->walk<AffineForOp>([](AffineForOp op) { ... });

is now accomplished via:

    op->walk([](AffineForOp op) { ... });

PiperOrigin-RevId: 266209552


  Commit: 3ee3710fd1da25631eb99c2fe58360ccecd3d703
      https://github.com/llvm/llvm-project/commit/3ee3710fd1da25631eb99c2fe58360ccecd3d703
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-08-29 (Thu, 29 Aug 2019)

  Changed paths:
    M mlir/include/mlir/Parser.h
    M mlir/lib/Parser/Parser.cpp

  Log Message:
  -----------
  Change the parseSource* methods to return OwningModuleRef instead of ModuleOp.

This avoids potential memory leaks from misuse of the API.

PiperOrigin-RevId: 266305750


  Commit: 4f6c29223ee5395dd955cefafce6f03ed99170e0
      https://github.com/llvm/llvm-project/commit/4f6c29223ee5395dd955cefafce6f03ed99170e0
  Author: Lei Zhang <antiagainst at google.com>
  Date:   2019-08-30 (Fri, 30 Aug 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/SPIRV/SPIRVBase.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVControlFlowOps.td
    M mlir/lib/Dialect/SPIRV/SPIRVOps.cpp
    M mlir/test/Dialect/SPIRV/control-flow-ops.mlir
    M mlir/utils/spirv/gen_spirv_dialect.py

  Log Message:
  -----------
  Add spv.Branch and spv.BranchConditional

This CL just covers the op definition, its parsing, printing,
and verification. (De)serialization is to be implemented
in a subsequent CL.

PiperOrigin-RevId: 266431077


  Commit: 037742cdf2b9794941958a985e8a0d2023aaa70d
      https://github.com/llvm/llvm-project/commit/037742cdf2b9794941958a985e8a0d2023aaa70d
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-08-30 (Fri, 30 Aug 2019)

  Changed paths:
    M mlir/include/mlir/IR/Block.h
    M mlir/include/mlir/IR/OpDefinition.h
    M mlir/include/mlir/IR/Operation.h
    M mlir/include/mlir/IR/Region.h
    M mlir/include/mlir/IR/Visitors.h
    M mlir/lib/Analysis/Utils.cpp
    M mlir/lib/IR/Visitors.cpp
    M mlir/lib/Transforms/Utils/LoopFusionUtils.cpp

  Log Message:
  -----------
  Add support for early exit walk methods.

This is done by providing a walk callback that returns a WalkResult. This result is either `advance` or `interrupt`. `advance` means that the walk should continue, whereas `interrupt` signals that the walk should stop immediately. An example is shown below:

auto result = op->walk([](Operation *op) {
  if (some_invariant)
    return WalkResult::interrupt();
  return WalkResult::advance();
});

if (result.wasInterrupted())
  ...;

PiperOrigin-RevId: 266436700


  Commit: 8f90a442c3e3d4b727b013a520a3e9520bbd2784
      https://github.com/llvm/llvm-project/commit/8f90a442c3e3d4b727b013a520a3e9520bbd2784
  Author: Rob Suderman <suderman at google.com>
  Date:   2019-08-30 (Fri, 30 Aug 2019)

  Changed paths:
    M mlir/include/mlir/IR/OpBase.td
    M mlir/include/mlir/TableGen/Attribute.h
    M mlir/lib/TableGen/Attribute.cpp
    M mlir/tools/mlir-tblgen/CMakeLists.txt
    A mlir/tools/mlir-tblgen/StructsGen.cpp
    M mlir/unittests/TableGen/CMakeLists.txt
    A mlir/unittests/TableGen/StructsGenTest.cpp
    A mlir/unittests/TableGen/structs.td

  Log Message:
  -----------
  Added a TableGen generator for structured data

Similar to enum, added a generator for structured data. This provide Dictionary that stores a fixed set of values and guarantees the values are valid. It is intended to store a fixed number of values by a given name.

PiperOrigin-RevId: 266437460


  Commit: 06e8101034e71b95e1338662d27472492dae4d4b
      https://github.com/llvm/llvm-project/commit/06e8101034e71b95e1338662d27472492dae4d4b
  Author: Jacques Pienaar <jpienaar at google.com>
  Date:   2019-08-30 (Fri, 30 Aug 2019)

  Changed paths:
    M mlir/include/mlir/ExecutionEngine/ExecutionEngine.h
    M mlir/lib/ExecutionEngine/ExecutionEngine.cpp
    M mlir/lib/Support/JitRunner.cpp
    M mlir/test/mlir-cpu-runner/simple.mlir

  Log Message:
  -----------
  Add mechanism to dump JIT-compiled objects to files

This commit introduces the bits to be able to dump JIT-compile
objects to external files by passing an object cache to OrcJit.
The new functionality is tested in mlir-cpu-runner under the flag
`dump-object-file`.

Closes tensorflow/mlir#95

PiperOrigin-RevId: 266439265


  Commit: 1dd9bf47393afba3adad066fde950eb9c608f2cc
      https://github.com/llvm/llvm-project/commit/1dd9bf47393afba3adad066fde950eb9c608f2cc
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-08-30 (Fri, 30 Aug 2019)

  Changed paths:
    M mlir/examples/Linalg/Linalg1/include/linalg1/Passes.h
    M mlir/examples/Linalg/Linalg3/include/linalg3/Transforms.h
    M mlir/include/mlir/Analysis/Passes.h
    M mlir/include/mlir/Conversion/ControlFlowToCFG/ConvertControlFlowToCFG.h
    M mlir/include/mlir/Conversion/GPUToCUDA/GPUToCUDAPass.h
    M mlir/include/mlir/Conversion/GPUToNVVM/GPUToNVVMPass.h
    M mlir/include/mlir/Conversion/LoopsToGPU/LoopsToGPUPass.h
    M mlir/include/mlir/Conversion/StandardToLLVM/ConvertStandardToLLVMPass.h
    M mlir/include/mlir/Conversion/VectorToLLVM/VectorToLLVM.h
    M mlir/include/mlir/Dialect/FxpMathOps/Passes.h
    M mlir/include/mlir/Dialect/GPU/Passes.h
    M mlir/include/mlir/Dialect/Linalg/Passes.h
    M mlir/include/mlir/Dialect/QuantOps/Passes.h
    M mlir/include/mlir/Pass/Pass.h
    M mlir/include/mlir/Pass/PassManager.h
    M mlir/include/mlir/Transforms/Passes.h
    M mlir/include/mlir/Transforms/ViewRegionGraph.h
    M mlir/lib/Pass/Pass.cpp
    M mlir/lib/Pass/PassDetail.h

  Log Message:
  -----------
  Generalize the pass hierarchy by adding a general OpPass<PassT, OpT>.

This pass class generalizes the current functionality between FunctionPass and ModulePass, and allows for operating on any operation type. The pass manager currently only supports OpPasses operating on FuncOp and ModuleOp, but this restriction will be relaxed in follow-up changes. A utility class OpPassBase<OpT> allows for generically referring to operation specific passes: e.g. FunctionPassBase == OpPassBase<FuncOp>.

PiperOrigin-RevId: 266442239


  Commit: 140757050b4321e40e5f8d81b3286943e92c1e4b
      https://github.com/llvm/llvm-project/commit/140757050b4321e40e5f8d81b3286943e92c1e4b
  Author: Rob Suderman <suderman at google.com>
  Date:   2019-08-30 (Fri, 30 Aug 2019)

  Changed paths:
    M mlir/unittests/TableGen/CMakeLists.txt

  Log Message:
  -----------
  Fix StructsGenTest.cpp CMakeFile build error

PiperOrigin-RevId: 266452719


  Commit: 6b1d7f51ef038ec883a4c55f14d749df41774954
      https://github.com/llvm/llvm-project/commit/6b1d7f51ef038ec883a4c55f14d749df41774954
  Author: Logan Chien <loganchien at google.com>
  Date:   2019-08-30 (Fri, 30 Aug 2019)

  Changed paths:
    M mlir/include/mlir/IR/OpBase.td
    M mlir/test/lib/TestDialect/TestOps.td
    M mlir/test/mlir-tblgen/types.mlir

  Log Message:
  -----------
  Add TensorRankOf for ranked tensor types with specific ranks

This commit adds `TensorRankOf<types, typeNames, ranks>` to specify ranked
tensor types with the specified types and ranks.  For example,
`TensorRankOf<[I32, F32], ["i32", "F32"], [0, 1]>` matches `tensor<i32>`,
`tensor<?xi32>`, `tensor<f32>`, or `tensor<?xf32>`.

PiperOrigin-RevId: 266461256


  Commit: 3d3f62323c820ed90bef4378ae2e3f23f542ca81
      https://github.com/llvm/llvm-project/commit/3d3f62323c820ed90bef4378ae2e3f23f542ca81
  Author: MLIR Team <no-reply at google.com>
  Date:   2019-08-30 (Fri, 30 Aug 2019)

  Changed paths:
    M mlir/include/mlir/IR/OpBase.td

  Log Message:
  -----------
  Splits DictionaryAttr into DictionaryAttrBase and DictionaryAttr.
This maintains consistency with other *AttrBase/Attr splits.

PiperOrigin-RevId: 266469869


  Commit: 9c8a8a7d0da011f1570733265020a40079127b05
      https://github.com/llvm/llvm-project/commit/9c8a8a7d0da011f1570733265020a40079127b05
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-08-30 (Fri, 30 Aug 2019)

  Changed paths:
    M mlir/lib/Dialect/AffineOps/AffineOps.cpp
    M mlir/lib/Transforms/LoopInvariantCodeMotion.cpp
    M mlir/test/AffineOps/canonicalize.mlir
    M mlir/test/Transforms/loop-invariant-code-motion.mlir

  Log Message:
  -----------
  Add a canonicalization to erase empty AffineForOps.

AffineForOp themselves are pure and can be removed if there are no internal operations.

PiperOrigin-RevId: 266481293


  Commit: 20d3e71c3f429120bfc570d13674eb8a4c881dfe
      https://github.com/llvm/llvm-project/commit/20d3e71c3f429120bfc570d13674eb8a4c881dfe
  Author: Uday Bondhugula <udayb at iisc.ac.in>
  Date:   2019-08-30 (Fri, 30 Aug 2019)

  Changed paths:
    M mlir/utils/vim/syntax/mlir.vim

  Log Message:
  -----------
  update vim syntax file

- more highlighting: numbers, elemental types inside shaped types
- add some more keywords

Signed-off-by: Uday Bondhugula <uday at polymagelabs.com>

Closes tensorflow/mlir#110

COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/110 from bondhugula:vim 029777db0ecb95bfc6453c0869af1c233d84d521
PiperOrigin-RevId: 266487768


  Commit: 5a7014c390918ea73684b37616d7a4f61d9b2f17
      https://github.com/llvm/llvm-project/commit/5a7014c390918ea73684b37616d7a4f61d9b2f17
  Author: Lei Zhang <antiagainst at google.com>
  Date:   2019-08-31 (Sat, 31 Aug 2019)

  Changed paths:
    M mlir/unittests/TableGen/CMakeLists.txt

  Log Message:
  -----------
  Add missing link dependency to MLIRTableGenTests

PiperOrigin-RevId: 266561495


  Commit: 49c3e4a50819bfea464dca4290f9f61eac9540e2
      https://github.com/llvm/llvm-project/commit/49c3e4a50819bfea464dca4290f9f61eac9540e2
  Author: Mahesh Ravishankar <ravishankarm at google.com>
  Date:   2019-08-31 (Sat, 31 Aug 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/SPIRV/SPIRVBase.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVLogicalOps.td
    M mlir/utils/spirv/define_inst.sh
    M mlir/utils/spirv/gen_spirv_dialect.py

  Log Message:
  -----------
  Add floating-point comparison operations to SPIR-V dialect.

Use the existing SPV_LogicalOp specification to add the floating-point
comparison operations (both ordered and unordered versions).
To make it easier to import the op-definitions automatically modify
the dialect generation script to update the different .td files based
on whether the operation is an arithmetic op, logical op, etc. Also
allow specification of multiple opcodes with define_inst.sh.
Since this reuses the SPV_LogicalOp framework, no tests specific to
the floating point comparison ops are added with this CL.

PiperOrigin-RevId: 266561634


  Commit: d4d32f4cb86b36864676747ee72ee36d1ac2f421
      https://github.com/llvm/llvm-project/commit/d4d32f4cb86b36864676747ee72ee36d1ac2f421
  Author: Mehdi Amini <aminim at google.com>
  Date:   2019-08-31 (Sat, 31 Aug 2019)

  Changed paths:
    M mlir/g3doc/DeveloperGuide.md

  Log Message:
  -----------
  Document that non-IR units are passed by non-const reference instead of pointer in general

PiperOrigin-RevId: 266583029


  Commit: 2634273c59db653ab86bb99c5cdc9d87a01a8c5a
      https://github.com/llvm/llvm-project/commit/2634273c59db653ab86bb99c5cdc9d87a01a8c5a
  Author: Mehdi Amini <aminim at google.com>
  Date:   2019-08-31 (Sat, 31 Aug 2019)

  Changed paths:
    M mlir/g3doc/DeveloperGuide.md

  Log Message:
  -----------
  Add a link to the rational on lack of const for IR units in the developer guide

PiperOrigin-RevId: 266583374


  Commit: 765d60fd4d4dc93f45bd74e4fd397e92feeb1714
      https://github.com/llvm/llvm-project/commit/765d60fd4d4dc93f45bd74e4fd397e92feeb1714
  Author: Mehdi Amini <aminim at google.com>
  Date:   2019-09-01 (Sun, 01 Sep 2019)

  Changed paths:
    M mlir/bindings/python/pybind.cpp
    M mlir/include/mlir/Conversion/ControlFlowToCFG/ConvertControlFlowToCFG.h
    M mlir/include/mlir/Conversion/StandardToLLVM/ConvertStandardToLLVMPass.h
    M mlir/lib/Conversion/ControlFlowToCFG/ConvertControlFlowToCFG.cpp
    M mlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp
    M mlir/lib/Support/JitRunner.cpp
    M mlir/test/mlir-cpu-runner/simple.mlir
    M mlir/tools/mlir-cpu-runner/CMakeLists.txt

  Log Message:
  -----------
  Add missing lowering to CFG in mlir-cpu-runner + related cleanup

- the list of passes run by mlir-cpu-runner included -lower-affine and
  -lower-to-llvm but was missing -lower-to-cfg (because -lower-affine at
  some point used to lower straight to CFG); add -lower-to-cfg in
  between. IR with affine ops can now be run by mlir-cpu-runner.

- update -lower-to-cfg to be consistent with other passes (create*Pass methods
  were changed to return unique ptrs, but -lower-to-cfg appears to have been
  missed).

- mlir-cpu-runner was unable to parse custom form of affine op's - fix
  link options

- drop unnecessary run options from test/mlir-cpu-runner/simple.mlir
  (none of the test cases had loops)

- -convert-to-llvmir was changed to -lower-to-llvm at some point, but the
  create pass method name wasn't updated (this pass converts/lowers to LLVM
  dialect as opposed to LLVM IR). Fix this.

(If we prefer "convert", the cmd-line options could be changed to
"-convert-to-llvm/cfg" then.)

Signed-off-by: Uday Bondhugula <uday at polymagelabs.com>

Closes tensorflow/mlir#115

PiperOrigin-RevId: 266666909


  Commit: 8ce2274d0d29cfd77d531ae0b3085ade5285dc4b
      https://github.com/llvm/llvm-project/commit/8ce2274d0d29cfd77d531ae0b3085ade5285dc4b
  Author: Mehdi Amini <aminim at google.com>
  Date:   2019-09-01 (Sun, 01 Sep 2019)

  Changed paths:
    M mlir/include/mlir/IR/OpDefinition.h
    M mlir/include/mlir/IR/Operation.h

  Log Message:
  -----------
  Add a convenient `clone()` method on the `Op` class that forward to the underlying `Operation` (NFC)

PiperOrigin-RevId: 266685852


  Commit: ce702fc8dafab9d8d0db4e61025c65db979cd701
      https://github.com/llvm/llvm-project/commit/ce702fc8dafab9d8d0db4e61025c65db979cd701
  Author: Mehdi Amini <aminim at google.com>
  Date:   2019-09-01 (Sun, 01 Sep 2019)

  Changed paths:
    M mlir/include/mlir/Transforms/RegionUtils.h
    M mlir/lib/Transforms/Utils/RegionUtils.cpp

  Log Message:
  -----------
  Add a `getUsedValuesDefinedAbove()` overload that takes an `Operation` pointer (NFC)

This is a convenient utility around the existing `getUsedValuesDefinedAbove()`
that take two regions.

PiperOrigin-RevId: 266686854


  Commit: 6563b1c4463472d5bdc83a3a62a1da1a3052ce18
      https://github.com/llvm/llvm-project/commit/6563b1c4463472d5bdc83a3a62a1da1a3052ce18
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-09-01 (Sun, 01 Sep 2019)

  Changed paths:
    M mlir/include/mlir/Transforms/FoldUtils.h
    M mlir/lib/Dialect/Linalg/Transforms/Fusion.cpp
    M mlir/lib/Dialect/Linalg/Transforms/LowerToLoops.cpp
    M mlir/lib/Dialect/Linalg/Transforms/Tiling.cpp
    M mlir/lib/Transforms/Utils/FoldUtils.cpp
    M mlir/lib/Transforms/Utils/GreedyPatternRewriteDriver.cpp
    M mlir/test/Transforms/constant-fold.mlir
    M mlir/test/lib/TestDialect/TestDialect.cpp
    M mlir/test/lib/TestDialect/TestOps.td
    M mlir/test/lib/Transforms/TestConstantFold.cpp

  Log Message:
  -----------
  Add a new dialect interface for the OperationFolder `OpFolderDialectInterface`.

This interface will allow for providing hooks to interrop with operation folding. The first hook, 'shouldMaterializeInto', will allow for controlling which region to insert materialized constants into. The folder will generally materialize constants into the top-level isolated region, this allows for materializing into a lower level ancestor region if it is more profitable/correct.

PiperOrigin-RevId: 266702972


  Commit: 5c036e682d7cd5b7898242670ebfad7bb270ee35
      https://github.com/llvm/llvm-project/commit/5c036e682d7cd5b7898242670ebfad7bb270ee35
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-09-02 (Mon, 02 Sep 2019)

  Changed paths:
    M mlir/bindings/python/pybind.cpp
    M mlir/examples/Linalg/Linalg1/include/linalg1/Common.h
    M mlir/examples/Linalg/Linalg3/Example.cpp
    M mlir/examples/Linalg/Linalg4/Example.cpp
    M mlir/examples/toy/Ch4/toyc.cpp
    M mlir/examples/toy/Ch5/toyc.cpp
    M mlir/g3doc/Tutorials/Toy/Ch-4.md
    M mlir/include/mlir/Pass/Pass.h
    M mlir/include/mlir/Pass/PassManager.h
    M mlir/lib/Pass/IRPrinting.cpp
    M mlir/lib/Pass/Pass.cpp
    M mlir/lib/Pass/PassDetail.h
    M mlir/lib/Pass/PassTiming.cpp
    M mlir/lib/Support/JitRunner.cpp
    M mlir/lib/Support/MlirOptMain.cpp
    M mlir/test/Pass/pass-timing.mlir
    M mlir/tools/mlir-cuda-runner/mlir-cuda-runner.cpp

  Log Message:
  -----------
  Refactor the pass manager to support operations other than FuncOp/ModuleOp.

This change generalizes the structure of the pass manager to allow arbitrary nesting pass managers for other operations, at any level. The only user visible change to existing code is the fact that a PassManager must now provide an MLIRContext on construction. A new class `OpPassManager` has been added that represents a pass manager on a specific operation type. `PassManager` will remain the top-level entry point into the pipeline, with OpPassManagers being nested underneath. OpPassManagers will still be implicitly nested if the operation type on the pass differs from the pass manager. To explicitly build a pipeline, the 'nest' methods on OpPassManager may be used:

// Pass manager for the top-level module.
PassManager pm(ctx);

// Nest a pipeline operating on FuncOp.
OpPassManager &fpm = pm.nest<FuncOp>();
fpm.addPass(...);

// Nest a pipeline under the FuncOp pipeline that operates on spirv::ModuleOp
OpPassManager &spvModulePM = pm.nest<spirv::ModuleOp>();

// Nest a pipeline on FuncOps inside of the spirv::ModuleOp.
OpPassManager &spvFuncPM = spvModulePM.nest<FuncOp>();

To help accomplish this a new general OperationPass is added that operates on opaque Operations. This pass can be inserted in a pass manager of any type to operate on any operation opaquely. An example of this opaque OperationPass is a VerifierPass, that simply runs the verifier opaquely on the current operation.

/// Pass to verify an operation and signal failure if necessary.
class VerifierPass : public OperationPass<VerifierPass> {
  void runOnOperation() override {
    Operation *op = getOperation();
    if (failed(verify(op)))
      signalPassFailure();
    markAllAnalysesPreserved();
  }
};

PiperOrigin-RevId: 266840344


  Commit: c05890e890da37d9671169725c867ed0ca1e0b9d
      https://github.com/llvm/llvm-project/commit/c05890e890da37d9671169725c867ed0ca1e0b9d
  Author: Smit Hinsu <hinsu at google.com>
  Date:   2019-09-02 (Mon, 02 Sep 2019)

  Changed paths:
    M mlir/include/mlir/IR/PatternMatch.h

  Log Message:
  -----------
  Enable OwningRewritePatternList insert overload with parameter pack only when
there is at least one template pattern type

Also remove the other insert overload with pattern pointer as there are no existing users nor any potential known use-case.

PiperOrigin-RevId: 266842920


  Commit: 2acd0dbf05aac71dca030ba6a4141e68ca509916
      https://github.com/llvm/llvm-project/commit/2acd0dbf05aac71dca030ba6a4141e68ca509916
  Author: Mahesh Ravishankar <ravishankarm at google.com>
  Date:   2019-09-02 (Mon, 02 Sep 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/SPIRV/SPIRVBase.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVLogicalOps.td
    M mlir/lib/Dialect/SPIRV/SPIRVOps.cpp
    A mlir/test/Dialect/SPIRV/Serialization/select.mlir
    M mlir/test/Dialect/SPIRV/arithmetic-ops.mlir
    M mlir/test/Dialect/SPIRV/ops.mlir

  Log Message:
  -----------
  Add Select operation to SPIR-V dialect.

The SelectOp models the semantics of OpSelect from SPIR-V spec.

PiperOrigin-RevId: 266849559


  Commit: da646505c5bc5f03252c7a83bbeb890e5b3a19fa
      https://github.com/llvm/llvm-project/commit/da646505c5bc5f03252c7a83bbeb890e5b3a19fa
  Author: Smit Hinsu <hinsu at google.com>
  Date:   2019-09-02 (Mon, 02 Sep 2019)

  Changed paths:
    M mlir/lib/IR/Builders.cpp

  Log Message:
  -----------
  Support bf16 in Builder::getZeroAttr

PiperOrigin-RevId: 266863802


  Commit: c335d9d3137b9db6c17b7cdbf45ddf80f651c6c1
      https://github.com/llvm/llvm-project/commit/c335d9d3137b9db6c17b7cdbf45ddf80f651c6c1
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2019-09-03 (Tue, 03 Sep 2019)

  Changed paths:
    M mlir/g3doc/ConversionToLLVMDialect.md
    M mlir/g3doc/Dialects/LLVM.md
    M mlir/g3doc/Tutorials/Toy/Ch-5.md
    M mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
    M mlir/include/mlir/Target/LLVMIR/ModuleTranslation.h
    M mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
    M mlir/lib/Target/LLVMIR/ModuleTranslation.cpp
    M mlir/test/Conversion/GPUToCUDA/insert-cubin-getter.mlir
    M mlir/test/Conversion/GPUToCUDA/lower-launch-func-to-cuda.mlir
    M mlir/test/Conversion/VectorToLLVM/vector-to-llvm.mlir
    M mlir/test/Examples/Linalg/Linalg1.mlir
    M mlir/test/LLVMIR/convert-funcs.mlir
    M mlir/test/LLVMIR/convert-memref-ops.mlir
    M mlir/test/LLVMIR/convert-to-llvmir.mlir
    M mlir/test/LLVMIR/global.mlir
    M mlir/test/LLVMIR/roundtrip.mlir
    M mlir/test/Linalg/llvm.mlir
    M mlir/test/Target/llvmir.mlir

  Log Message:
  -----------
  LLVM dialect: prefix auxiliary operations with "mlir."

Some of the operations in the LLVM dialect are required to model the LLVM IR in
MLIR, for example "constant" operations are needed to declare a constant value
since MLIR, unlike LLVM, does not support immediate values as operands.  To
avoid confusion with actual LLVM operations, we prefix such axuiliary
operations with "mlir.".

PiperOrigin-RevId: 266942838


  Commit: 6eb910a59c05b694166cf082634ee0ad35da4079
      https://github.com/llvm/llvm-project/commit/6eb910a59c05b694166cf082634ee0ad35da4079
  Author: Alex Torres <alexst07 at gmail.com>
  Date:   2019-09-03 (Tue, 03 Sep 2019)

  Changed paths:
    M mlir/lib/Dialect/Linalg/Transforms/LowerToLLVMDialect.cpp

  Log Message:
  -----------
  Remove unused variables

Remove unused variables and attributes from BaseViewConversionHelper
on mlir/lib/Dialect/Linalg/Transforms/LowerToLLVMDialect.cpp

Closes tensorflow/mlir#116

COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/116 from alexst07:fix-warnings 5f638e4677492cf71a9cc040eeb6b57427d32e06
PiperOrigin-RevId: 266972082


  Commit: 61ee7d640c5a8ebe555385889b30e1b8ffb64961
      https://github.com/llvm/llvm-project/commit/61ee7d640c5a8ebe555385889b30e1b8ffb64961
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-09-03 (Tue, 03 Sep 2019)

  Changed paths:
    M mlir/lib/Parser/Token.cpp
    M mlir/test/IR/parser.mlir

  Log Message:
  -----------
  Fix an invalid assert when processing escaped strings.

The assert assumed that the escaped character could not appear at the end of the string.

Fixes tensorflow/mlir#117

PiperOrigin-RevId: 266975471


  Commit: 2a55998f7cd5ff13fb9bc9bc929fcdb2e72934e4
      https://github.com/llvm/llvm-project/commit/2a55998f7cd5ff13fb9bc9bc929fcdb2e72934e4
  Author: MLIR Team <no-reply at google.com>
  Date:   2019-09-03 (Tue, 03 Sep 2019)

  Changed paths:
    M mlir/README.md

  Log Message:
  -----------
    Add information about the SIG + Open Design meetings to the README.

PiperOrigin-RevId: 266978247


  Commit: b1ef9dc22c067599cdb5832c05ad852f07716543
      https://github.com/llvm/llvm-project/commit/b1ef9dc22c067599cdb5832c05ad852f07716543
  Author: Uday Bondhugula <udayb at iisc.ac.in>
  Date:   2019-09-03 (Tue, 03 Sep 2019)

  Changed paths:
    M mlir/lib/Transforms/AffineDataCopyGeneration.cpp
    M mlir/test/Transforms/affine-data-copy.mlir

  Log Message:
  -----------
  Fix affine data copy generation corner cases/bugs

- the [begin, end) range identified for copying could end in between the
  block, which makes hoisting invalid in some cases. Change the range
  identification to always end with end of block.

- add test case to exercise these (with fast mem capacity set to minimal so
  that single element memref buffers are generated at the innermost loop)

- the location of begin/end of the block range for data copying was
  being confused with the insert points for copy in and copy out code.
  In cases, where we choose to hoist transfers, these are separate.

- when copy loops are single iteration ones, promote their bodies at
  the end of the pass.

- change default fast mem space to 1 (setting it to zero made it
  generate DMA op's that won't verify in the default case - since the
  DMA ops have a check for src/dest memref spaces being different).

Signed-off-by: Uday Bondhugula <uday at polymagelabs.com>
Co-Authored-By: Mehdi Amini <joker.eph at gmail.com>

Closes tensorflow/mlir#88

COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/88 from bondhugula:datacopy 88697267c45e850c3ced87671e16e4a930c02a42
PiperOrigin-RevId: 266980911


  Commit: 5593e005c676609c4b9bbf332fe894784d98d09f
      https://github.com/llvm/llvm-project/commit/5593e005c676609c4b9bbf332fe894784d98d09f
  Author: Lei Zhang <antiagainst at google.com>
  Date:   2019-09-03 (Tue, 03 Sep 2019)

  Changed paths:
    M mlir/include/mlir/Conversion/StandardToSPIRV/ConvertStandardToSPIRV.h
    M mlir/include/mlir/Dialect/SPIRV/SPIRVDialect.h
    M mlir/include/mlir/Dialect/SPIRV/SPIRVStructureOps.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVTypes.h
    M mlir/lib/Conversion/GPUToSPIRV/GPUToSPIRV.cpp
    M mlir/lib/Conversion/StandardToSPIRV/ConvertStandardToSPIRV.cpp
    M mlir/lib/Dialect/SPIRV/SPIRVDialect.cpp
    M mlir/lib/Dialect/SPIRV/SPIRVOps.cpp
    A mlir/test/Dialect/SPIRV/canonicalize.mlir
    M mlir/test/Dialect/SPIRV/structure-ops.mlir

  Log Message:
  -----------
  Add folding rule and dialect materialization hook for spv.constant

This will allow us to use MLIR's folding infrastructure to deduplicate
SPIR-V constants.

This CL also changed isValidSPIRVType in SPIRVDialect to a static method.

PiperOrigin-RevId: 266984403


  Commit: 54d674f51e525e9186dc1f7d7df1b4d8e757e4ad
      https://github.com/llvm/llvm-project/commit/54d674f51e525e9186dc1f7d7df1b4d8e757e4ad
  Author: Uday Bondhugula <udayb at iisc.ac.in>
  Date:   2019-09-03 (Tue, 03 Sep 2019)

  Changed paths:
    M mlir/include/mlir/Analysis/AffineStructures.h
    M mlir/include/mlir/Transforms/Passes.h
    M mlir/include/mlir/Transforms/Utils.h
    M mlir/lib/Analysis/AffineStructures.cpp
    M mlir/lib/Transforms/SimplifyAffineStructures.cpp
    M mlir/lib/Transforms/Utils/Utils.cpp
    A mlir/test/Transforms/memref-normalize.mlir

  Log Message:
  -----------
  Utility to normalize memrefs with non-identity layout maps

- introduce utility to convert memrefs with non-identity layout maps to
  ones with identity layout maps: convert the type and rewrite/remap all
  its uses

- add this utility to -simplify-affine-structures pass for testing
  purposes

Signed-off-by: Uday Bondhugula <uday at polymagelabs.com>

Closes tensorflow/mlir#104

COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/104 from bondhugula:memref-normalize f2c914aa1890e8860326c9e33f9aa160b3d65e6d
PiperOrigin-RevId: 266985317


  Commit: 0c8ad3aafb06a59e8642b085cb8abb5b13351ad3
      https://github.com/llvm/llvm-project/commit/0c8ad3aafb06a59e8642b085cb8abb5b13351ad3
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2019-09-03 (Tue, 03 Sep 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/Linalg/IR/LinalgLibraryOps.td
    M mlir/include/mlir/Dialect/Linalg/IR/LinalgOps.h
    M mlir/lib/Dialect/Linalg/Transforms/Fusion.cpp
    M mlir/lib/Dialect/Linalg/Transforms/Tiling.cpp
    M mlir/test/Linalg/fusion.mlir
    M mlir/test/Linalg/tile.mlir

  Log Message:
  -----------
  Properly clone Linalg ops with regions

This CL adds support for proper cloning of Linalg ops that have regions (i.e. the generic linalg op). This is used to properly implement tiling and fusion for such ops. Adequate tests are added.

PiperOrigin-RevId: 267027176


  Commit: 7818a60e37c2cdbeb4b208b9da6e99efefc6267c
      https://github.com/llvm/llvm-project/commit/7818a60e37c2cdbeb4b208b9da6e99efefc6267c
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2019-09-04 (Wed, 04 Sep 2019)

  Changed paths:
    M mlir/g3doc/DeveloperGuide.md

  Log Message:
  -----------
  Mention clang-format in the developer guide

PiperOrigin-RevId: 267114122


  Commit: 71d27dfc3b242158a46993e3e061e18940d81cf2
      https://github.com/llvm/llvm-project/commit/71d27dfc3b242158a46993e3e061e18940d81cf2
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2019-09-04 (Wed, 04 Sep 2019)

  Changed paths:
    M mlir/g3doc/Dialects/LLVM.md
    M mlir/test/LLVMIR/roundtrip.mlir

  Log Message:
  -----------
  Update the syntax of splat attribute in LLVM.md

The syntax for splat attributes changed, but was not updated in the description
of the LLVM dialect constant operations in LLVM.md.  Update the document to use
the correct syntax.  Also add a dialect roundtrip test for such attribute,
which was previously missing.

PiperOrigin-RevId: 267116305


  Commit: 2f13df13b0bb481702fc83eb50c273deadb55f20
      https://github.com/llvm/llvm-project/commit/2f13df13b0bb481702fc83eb50c273deadb55f20
  Author: MLIR Team <no-reply at google.com>
  Date:   2019-09-04 (Wed, 04 Sep 2019)

  Changed paths:
    M mlir/lib/Target/LLVMIR/ModuleTranslation.cpp
    M mlir/test/Target/llvmir.mlir

  Log Message:
  -----------
  Add support for array-typed constants.

PiperOrigin-RevId: 267121729


  Commit: dfd06af562e93e767000e96c436846caea847c38
      https://github.com/llvm/llvm-project/commit/dfd06af562e93e767000e96c436846caea847c38
  Author: Stephan Herhut <herhut at google.com>
  Date:   2019-09-04 (Wed, 04 Sep 2019)

  Changed paths:
    M mlir/lib/Dialect/GPU/Transforms/KernelOutlining.cpp
    M mlir/test/Dialect/GPU/outlining.mlir

  Log Message:
  -----------
  Make GPU kernel outlining inline constants.

It is generally beneficial to pass less arguments to a kernel, so cloning constants
into the kernel is beneficial.

PiperOrigin-RevId: 267139084


  Commit: 639522950906446a4fb9a8d440c35509ba89259d
      https://github.com/llvm/llvm-project/commit/639522950906446a4fb9a8d440c35509ba89259d
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2019-09-04 (Wed, 04 Sep 2019)

  Changed paths:
    A mlir/test/Dialect/Linalg/canonicalize.mlir
    A mlir/test/Dialect/Linalg/fusion-2-level.mlir
    A mlir/test/Dialect/Linalg/fusion.mlir
    A mlir/test/Dialect/Linalg/invalid.mlir
    A mlir/test/Dialect/Linalg/llvm.mlir
    A mlir/test/Dialect/Linalg/loops.mlir
    A mlir/test/Dialect/Linalg/promote.mlir
    A mlir/test/Dialect/Linalg/roundtrip.mlir
    A mlir/test/Dialect/Linalg/tile.mlir
    A mlir/test/Dialect/Linalg/tile_conv.mlir
    R mlir/test/Linalg/canonicalize.mlir
    R mlir/test/Linalg/fusion-2-level.mlir
    R mlir/test/Linalg/fusion.mlir
    R mlir/test/Linalg/invalid.mlir
    R mlir/test/Linalg/llvm.mlir
    R mlir/test/Linalg/loops.mlir
    R mlir/test/Linalg/promote.mlir
    R mlir/test/Linalg/roundtrip.mlir
    R mlir/test/Linalg/tile.mlir
    R mlir/test/Linalg/tile_conv.mlir

  Log Message:
  -----------
  Move Linalg dialect tests to test/Dialect/Linalg

This was missing from the commit that moved the Linalg dialect to lib/Dialect.

PiperOrigin-RevId: 267141176


  Commit: 8c9dc690eb5c02fff486147b0496ff523743a49a
      https://github.com/llvm/llvm-project/commit/8c9dc690eb5c02fff486147b0496ff523743a49a
  Author: Uday Bondhugula <udayb at iisc.ac.in>
  Date:   2019-09-04 (Wed, 04 Sep 2019)

  Changed paths:
    M mlir/lib/Transforms/AffineDataCopyGeneration.cpp
    M mlir/lib/Transforms/PipelineDataTransfer.cpp
    M mlir/lib/Transforms/Utils/Utils.cpp
    M mlir/test/Transforms/pipeline-data-transfer.mlir

  Log Message:
  -----------
  pipeline-data-transfer: remove dead tag alloc's and improve test coverage for replaceMemRefUsesWith / pipeline-data-transfer

- address remaining comments from PR tensorflow/mlir#87 for better test coverage for
  pipeline-data-transfer/replaceAllMemRefUsesWith
- remove dead tag allocs the same way they are removed for the replaced buffers

Signed-off-by: Uday Bondhugula <uday at polymagelabs.com>

Closes tensorflow/mlir#106

COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/106 from bondhugula:followup 9e868666d047e8d43e5f82f43e4093b838c710fa
PiperOrigin-RevId: 267144774


  Commit: 636bcbade07d7f4ba1545fd9cf09c08db5c8f23c
      https://github.com/llvm/llvm-project/commit/636bcbade07d7f4ba1545fd9cf09c08db5c8f23c
  Author: Jacques Pienaar <jpienaar at google.com>
  Date:   2019-09-04 (Wed, 04 Sep 2019)

  Changed paths:
    M mlir/lib/IR/Region.cpp

  Log Message:
  -----------
  Make isIsolatedAbove robuster to invalid IR

This function is only called from the verifier.

PiperOrigin-RevId: 267145495


  Commit: c6f8adad8e752b26ed63d874779722e3e448e836
      https://github.com/llvm/llvm-project/commit/c6f8adad8e752b26ed63d874779722e3e448e836
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2019-09-04 (Wed, 04 Sep 2019)

  Changed paths:
    A mlir/test/Conversion/StandardToLLVM/convert-argattrs.mlir
    A mlir/test/Conversion/StandardToLLVM/convert-funcs.mlir
    A mlir/test/Conversion/StandardToLLVM/convert-memref-ops.mlir
    A mlir/test/Conversion/StandardToLLVM/convert-to-llvmir.mlir
    A mlir/test/Dialect/LLVMIR/func.mlir
    A mlir/test/Dialect/LLVMIR/global.mlir
    A mlir/test/Dialect/LLVMIR/invalid.mlir
    A mlir/test/Dialect/LLVMIR/nvvm.mlir
    A mlir/test/Dialect/LLVMIR/roundtrip.mlir
    A mlir/test/Dialect/LLVMIR/terminator.mlir
    R mlir/test/LLVMIR/convert-argattrs.mlir
    R mlir/test/LLVMIR/convert-funcs.mlir
    R mlir/test/LLVMIR/convert-memref-ops.mlir
    R mlir/test/LLVMIR/convert-to-llvmir.mlir
    R mlir/test/LLVMIR/func.mlir
    R mlir/test/LLVMIR/global.mlir
    R mlir/test/LLVMIR/invalid.mlir
    R mlir/test/LLVMIR/nvvm.mlir
    R mlir/test/LLVMIR/roundtrip.mlir
    R mlir/test/LLVMIR/terminator.mlir

  Log Message:
  -----------
  Move LLVMIR dialect tests from test/LLVMIR to test/Dialect and test/Conversion

This follows up on the recent restructuring that moved the dialects under
lib/Dialect and inter-dialect conversions to lib/Conversion. Originally, the
tests for both the LLVMIR dialect itself and the conversion from Standard to
LLVMIR dialect lived under test/LLVMIR.  This no longer reflects the code
structure.  Move the tests to either test/Dialect/LLVMIR or
test/Conversion/StandardToLLVM depending on the features they exercise.

PiperOrigin-RevId: 267159219


  Commit: b5652720c1f1be0a6b4d5cfb543f0c4efdae94a0
      https://github.com/llvm/llvm-project/commit/b5652720c1f1be0a6b4d5cfb543f0c4efdae94a0
  Author: MLIR Team <no-reply at google.com>
  Date:   2019-09-04 (Wed, 04 Sep 2019)

  Changed paths:
    M mlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp
    A mlir/test/Conversion/StandardToLLVM/standard-to-llvm.mlir

  Log Message:
  -----------
  Retain address space during MLIR > LLVM conversion.

PiperOrigin-RevId: 267206460


  Commit: 0369ed34cb334aca522a9b9be29437908939e749
      https://github.com/llvm/llvm-project/commit/0369ed34cb334aca522a9b9be29437908939e749
  Author: Rob Suderman <suderman at google.com>
  Date:   2019-09-04 (Wed, 04 Sep 2019)

  Changed paths:
    M mlir/include/mlir/IR/OpBase.td

  Log Message:
  -----------
  Updated StructAttr to use the struct name for StorageType and ReturnType.

PiperOrigin-RevId: 267266687


  Commit: cf26e5faf57bc57e1c58e0886092baf047990761
      https://github.com/llvm/llvm-project/commit/cf26e5faf57bc57e1c58e0886092baf047990761
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2019-09-04 (Wed, 04 Sep 2019)

  Changed paths:
    M mlir/lib/ExecutionEngine/ExecutionEngine.cpp

  Log Message:
  -----------
  Use transform function on llvm::Module in the ExecutionEngine

The refactoring of ExecutionEngine dropped the usage of the irTransform function used to pass -O3 and other options to LLVM. As a consequence, the proper optimizations do not kick in in LLMV-land.

This CL makes use of the transform function and allows producing avx512 instructions, on an internal example, when using:
`mlir-cpu-runner -dump-object-file=1 -object-filename=foo.o` combined with `objdump -D foo.o`.

Assembly produced resembles:
```
    2b2e:       62 72 7d 48 18 04 0e    vbroadcastss (%rsi,%rcx,1),%zmm8
    2b35:       62 71 7c 48 28 ce       vmovaps %zmm6,%zmm9
    2b3b:       62 72 3d 48 a8 c9       vfmadd213ps %zmm1,%zmm8,%zmm9
    2b41:       62 f1 7c 48 28 cf       vmovaps %zmm7,%zmm1
    2b47:       62 f2 3d 48 a8 c8       vfmadd213ps %zmm0,%zmm8,%zmm1
    2b4d:       62 f2 7d 48 18 44 0e    vbroadcastss 0x4(%rsi,%rcx,1),%zmm0
    2b54:       01
    2b55:       62 71 7c 48 28 c6       vmovaps %zmm6,%zmm8
    2b5b:       62 72 7d 48 a8 c3       vfmadd213ps %zmm3,%zmm0,%zmm8
    2b61:       62 f1 7c 48 28 df       vmovaps %zmm7,%zmm3
    2b67:       62 f2 7d 48 a8 da       vfmadd213ps %zmm2,%zmm0,%zmm3
    2b6d:       62 f2 7d 48 18 44 0e    vbroadcastss 0x8(%rsi,%rcx,1),%zmm0
    2b74:       02
    2b75:       62 f2 7d 48 a8 f5       vfmadd213ps %zmm5,%zmm0,%zmm6
    2b7b:       62 f2 7d 48 a8 fc       vfmadd213ps %zmm4,%zmm0,%zmm7
```
etc.

Fixes tensorflow/mlir#120

PiperOrigin-RevId: 267281097


  Commit: 33ac6f043b11712c8ce25573d1dd9abf88b826b7
      https://github.com/llvm/llvm-project/commit/33ac6f043b11712c8ce25573d1dd9abf88b826b7
  Author: Smit Hinsu <hinsu at google.com>
  Date:   2019-09-04 (Wed, 04 Sep 2019)

  Changed paths:
    M mlir/include/mlir/IR/OpBase.td
    M mlir/test/lib/TestDialect/TestOps.td
    M mlir/test/mlir-tblgen/pattern.mlir

  Log Message:
  -----------
  Generalize I32ElementsAttr definition and introduce I64ElementsAttr

Also, fix constBuilderCall to return attribute of the storage class DenseIntElementsAttr

PiperOrigin-RevId: 267305813


  Commit: 7eb25cd367c1bf43a04e72ccde5ba4f84121c76f
      https://github.com/llvm/llvm-project/commit/7eb25cd367c1bf43a04e72ccde5ba4f84121c76f
  Author: Stephan Herhut <herhut at google.com>
  Date:   2019-09-05 (Thu, 05 Sep 2019)

  Changed paths:
    M mlir/test/Dialect/GPU/outlining.mlir

  Log Message:
  -----------
  Make GPU kernel outlining test independent of value names.

PiperOrigin-RevId: 267323604


  Commit: 0ba00878876316a43c7e7c38a30439adca9d5774
      https://github.com/llvm/llvm-project/commit/0ba00878876316a43c7e7c38a30439adca9d5774
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-09-05 (Thu, 05 Sep 2019)

  Changed paths:
    A mlir/include/mlir/Transforms/InliningUtils.h
    M mlir/lib/Dialect/StandardOps/Ops.cpp
    M mlir/lib/Transforms/CMakeLists.txt
    A mlir/lib/Transforms/Inliner.cpp
    M mlir/lib/Transforms/Utils/CMakeLists.txt
    A mlir/lib/Transforms/Utils/InliningUtils.cpp
    A mlir/test/Transforms/inlining.mlir
    A mlir/test/Transforms/test-inlining.mlir
    M mlir/test/lib/TestDialect/TestDialect.cpp
    M mlir/test/lib/TestDialect/TestOps.td
    M mlir/test/lib/Transforms/CMakeLists.txt
    A mlir/test/lib/Transforms/TestInlining.cpp

  Log Message:
  -----------
  Add the initial inlining infrastructure.

This defines a set of initial utilities for inlining a region(or a FuncOp), and defines a simple inliner pass for testing purposes.
A new dialect interface is defined, DialectInlinerInterface, that allows for dialects to override hooks controlling inlining legality. The interface currently provides the following hooks, but these are just premilinary and should be changed/added to/modified as necessary:

* isLegalToInline
  - Determine if a region can be inlined into one of this dialect, *or* if an operation of this dialect can be inlined into a given region.

* shouldAnalyzeRecursively
  - Determine if an operation with regions should be analyzed recursively for legality. This allows for child operations to be closed off from the legality checks for operations like lambdas.

* handleTerminator
  - Process a terminator that has been inlined.

This cl adds support for inlining StandardOps, but other dialects will be added in followups as necessary.

PiperOrigin-RevId: 267426759


  Commit: 916eb980b09a3c5303aa2e700eb6fc234c043ce6
      https://github.com/llvm/llvm-project/commit/916eb980b09a3c5303aa2e700eb6fc234c043ce6
  Author: Lei Zhang <antiagainst at google.com>
  Date:   2019-09-05 (Thu, 05 Sep 2019)

  Changed paths:
    M mlir/g3doc/Dialects/SPIR-V.md
    M mlir/include/mlir/Dialect/SPIRV/SPIRVBase.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVControlFlowOps.td
    M mlir/lib/Dialect/SPIRV/SPIRVOps.cpp
    M mlir/test/Dialect/SPIRV/control-flow-ops.mlir

  Log Message:
  -----------
  [spirv] Add spv.loop

SPIR-V can explicitly declare structured control-flow constructs using merge
instructions. These explicitly declare a header block before the control
flow diverges and a merge block where control flow subsequently converges.
These blocks delimit constructs that must nest, and can only be entered
and exited in structured ways.

Instead of having a `spv.LoopMerge` op to directly model loop merge
instruction for indicating the merge and continue target, we use regions
to delimit the boundary of the loop: the merge target is the next op
following the `spv.loop` op and the continue target is the block that
has a back-edge pointing to the entry block inside the `spv.loop`'s region.
This way it's easier to discover all blocks belonging to a construct and
it plays nicer with the MLIR system.

Updated the SPIR-V.md doc.

PiperOrigin-RevId: 267431010


  Commit: 85bc4889b34a954a61d3509349954fcef34fa7b6
      https://github.com/llvm/llvm-project/commit/85bc4889b34a954a61d3509349954fcef34fa7b6
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-09-05 (Thu, 05 Sep 2019)

  Changed paths:
    M mlir/lib/Dialect/AffineOps/AffineOps.cpp
    A mlir/test/AffineOps/inlining.mlir

  Log Message:
  -----------
  Add support for conservatively inlining Affine operations.

This commit defines an initial implementation of the DialectInlinerInterface for the AffineOps dialect. This change allows for affine operations to be inlined into any region that is not an affine region. Inlining into affine regions requires special handling for dimension/symbol identifiers that will be added in followups.

PiperOrigin-RevId: 267467078


  Commit: 854a384f509fb198fc82c0440b82a7f8c21d73fb
      https://github.com/llvm/llvm-project/commit/854a384f509fb198fc82c0440b82a7f8c21d73fb
  Author: Uday Bondhugula <udayb at iisc.ac.in>
  Date:   2019-09-05 (Thu, 05 Sep 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/AffineOps/AffineOps.h
    M mlir/include/mlir/Dialect/AffineOps/AffineOps.td
    M mlir/include/mlir/IR/IntegerSet.h
    M mlir/lib/Analysis/AffineStructures.cpp
    M mlir/lib/Dialect/AffineOps/AffineOps.cpp
    M mlir/lib/IR/IntegerSet.cpp
    M mlir/test/AffineOps/canonicalize.mlir

  Log Message:
  -----------
  Integer set + operands / affine if op canonicalization

- turn canonicalizeMapAndOperands into a template that works on both
  sets and maps, and use it to introduce a utility to canonicalize an
  affine integer set and its operands
- add pattern to canonicalize affine if op's.
- rename IntegerSet::getNumOperands -> IntegerSet::getNumInputs to be
  consistent with AffineMap
- add missing accessors for IntegerSet

Doesn't need extensive testing since canonicalizeSetAndOperands just
reuses canonicalizeMapAndOperands' logic, and the latter is tested on
affine.apply map + operands; the new method works the same way on an
integer set + operands of an affine if op for example.

Signed-off-by: Uday Bondhugula <uday at polymagelabs.com>

Closes tensorflow/mlir#112

COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/112 from bondhugula:set-canonicalize eff72f23250b96fa7d9f5caff3877440f5de2cec
PiperOrigin-RevId: 267532876


  Commit: 5b62a2ac6d1685d56ae7c4c15ccc035b2168dcc2
      https://github.com/llvm/llvm-project/commit/5b62a2ac6d1685d56ae7c4c15ccc035b2168dcc2
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2019-09-06 (Fri, 06 Sep 2019)

  Changed paths:
    M mlir/g3doc/Interfaces.md

  Log Message:
  -----------
  Fix typos in Interfaces.md

PiperOrigin-RevId: 267548530


  Commit: 1b8eff8fcd80fa40792d24953373b54e6da1305f
      https://github.com/llvm/llvm-project/commit/1b8eff8fcd80fa40792d24953373b54e6da1305f
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2019-09-06 (Fri, 06 Sep 2019)

  Changed paths:
    M mlir/include/mlir/Conversion/StandardToLLVM/ConvertStandardToLLVM.h
    M mlir/lib/Dialect/Linalg/Transforms/LowerToLLVMDialect.cpp
    M mlir/test/Dialect/Linalg/llvm.mlir

  Log Message:
  -----------
  Simplify Linalg ABI integration with external function calls.

View descriptors are converted to *pointer to* LLVM struct to avoid ABI issues related to C struct packing. This creates unnecessary complexity and hampers unification with memrefs.
Instead, this CL makes view descriptors convert to LLVM struct (as it was originally) and promotes all structs to pointers right before calling an external function.

PiperOrigin-RevId: 267602693


  Commit: 8154370b49b3de5276622d0e65c73a5a0f17f56d
      https://github.com/llvm/llvm-project/commit/8154370b49b3de5276622d0e65c73a5a0f17f56d
  Author: Nagy Mostafa <nagy.mostafa at gmail.com>
  Date:   2019-09-06 (Fri, 06 Sep 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/AffineOps/AffineOps.td
    M mlir/include/mlir/EDSC/Intrinsics.h
    M mlir/lib/Dialect/AffineOps/AffineOps.cpp
    M mlir/test/EDSC/builder-api-test.cpp

  Log Message:
  -----------
  Add custom builder for AffineIfOp

Closes tensorflow/mlir#109

COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/109 from nmostafa:nmostafa/AffineIfOp 7dbf2115f0092ffab26381ea8704aa05a0253971
PiperOrigin-RevId: 267633077


  Commit: b78410fd81625653c1706df7085bf69d26e59f3f
      https://github.com/llvm/llvm-project/commit/b78410fd81625653c1706df7085bf69d26e59f3f
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-09-06 (Fri, 06 Sep 2019)

  Changed paths:
    M mlir/lib/Dialect/AffineOps/AffineOps.cpp

  Log Message:
  -----------
  Restrict affine inlining to just Function operations.

The current restrictions on dim/symbols require a top-level symbol for the conservative case of a non-affine region. This should be relaxed in the future.

PiperOrigin-RevId: 267641838


  Commit: 06398f32f61dd1ee52853ea1a5d1c863a402ac5b
      https://github.com/llvm/llvm-project/commit/06398f32f61dd1ee52853ea1a5d1c863a402ac5b
  Author: Mehdi Amini <aminim at google.com>
  Date:   2019-09-06 (Fri, 06 Sep 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/StandardOps/Ops.td

  Log Message:
  -----------
  Fix typo in the documentation for tensor_cast (NFC)

PiperOrigin-RevId: 267650411


  Commit: 6e5d1b9d62c91d9c0358be88310bc20949168508
      https://github.com/llvm/llvm-project/commit/6e5d1b9d62c91d9c0358be88310bc20949168508
  Author: Lei Zhang <antiagainst at google.com>
  Date:   2019-09-07 (Sat, 07 Sep 2019)

  Changed paths:
    A mlir/g3doc/DeclarativeRewrites.md
    M mlir/g3doc/OpDefinitions.md

  Log Message:
  -----------
  Add doc for declarative rewrite rules

This doc serves as a manual for table-driven declarative rewrite rules.
It lists all the details regarding supported mechanisms.

PiperOrigin-RevId: 267761702


  Commit: 53bb528b192a3c965e37f0ca4ac480f8db956070
      https://github.com/llvm/llvm-project/commit/53bb528b192a3c965e37f0ca4ac480f8db956070
  Author: Mehdi Amini <aminim at google.com>
  Date:   2019-09-07 (Sat, 07 Sep 2019)

  Changed paths:
    M mlir/lib/ExecutionEngine/ExecutionEngine.cpp

  Log Message:
  -----------
  Wrap debug dump in LLVM_DEBUG

PiperOrigin-RevId: 267774506


  Commit: 713ab0dde796f65e6289f9af1f3fe279d17554d0
      https://github.com/llvm/llvm-project/commit/713ab0dde796f65e6289f9af1f3fe279d17554d0
  Author: Uday Bondhugula <udayb at iisc.ac.in>
  Date:   2019-09-07 (Sat, 07 Sep 2019)

  Changed paths:
    M mlir/include/mlir/ExecutionEngine/ExecutionEngine.h
    M mlir/lib/ExecutionEngine/ExecutionEngine.cpp
    M mlir/lib/Support/JitRunner.cpp

  Log Message:
  -----------
  Set mlir-cpu-runner JIT codegen opt level correctly

- the JIT codegen was being run at the default -O0 level; instead,
  propagate the opt level from the cmd line.

Signed-off-by: Uday Bondhugula <uday at polymagelabs.com>

Closes tensorflow/mlir#123

COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/123 from bondhugula:jit-runner 3b055e47f94c9a48bf487f6400787478738cda02
PiperOrigin-RevId: 267778586


  Commit: 6443583bfd9ca8d1934c5ab240dc11b44c7cc0d4
      https://github.com/llvm/llvm-project/commit/6443583bfd9ca8d1934c5ab240dc11b44c7cc0d4
  Author: Mehdi Amini <aminim at google.com>
  Date:   2019-09-07 (Sat, 07 Sep 2019)

  Changed paths:
    M mlir/include/mlir/Transforms/RegionUtils.h
    M mlir/lib/Transforms/Utils/RegionUtils.cpp

  Log Message:
  -----------
  Refactor getUsedValuesDefinedAbove to expose a variant taking a callback (NFC)

This will allow clients to implement a different collection strategy on these
values, including collecting each uses within the region for example.

PiperOrigin-RevId: 267803978


  Commit: cbb6f09ce8416e8752dffe17641400b547eb71ca
      https://github.com/llvm/llvm-project/commit/cbb6f09ce8416e8752dffe17641400b547eb71ca
  Author: Mehdi Amini <aminim at google.com>
  Date:   2019-09-07 (Sat, 07 Sep 2019)

  Changed paths:
    M mlir/test/lib/TestDialect/TestDialect.cpp

  Log Message:
  -----------
  Use "final" instead of marking method virtual in override (NFC)

This is the only example for overriding this interface in the repo, let's
try to make it right as it may be taken as a reference when implemented in
other dialects

PiperOrigin-RevId: 267811123


  Commit: 120509a6b22b7532849e22c093b912ef4a1d0c73
      https://github.com/llvm/llvm-project/commit/120509a6b22b7532849e22c093b912ef4a1d0c73
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-09-08 (Sun, 08 Sep 2019)

  Changed paths:
    M mlir/include/mlir/Pass/PassInstrumentation.h
    M mlir/lib/Pass/Pass.cpp
    M mlir/lib/Pass/PassDetail.h
    M mlir/lib/Pass/PassTiming.cpp
    M mlir/test/Pass/pass-timing.mlir
    M mlir/test/lib/CMakeLists.txt
    A mlir/test/lib/Pass/CMakeLists.txt
    A mlir/test/lib/Pass/TestPassManager.cpp
    M mlir/tools/mlir-opt/CMakeLists.txt

  Log Message:
  -----------
  Refactor PassTiming to support nested pipelines.

This is done via a new set of instrumentation hooks runBeforePipeline/runAfterPipeline, that signal the lifetime of a pass pipeline on a specific operation type. These hooks also provide the parent thread of the pipeline, allowing for accurate merging of timers running on different threads.

PiperOrigin-RevId: 267909193


  Commit: 42b60d34fc3dfbad2b26568cf1cd903685df3a3e
      https://github.com/llvm/llvm-project/commit/42b60d34fc3dfbad2b26568cf1cd903685df3a3e
  Author: Mehdi Amini <aminim at google.com>
  Date:   2019-09-08 (Sun, 08 Sep 2019)

  Changed paths:
    M mlir/include/mlir/IR/OpImplementation.h
    M mlir/lib/Parser/Parser.cpp
    A mlir/test/IR/wrapping_op.mlir
    M mlir/test/lib/TestDialect/TestDialect.cpp
    M mlir/test/lib/TestDialect/TestOps.td

  Log Message:
  -----------
  Add `parseGenericOperation()` to the OpAsmParser

This method parses an operation in its generic form, from the current parser
state. This is the symmetric of OpAsmPrinter::printGenericOp(). An immediate
use case is illustrated in the test dialect, where an operation wraps another
one in its region and makes use of a single-line pretty-print form.

PiperOrigin-RevId: 267930869


  Commit: 318ff019cf703ece10df791b2da8307f3248baee
      https://github.com/llvm/llvm-project/commit/318ff019cf703ece10df791b2da8307f3248baee
  Author: Stephan Herhut <herhut at google.com>
  Date:   2019-09-09 (Mon, 09 Sep 2019)

  Changed paths:
    M mlir/lib/Dialect/GPU/Transforms/KernelOutlining.cpp
    M mlir/test/Dialect/GPU/outlining.mlir

  Log Message:
  -----------
  Addressing some late review comments on kernel inlining.

Just formatting and better lit tests, no functional change.

PiperOrigin-RevId: 267942907


  Commit: e702875d16b58601bdc05d1d51e33105e0b03b0d
      https://github.com/llvm/llvm-project/commit/e702875d16b58601bdc05d1d51e33105e0b03b0d
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-09-09 (Mon, 09 Sep 2019)

  Changed paths:
    M mlir/include/mlir/Pass/PassManager.h
    M mlir/lib/Pass/Pass.cpp
    M mlir/lib/Pass/PassDetail.h
    M mlir/lib/Pass/PassTiming.cpp
    M mlir/test/Pass/pass-timing.mlir

  Log Message:
  -----------
  Add support for coalescing adjacent nested pass pipelines.

This allows for parallelizing across pipelines of multiple operation types. AdaptorPasses can now hold pass managers for multiple operation types and will dispatch based upon the operation being operated on.

PiperOrigin-RevId: 268017344


  Commit: 5e65dafbfa8e996a13d38b064a1aa3e9986d05bf
      https://github.com/llvm/llvm-project/commit/5e65dafbfa8e996a13d38b064a1aa3e9986d05bf
  Author: MLIR Team <no-reply at google.com>
  Date:   2019-09-09 (Mon, 09 Sep 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/LLVMIR/NVVMOps.td
    M mlir/test/Target/nvvmir.mlir

  Log Message:
  -----------
  Add warpsize and laneid intrinsics to NVVM dialect.

PiperOrigin-RevId: 268041263


  Commit: 36508528c71606341af77ab755ecf63d9c09249b
      https://github.com/llvm/llvm-project/commit/36508528c71606341af77ab755ecf63d9c09249b
  Author: MLIR Team <no-reply at google.com>
  Date:   2019-09-09 (Mon, 09 Sep 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
    M mlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp

  Log Message:
  -----------
  Overload LLVM::TerminatorOp::build() for empty operands list.

PiperOrigin-RevId: 268041584


  Commit: 893c86fff7efa87c8d81e6f6e7a200a0b3f7ece5
      https://github.com/llvm/llvm-project/commit/893c86fff7efa87c8d81e6f6e7a200a0b3f7ece5
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-09-09 (Mon, 09 Sep 2019)

  Changed paths:
    M mlir/include/mlir/Pass/PassManager.h
    M mlir/lib/Pass/Pass.cpp

  Log Message:
  -----------
  Explicitly declare the OpPassManager move constructor to avoid undefined errors.

Some compilers will try to auto-generate the destructor, instead of using the user provided destructor, when creating a default move constructor.

PiperOrigin-RevId: 268067367


  Commit: 27d776fa6d04e3ca47c42f5b9a90413c7243c35a
      https://github.com/llvm/llvm-project/commit/27d776fa6d04e3ca47c42f5b9a90413c7243c35a
  Author: Feng Liu <fengliuai at google.com>
  Date:   2019-09-09 (Mon, 09 Sep 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/QuantOps/FakeQuantSupport.h
    M mlir/lib/Dialect/QuantOps/Utils/FakeQuantSupport.cpp

  Log Message:
  -----------
  Convert per channel fake quant attributes to type

For per channel fake quant attributes, the returned type should be
UniformQuantizedPerAxisType. Currently, this method isn't under test because we
haven't added the quant_ConstFakeQuantPerAxis op and the convert method.

PiperOrigin-RevId: 268084017


  Commit: d3a6dbc0b895bdfdae3627c00d35066c4f51b032
      https://github.com/llvm/llvm-project/commit/d3a6dbc0b895bdfdae3627c00d35066c4f51b032
  Author: Feng Liu <fengliuai at google.com>
  Date:   2019-09-09 (Mon, 09 Sep 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/QuantOps/UniformSupport.h
    M mlir/lib/Dialect/QuantOps/Transforms/ConvertSimQuant.cpp
    M mlir/lib/Dialect/QuantOps/Utils/UniformSupport.cpp

  Log Message:
  -----------
  [NFC] Rename ExpressedToUniformQuantizedType to ExpressedToQuantizedType

PiperOrigin-RevId: 268090906


  Commit: f4ae4762bf7d64d7ca46d05206955c9b44cedc49
      https://github.com/llvm/llvm-project/commit/f4ae4762bf7d64d7ca46d05206955c9b44cedc49
  Author: Feng Liu <fengliuai at google.com>
  Date:   2019-09-09 (Mon, 09 Sep 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/QuantOps/QuantOps.td
    M mlir/test/Dialect/QuantOps/parse-ops.mlir

  Log Message:
  -----------
  Add quant.const_fake_quant_per_axis op

Comparing to the existing quant.const_fake_quant op, the min and max attributes
of this new op is for each channel of last dimension of the input.

PiperOrigin-RevId: 268093722


  Commit: 2660623a88d10df9ea7976d5e80704c5c7aab981
      https://github.com/llvm/llvm-project/commit/2660623a88d10df9ea7976d5e80704c5c7aab981
  Author: Jacques Pienaar <jpienaar at google.com>
  Date:   2019-09-09 (Mon, 09 Sep 2019)

  Changed paths:
    M mlir/include/mlir/IR/Operation.h
    A mlir/include/mlir/Transforms/ViewOpGraph.h
    M mlir/lib/IR/Operation.cpp
    M mlir/lib/Transforms/CMakeLists.txt
    A mlir/lib/Transforms/ViewOpGraph.cpp

  Log Message:
  -----------
  Add pass generate per block in a function a GraphViz Dot graph with ops as nodes

* Add GraphTraits that treat a block as a graph, Operation* as node and use-relationship for edges;
  - Just basic graph output;
* Add use iterator to iterate over all uses of an Operation;
* Add testing pass to generate op graph;

This does not support arbitrary operations other than function nor nested regions yet.

PiperOrigin-RevId: 268121782


  Commit: af27f4c74665030889176596d65690bb768f3adc
      https://github.com/llvm/llvm-project/commit/af27f4c74665030889176596d65690bb768f3adc
  Author: Jacques Pienaar <jpienaar at google.com>
  Date:   2019-09-09 (Mon, 09 Sep 2019)

  Changed paths:
    M mlir/unittests/TableGen/StructsGenTest.cpp

  Log Message:
  -----------
  Avoid sign-compare warning

PiperOrigin-RevId: 268132321


  Commit: a23f69a37b33a627bf37acc8438883043041980e
      https://github.com/llvm/llvm-project/commit/a23f69a37b33a627bf37acc8438883043041980e
  Author: Jacques Pienaar <jpienaar at google.com>
  Date:   2019-09-09 (Mon, 09 Sep 2019)

  Changed paths:
    M mlir/lib/Transforms/ViewOpGraph.cpp

  Log Message:
  -----------
  Remove redundant qualification

Address GCC error: extra qualification not allowed [-fpermissive]

PiperOrigin-RevId: 268133737


  Commit: 277b6136ee78e621a1737e35956d1a9317ff096d
      https://github.com/llvm/llvm-project/commit/277b6136ee78e621a1737e35956d1a9317ff096d
  Author: Jacques Pienaar <jpienaar at google.com>
  Date:   2019-09-10 (Tue, 10 Sep 2019)

  Changed paths:
    M mlir/lib/Dialect/Linalg/Transforms/LowerToLLVMDialect.cpp

  Log Message:
  -----------
  Remove unused variable

PiperOrigin-RevId: 268173638


  Commit: c68d5467d604d2b1e06a704133370f51a99df11d
      https://github.com/llvm/llvm-project/commit/c68d5467d604d2b1e06a704133370f51a99df11d
  Author: Feng Liu <fengliuai at google.com>
  Date:   2019-09-10 (Tue, 10 Sep 2019)

  Changed paths:
    M mlir/lib/Dialect/QuantOps/Transforms/ConvertSimQuant.cpp
    M mlir/lib/Dialect/QuantOps/Utils/FakeQuantSupport.cpp
    M mlir/test/Dialect/QuantOps/convert-fakequant.mlir

  Log Message:
  -----------
  Convert ConstFakeQuantPerAxis to qcast and dcast pair

This is also to add the test to the fakeQuantAttrsToType for per-channel fake quant.

PiperOrigin-RevId: 268260032


  Commit: cf0a7823390818273892a3be5820c09403a15ec7
      https://github.com/llvm/llvm-project/commit/cf0a7823390818273892a3be5820c09403a15ec7
  Author: Feng Liu <fengliuai at google.com>
  Date:   2019-09-10 (Tue, 10 Sep 2019)

  Changed paths:
    M mlir/lib/Dialect/QuantOps/Utils/FakeQuantSupport.cpp
    M mlir/test/Dialect/QuantOps/convert-fakequant-invalid.mlir
    M mlir/test/Dialect/QuantOps/convert-fakequant.mlir

  Log Message:
  -----------
  Remove the constraint that min / max should stride zero

Since we apply nudging for the zero point to make sure the nudged zerop points
can be in the range of [qmin, qmax], the constraint that rmin / rmax should
stride zero isn't necessary.

This also matches the documentation of tensorflow's FakeQuantWithMinMaxArgs op,
where min and max don't need to stride zero:
https://www.tensorflow.org/api_docs/python/tf/quantization/fake_quant_with_min_max_args

PiperOrigin-RevId: 268296285


  Commit: ee8cbccacfc8755d1692ff64ad98876917a08b30
      https://github.com/llvm/llvm-project/commit/ee8cbccacfc8755d1692ff64ad98876917a08b30
  Author: Lei Zhang <antiagainst at google.com>
  Date:   2019-09-10 (Tue, 10 Sep 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/SPIRV/SPIRVOps.td
    M mlir/lib/Dialect/SPIRV/SPIRVOps.cpp
    M mlir/test/Dialect/SPIRV/canonicalize.mlir

  Log Message:
  -----------
  Add folding rule for spv.CompositeExtract

If the composite is a constant, we can fold it away. This only
supports vector and array constants for now, given that struct
constant is not supported in spv.constant yet.

PiperOrigin-RevId: 268350340


  Commit: d732aaf2cb24b1b759adc9dccd34e0a3b18fef13
      https://github.com/llvm/llvm-project/commit/d732aaf2cb24b1b759adc9dccd34e0a3b18fef13
  Author: MLIR Team <no-reply at google.com>
  Date:   2019-09-10 (Tue, 10 Sep 2019)

  Changed paths:
    M mlir/lib/ExecutionEngine/ExecutionEngine.cpp

  Log Message:
  -----------
  Don't leak TargetMachine in ExecutionEngine::setupTargetTriple

PiperOrigin-RevId: 268361054


  Commit: 6f8321f06f0772676e42bc93feca7605a8feb8ea
      https://github.com/llvm/llvm-project/commit/6f8321f06f0772676e42bc93feca7605a8feb8ea
  Author: MLIR Team <no-reply at google.com>
  Date:   2019-09-10 (Tue, 10 Sep 2019)

  Changed paths:
    M mlir/include/mlir/Analysis/AffineStructures.h

  Log Message:
  -----------
  Fix a typo in comments. The Inequality and Equality explanations were apparently reversed.

PiperOrigin-RevId: 268395163


  Commit: bc9b52f2ed71ee938f30591b8b6c6f549f53fc88
      https://github.com/llvm/llvm-project/commit/bc9b52f2ed71ee938f30591b8b6c6f549f53fc88
  Author: MLIR Team <no-reply at google.com>
  Date:   2019-09-11 (Wed, 11 Sep 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/LLVMIR/NVVMOps.td

  Log Message:
  -----------
  Add logical groups to NVVM op definitions.

PiperOrigin-RevId: 268436116


  Commit: 9037f28cb4e19d311478dbe2596edda64c37f5af
      https://github.com/llvm/llvm-project/commit/9037f28cb4e19d311478dbe2596edda64c37f5af
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2019-09-11 (Wed, 11 Sep 2019)

  Changed paths:
    M mlir/unittests/SDBM/SDBMTest.cpp

  Log Message:
  -----------
  Fix typos in SDBMTest.cpp

PiperOrigin-RevId: 268443146


  Commit: e15356f8edab9ce4b4edbaf2e988d6b38adb59cc
      https://github.com/llvm/llvm-project/commit/e15356f8edab9ce4b4edbaf2e988d6b38adb59cc
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2019-09-11 (Wed, 11 Sep 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/SDBM/SDBM.h
    M mlir/include/mlir/Dialect/SDBM/SDBMExpr.h
    M mlir/lib/Dialect/SDBM/SDBM.cpp
    M mlir/lib/Dialect/SDBM/SDBMExpr.cpp
    M mlir/lib/Dialect/SDBM/SDBMExprDetail.h
    M mlir/unittests/SDBM/SDBMTest.cpp

  Log Message:
  -----------
  Rename SDBMPositiveExpr to SDBMTermExpr

This better reflects how this kind of expressions is used and avoids the
potential confusion since the expression can take negative values.  Term
expressions comprise dimensions, symbols and stripe expressions.  In an SDBM
domain, a stripe expression always corresponds to a variable, input or
temporary.  This expression can appear anywhere an input variable can,
including on the LHS of other stripe expressions.

PiperOrigin-RevId: 268486066


  Commit: a84bc68accc5103621df3b1661153c419ecafed7
      https://github.com/llvm/llvm-project/commit/a84bc68accc5103621df3b1661153c419ecafed7
  Author: Lei Zhang <antiagainst at google.com>
  Date:   2019-09-11 (Wed, 11 Sep 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/SPIRV/SPIRVControlFlowOps.td
    M mlir/include/mlir/IR/Function.h
    M mlir/lib/Dialect/SPIRV/SPIRVOps.cpp
    M mlir/lib/Dialect/SPIRV/Serialization/Deserializer.cpp
    M mlir/lib/Dialect/SPIRV/Serialization/Serializer.cpp
    M mlir/lib/IR/Function.cpp
    A mlir/test/Dialect/SPIRV/Serialization/loop.mlir

  Log Message:
  -----------
  [spirv] Add support for spv.loop (de)serialization

This CL adds support for serializing and deserializing spv.loop ops.
This adds support for spv.Branch and spv.BranchConditional op
(de)serialization, too, because they are needed for spv.loop.

PiperOrigin-RevId: 268536962


  Commit: f39a599e46de8ea1c18e30216df516d22395df2f
      https://github.com/llvm/llvm-project/commit/f39a599e46de8ea1c18e30216df516d22395df2f
  Author: Geoffrey Martin-Noble <gcmn at google.com>
  Date:   2019-09-12 (Thu, 12 Sep 2019)

  Changed paths:
    M mlir/test/Transforms/constant-fold.mlir

  Log Message:
  -----------
  NFC: Clean up constant fold tests

Use variable captures to make constant folding tests less sensitive to printer/parser implementation details.

See guidelines at https://github.com/tensorflow/mlir/blob/master/g3doc/TestingGuide.md

PiperOrigin-RevId: 268780812


  Commit: 2ccbb3f1ceeb326309c0685305d1dfd38d5dbcc2
      https://github.com/llvm/llvm-project/commit/2ccbb3f1ceeb326309c0685305d1dfd38d5dbcc2
  Author: Geoffrey Martin-Noble <gcmn at google.com>
  Date:   2019-09-12 (Thu, 12 Sep 2019)

  Changed paths:
    M mlir/lib/Dialect/StandardOps/Ops.cpp
    M mlir/test/Transforms/constant-fold.mlir

  Log Message:
  -----------
  Cmpf constant folding for nan and inf

PiperOrigin-RevId: 268783645


  Commit: 1854c64c7cc57e9fe44404578408f732f58b9715
      https://github.com/llvm/llvm-project/commit/1854c64c7cc57e9fe44404578408f732f58b9715
  Author: Smit Hinsu <hinsu at google.com>
  Date:   2019-09-13 (Fri, 13 Sep 2019)

  Changed paths:
    M mlir/lib/Transforms/DialectConversion.cpp

  Log Message:
  -----------
  Log name of the generated illegal operation name in DialectConversion debug mode

PiperOrigin-RevId: 268859399


  Commit: 6cce275301d196a1033c84c7f48df5e8932c03f7
      https://github.com/llvm/llvm-project/commit/6cce275301d196a1033c84c7f48df5e8932c03f7
  Author: MLIR Team <no-reply at google.com>
  Date:   2019-09-13 (Fri, 13 Sep 2019)

  Changed paths:
    M mlir/g3doc/WritingAPass.md

  Log Message:
  -----------
  Fixing typo in documentation.

PiperOrigin-RevId: 268877189


  Commit: 70653ed6003ee39e59d7a8d72059ed798ef2e000
      https://github.com/llvm/llvm-project/commit/70653ed6003ee39e59d7a8d72059ed798ef2e000
  Author: Geoffrey Martin-Noble <gcmn at google.com>
  Date:   2019-09-13 (Fri, 13 Sep 2019)

  Changed paths:
    M mlir/include/mlir/IR/OpBase.td

  Log Message:
  -----------
  NFC: Update comments about rank constraints

These refer to ranked tensors, but are actually applicable to any shaped type

PiperOrigin-RevId: 268931789


  Commit: 9274ed66ef30bf605b468ae1aba11363e879c930
      https://github.com/llvm/llvm-project/commit/9274ed66ef30bf605b468ae1aba11363e879c930
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-09-13 (Fri, 13 Sep 2019)

  Changed paths:
    M mlir/include/mlir/Pass/PassManager.h
    M mlir/include/mlir/Pass/PassRegistry.h
    M mlir/include/mlir/Support/MlirOptMain.h
    M mlir/lib/Pass/Pass.cpp
    M mlir/lib/Pass/PassManagerOptions.cpp
    M mlir/lib/Pass/PassRegistry.cpp
    M mlir/lib/Support/MlirOptMain.cpp
    A mlir/test/Pass/pipeline-parsing.mlir
    M mlir/test/lib/Pass/TestPassManager.cpp
    M mlir/tools/mlir-opt/mlir-opt.cpp

  Log Message:
  -----------
  Refactor pass pipeline command line parsing to support explicit pipeline strings.

This allows for explicitly specifying the pipeline to add to the pass manager. This includes the nesting structure, as well as the passes/pipelines to run. A textual pipeline string is defined as a series of names, each of which may in itself recursively contain a nested pipeline description. A name is either the name of a registered pass, or pass pipeline, (e.g. "cse") or the name of an operation type (e.g. "func").

For example, the following pipeline:
$ mlir-opt foo.mlir -cse -canonicalize -lower-to-llvm

Could now be specified as:
$ mlir-opt foo.mlir -pass-pipeline='func(cse, canonicalize), lower-to-llvm'

This will allow for running pipelines on nested operations, like say spirv modules. This does not remove any of the current functionality, and in fact can be used in unison. The new option is available via 'pass-pipeline'.

PiperOrigin-RevId: 268954279


  Commit: d3787e58654c15f8bfacc3471eba056f34782055
      https://github.com/llvm/llvm-project/commit/d3787e58654c15f8bfacc3471eba056f34782055
  Author: MLIR Team <no-reply at google.com>
  Date:   2019-09-13 (Fri, 13 Sep 2019)

  Changed paths:
    M mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp

  Log Message:
  -----------
  Improve verifier error reporting on type mismatch (NFC)

Before this change, it only reports expected type but not exact type, so
it's hard to troubleshoot.

PiperOrigin-RevId: 268961078


  Commit: 8a1cdeb31bd56d6eb5182a3ca3e019ca9654ef39
      https://github.com/llvm/llvm-project/commit/8a1cdeb31bd56d6eb5182a3ca3e019ca9654ef39
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-09-13 (Fri, 13 Sep 2019)

  Changed paths:
    M mlir/g3doc/Diagnostics.md
    M mlir/include/mlir/IR/Diagnostics.h
    M mlir/lib/IR/Diagnostics.cpp
    M mlir/lib/Pass/Pass.cpp

  Log Message:
  -----------
  Forward diagnostics from untracked threads in ParallelDiagnosticHandler.

This allows for the use of multiple ParallelDiagnosticHandlers without having them conflict with each other.

PiperOrigin-RevId: 268967407


  Commit: a260436714b35584bbc1cdd39834b5556b991178
      https://github.com/llvm/llvm-project/commit/a260436714b35584bbc1cdd39834b5556b991178
  Author: Geoffrey Martin-Noble <gcmn at google.com>
  Date:   2019-09-13 (Fri, 13 Sep 2019)

  Changed paths:
    M mlir/include/mlir/IR/OpBase.td
    M mlir/test/lib/TestDialect/TestOps.td
    M mlir/test/mlir-tblgen/types.mlir

  Log Message:
  -----------
  Add tablegen class for memrefs with rank constraints

PiperOrigin-RevId: 268968004


  Commit: f1b100c77ba005899c60f3dea74607d5daad3f52
      https://github.com/llvm/llvm-project/commit/f1b100c77ba005899c60f3dea74607d5daad3f52
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-09-13 (Fri, 13 Sep 2019)

  Changed paths:
    M mlir/examples/Linalg/Linalg1/include/linalg1/Passes.h
    M mlir/examples/Linalg/Linalg1/lib/ConvertToLLVMDialect.cpp
    M mlir/examples/Linalg/Linalg3/include/linalg3/Transforms.h
    M mlir/examples/Linalg/Linalg3/lib/Transforms.cpp
    M mlir/include/mlir/Analysis/Passes.h
    M mlir/include/mlir/Conversion/ControlFlowToCFG/ConvertControlFlowToCFG.h
    M mlir/include/mlir/Conversion/GPUToCUDA/GPUToCUDAPass.h
    M mlir/include/mlir/Conversion/GPUToNVVM/GPUToNVVMPass.h
    M mlir/include/mlir/Conversion/LoopsToGPU/LoopsToGPUPass.h
    M mlir/include/mlir/Conversion/StandardToLLVM/ConvertStandardToLLVMPass.h
    M mlir/include/mlir/Conversion/VectorToLLVM/VectorToLLVM.h
    M mlir/include/mlir/Dialect/FxpMathOps/Passes.h
    M mlir/include/mlir/Dialect/GPU/Passes.h
    M mlir/include/mlir/Dialect/Linalg/Passes.h
    M mlir/include/mlir/Dialect/QuantOps/Passes.h
    M mlir/include/mlir/Dialect/SPIRV/Passes.h
    M mlir/include/mlir/Pass/Pass.h
    M mlir/include/mlir/Quantizer/Transforms/Passes.h
    M mlir/include/mlir/Transforms/Passes.h
    M mlir/include/mlir/Transforms/ViewOpGraph.h
    M mlir/include/mlir/Transforms/ViewRegionGraph.h
    M mlir/lib/Analysis/MemRefBoundCheck.cpp
    M mlir/lib/Analysis/TestMemRefDependenceCheck.cpp
    M mlir/lib/Analysis/TestParallelismDetection.cpp
    M mlir/lib/Conversion/ControlFlowToCFG/ConvertControlFlowToCFG.cpp
    M mlir/lib/Conversion/GPUToCUDA/ConvertKernelFuncToCubin.cpp
    M mlir/lib/Conversion/GPUToCUDA/ConvertLaunchFuncToCudaCalls.cpp
    M mlir/lib/Conversion/GPUToCUDA/GenerateCubinAccessors.cpp
    M mlir/lib/Conversion/GPUToNVVM/LowerGpuOpsToNVVMOps.cpp
    M mlir/lib/Conversion/GPUToSPIRV/GPUToSPIRV.cpp
    M mlir/lib/Conversion/LoopsToGPU/LoopsToGPUPass.cpp
    M mlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp
    M mlir/lib/Conversion/StandardToSPIRV/ConvertStandardToSPIRVPass.cpp
    M mlir/lib/Conversion/VectorToLLVM/VectorToLLVM.cpp
    M mlir/lib/Dialect/FxpMathOps/Transforms/LowerUniformRealMath.cpp
    M mlir/lib/Dialect/GPU/Transforms/KernelOutlining.cpp
    M mlir/lib/Dialect/Linalg/Transforms/Fusion.cpp
    M mlir/lib/Dialect/Linalg/Transforms/LowerToLLVMDialect.cpp
    M mlir/lib/Dialect/Linalg/Transforms/LowerToLoops.cpp
    M mlir/lib/Dialect/Linalg/Transforms/Tiling.cpp
    M mlir/lib/Dialect/QuantOps/Transforms/ConvertConst.cpp
    M mlir/lib/Dialect/QuantOps/Transforms/ConvertSimQuant.cpp
    M mlir/lib/Quantizer/Transforms/AddDefaultStatsTestPass.cpp
    M mlir/lib/Quantizer/Transforms/InferQuantizedTypesPass.cpp
    M mlir/lib/Quantizer/Transforms/RemoveInstrumentationPass.cpp
    M mlir/lib/Transforms/AffineDataCopyGeneration.cpp
    M mlir/lib/Transforms/CSE.cpp
    M mlir/lib/Transforms/Canonicalizer.cpp
    M mlir/lib/Transforms/LoopCoalescing.cpp
    M mlir/lib/Transforms/LoopFusion.cpp
    M mlir/lib/Transforms/LoopInvariantCodeMotion.cpp
    M mlir/lib/Transforms/LoopTiling.cpp
    M mlir/lib/Transforms/LoopUnroll.cpp
    M mlir/lib/Transforms/LoopUnrollAndJam.cpp
    M mlir/lib/Transforms/LowerAffine.cpp
    M mlir/lib/Transforms/LowerVectorTransfers.cpp
    M mlir/lib/Transforms/MaterializeVectors.cpp
    M mlir/lib/Transforms/MemRefDataFlowOpt.cpp
    M mlir/lib/Transforms/PipelineDataTransfer.cpp
    M mlir/lib/Transforms/SimplifyAffineStructures.cpp
    M mlir/lib/Transforms/StripDebugInfo.cpp
    M mlir/lib/Transforms/Vectorize.cpp
    M mlir/lib/Transforms/ViewOpGraph.cpp
    M mlir/lib/Transforms/ViewRegionGraph.cpp
    M mlir/test/lib/Transforms/TestConstantFold.cpp
    M mlir/test/lib/Transforms/TestLoopFusion.cpp
    M mlir/test/lib/Transforms/TestLoopParametricTiling.cpp
    M mlir/test/lib/Transforms/TestVectorizationUtils.cpp
    M mlir/tools/mlir-cuda-runner/mlir-cuda-runner.cpp

  Log Message:
  -----------
  NFC: Finish replacing FunctionPassBase/ModulePassBase with OpPassBase.

These directives were temporary during the generalization of FunctionPass/ModulePass to OpPass.

PiperOrigin-RevId: 268970259


  Commit: 113aadddf99377d7205ef840b3292bbf55648d97
      https://github.com/llvm/llvm-project/commit/113aadddf99377d7205ef840b3292bbf55648d97
  Author: Lei Zhang <antiagainst at google.com>
  Date:   2019-09-13 (Fri, 13 Sep 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/SPIRV/SPIRVBase.td
    M mlir/lib/Conversion/GPUToSPIRV/GPUToSPIRV.cpp
    M mlir/test/Conversion/GPUToSPIRV/builtins.mlir
    M mlir/test/Conversion/GPUToSPIRV/load_store.mlir
    M mlir/test/Conversion/GPUToSPIRV/simple.mlir
    M mlir/test/Dialect/SPIRV/Serialization/access_chain.mlir
    M mlir/test/Dialect/SPIRV/Serialization/array_stride.mlir
    M mlir/test/Dialect/SPIRV/Serialization/bin_ops.mlir
    M mlir/test/Dialect/SPIRV/Serialization/entry.mlir
    M mlir/test/Dialect/SPIRV/Serialization/entry_interface.mlir
    M mlir/test/Dialect/SPIRV/Serialization/execution_mode.mlir
    M mlir/test/Dialect/SPIRV/Serialization/load_store.mlir
    M mlir/test/Dialect/SPIRV/Serialization/minimal-module.mlir
    M mlir/test/Dialect/SPIRV/Serialization/select.mlir
    M mlir/test/Dialect/SPIRV/Serialization/struct.mlir
    M mlir/test/Dialect/SPIRV/Serialization/variable_reference.mlir
    M mlir/test/Dialect/SPIRV/Serialization/variables.mlir
    M mlir/test/Dialect/SPIRV/Serialization/variables_init.mlir
    M mlir/test/Dialect/SPIRV/control-flow-ops.mlir
    M mlir/test/Dialect/SPIRV/ops.mlir
    M mlir/test/Dialect/SPIRV/structure-ops.mlir
    M mlir/utils/spirv/gen_spirv_dialect.py

  Log Message:
  -----------
  Update SPIR-V symbols and use GLSL450 instead of VulkanKHR

SPIR-V recently publishes v1.5, which brings a bunch of symbols
into core. So the suffix "KHR"/"EXT"/etc. is removed from the
symbols. We use a script to pull information from the spec
directly.

Also changed conversion and tests to use GLSL450 instead of
VulkanKHR memory model. GLSL450 is still the main memory model
supported by Vulkan shaders and it does not require extra
capability to enable.

PiperOrigin-RevId: 268992661


  Commit: efbd3e461017a471eece97ef4f8392c3ad092eab
      https://github.com/llvm/llvm-project/commit/efbd3e461017a471eece97ef4f8392c3ad092eab
  Author: Geoffrey Martin-Noble <gcmn at google.com>
  Date:   2019-09-13 (Fri, 13 Sep 2019)

  Changed paths:
    M mlir/include/mlir/IR/OpBase.td
    M mlir/test/lib/TestDialect/TestOps.td
    M mlir/test/mlir-tblgen/types.mlir

  Log Message:
  -----------
  Add type constraints for shaped types with same rank and element count

PiperOrigin-RevId: 269000237


  Commit: d780bdef2050f6485396e73220ec76455c563c17
      https://github.com/llvm/llvm-project/commit/d780bdef2050f6485396e73220ec76455c563c17
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-09-13 (Fri, 13 Sep 2019)

  Changed paths:
    M mlir/include/mlir/Pass/PassRegistry.h
    M mlir/lib/Pass/PassRegistry.cpp
    M mlir/test/Pass/pipeline-parsing.mlir
    M mlir/test/lib/Pass/TestPassManager.cpp

  Log Message:
  -----------
  Publicly expose the functionality to parse a textual pass pipeline.

This allows for users other than those on the command line to apply a textual description of a pipeline to a given pass manager.

PiperOrigin-RevId: 269017028


  Commit: 1e6a93b7cae61c777ec4ce06a5f6d7d2b81af0ea
      https://github.com/llvm/llvm-project/commit/1e6a93b7cae61c777ec4ce06a5f6d7d2b81af0ea
  Author: Uday Bondhugula <udayb at iisc.ac.in>
  Date:   2019-09-13 (Fri, 13 Sep 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/StandardOps/Ops.td
    M mlir/lib/Dialect/StandardOps/Ops.cpp
    M mlir/test/Transforms/canonicalize.mlir

  Log Message:
  -----------
  add missing memref cast fold pattern for dim op

- add missing canonicalization pattern to fold memref_cast + dim to
  dim (needed to propagate constant when folding a dynamic shape to
  a static one)

- also fix an outdated/inconsistent comment in StandardOps/Ops.td

Signed-off-by: Uday Bondhugula <uday at polymagelabs.com>

Closes tensorflow/mlir#126

COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/126 from bondhugula:quickfix 4566e75e49685c532faffff91d64c5d83d4da524
PiperOrigin-RevId: 269020058


  Commit: 4e48beadbb45830f6ad45ee463a2159cdc8933a0
      https://github.com/llvm/llvm-project/commit/4e48beadbb45830f6ad45ee463a2159cdc8933a0
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-09-13 (Fri, 13 Sep 2019)

  Changed paths:
    M mlir/lib/IR/Module.cpp
    M mlir/test/IR/invalid-module-op.mlir

  Log Message:
  -----------
  Verify that ModuleOps only contain dialect specific attributes.

ModuleOp has no expected operations, so only dialect-specific attributes are valid.

PiperOrigin-RevId: 269020062


  Commit: f2eb0f02fabae7d03f24d8112600b0137c8265ac
      https://github.com/llvm/llvm-project/commit/f2eb0f02fabae7d03f24d8112600b0137c8265ac
  Author: Uday Bondhugula <udayb at iisc.ac.in>
  Date:   2019-09-13 (Fri, 13 Sep 2019)

  Changed paths:
    M mlir/examples/Linalg/Linalg3/Example.cpp
    M mlir/examples/Linalg/Linalg4/Example.cpp
    M mlir/lib/Dialect/AffineOps/AffineOps.cpp
    M mlir/test/AffineOps/canonicalize.mlir

  Log Message:
  -----------
  Add pattern to canonicalize for loop bounds

- add pattern to canonicalize affine.for loop bounds (using
  canonicalizeMapAndOperands)
- rename AffineForLoopBoundFolder -> AffineForLoopBoundFolder for
  consistency

Signed-off-by: Uday Bondhugula <uday at polymagelabs.com>

Closes tensorflow/mlir#111

COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/111 from bondhugula:bound-canonicalize ee8fb7f43a7ffd45f6df3f53c95098d8b7e494c7
PiperOrigin-RevId: 269041220


  Commit: aac8fa8c4770b142d095007b99a9276f75182172
      https://github.com/llvm/llvm-project/commit/aac8fa8c4770b142d095007b99a9276f75182172
  Author: Lei Zhang <antiagainst at google.com>
  Date:   2019-09-14 (Sat, 14 Sep 2019)

  Changed paths:
    M mlir/g3doc/QuickstartRewrites.md

  Log Message:
  -----------
  Update QuickstartRewrites.md regarding op definition and rewrites

This CL updates the doc with recent changes. It also adds a section
on registering and using the auto-generated patterns.

PiperOrigin-RevId: 269086830


  Commit: 2de18fb84df66e0850b1b66a4cc8a701e6bbe008
      https://github.com/llvm/llvm-project/commit/2de18fb84df66e0850b1b66a4cc8a701e6bbe008
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-09-14 (Sat, 14 Sep 2019)

  Changed paths:
    M mlir/lib/IR/Module.cpp

  Log Message:
  -----------
  NFC: Fix stray character in error message: 1 -> '
PiperOrigin-RevId: 269091468


  Commit: 018cfa94d963f2a62eeba15e84f101a108476b95
      https://github.com/llvm/llvm-project/commit/018cfa94d963f2a62eeba15e84f101a108476b95
  Author: Uday Bondhugula <udayb at iisc.ac.in>
  Date:   2019-09-14 (Sat, 14 Sep 2019)

  Changed paths:
    M mlir/include/mlir/Analysis/AffineStructures.h
    M mlir/include/mlir/Dialect/AffineOps/AffineOps.h
    M mlir/lib/Analysis/AffineStructures.cpp
    M mlir/lib/Analysis/LoopAnalysis.cpp
    M mlir/lib/Dialect/AffineOps/AffineOps.cpp
    M mlir/test/Transforms/unroll.mlir

  Log Message:
  -----------
  Clean up build trip count analysis method - avoid mutating IR

- NFC - on any pass/utility logic/output.

- Resolve TODO; the method building loop trip count maps was
  creating and deleting affine.apply ops (transforming IR from under
  analysis!, strictly speaking). Introduce AffineValueMap::difference to
  do this correctly (without the need to create any IR).

- Move AffineApplyNormalizer out so that its methods are reusable from
  AffineStructures.cpp; add a helper method 'normalize' to it. Fix
  AffineApplyNormalize::renumberOneDim (Issue tensorflow/mlir#89).

- Trim includes on files touched.

- add test case on a scenario previously not covered

Signed-off-by: Uday Bondhugula <uday at polymagelabs.com>

Closes tensorflow/mlir#133

COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/133 from bondhugula:trip-count-build 7fc34d857f7788f98b641792cafad6f5bd50e47b
PiperOrigin-RevId: 269101118


  Commit: 1366467a3ba9c489bbabe27f89cf6af404601149
      https://github.com/llvm/llvm-project/commit/1366467a3ba9c489bbabe27f89cf6af404601149
  Author: Uday Bondhugula <udayb at iisc.ac.in>
  Date:   2019-09-14 (Sat, 14 Sep 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/StandardOps/Ops.td
    M mlir/lib/Transforms/Utils/Utils.cpp
    M mlir/test/Transforms/memref-normalize.mlir

  Log Message:
  -----------
  update normalizeMemRef utility; handle missing failure check + add more tests

- take care of symbolic operands with alloc
- add missing check for compose map failure and a test case
- add test cases on strides
- drop incorrect check for one-to-one'ness

Signed-off-by: Uday Bondhugula <uday at polymagelabs.com>

Closes tensorflow/mlir#132

COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/132 from bondhugula:normalize-memrefs 8aebf285fb0d7c19269d85255aed644657e327b7
PiperOrigin-RevId: 269105947


  Commit: 4f32ae61b4b75ee729ef9a43e4678d55d8deeef3
      https://github.com/llvm/llvm-project/commit/4f32ae61b4b75ee729ef9a43e4678d55d8deeef3
  Author: Uday Bondhugula <udayb at iisc.ac.in>
  Date:   2019-09-14 (Sat, 14 Sep 2019)

  Changed paths:
    M mlir/include/mlir/Transforms/LoopUtils.h
    M mlir/lib/Transforms/AffineDataCopyGeneration.cpp
    M mlir/lib/Transforms/Utils/LoopUtils.cpp

  Log Message:
  -----------
  NFC - Move explicit copy/dma generation utility out of pass and into LoopUtils

- turn copy/dma generation method into a utility in LoopUtils, allowing
  it to be reused elsewhere.

- no functional/logic change to the pass/utility

- trim down header includes in files affected

Signed-off-by: Uday Bondhugula <uday at polymagelabs.com>

Closes tensorflow/mlir#124

COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/124 from bondhugula:datacopy 9f346e62e5bd9dd1986720a30a35f302eb4d3252
PiperOrigin-RevId: 269106088


  Commit: 38e7226606d218bb4d7b7a5c1541c5d81ca0cf14
      https://github.com/llvm/llvm-project/commit/38e7226606d218bb4d7b7a5c1541c5d81ca0cf14
  Author: Jing Pu <jingpu at google.com>
  Date:   2019-09-14 (Sat, 14 Sep 2019)

  Changed paths:
    M mlir/include/mlir/IR/Builders.h
    M mlir/lib/IR/Builders.cpp

  Log Message:
  -----------
  Add convenience methods to create i8 and i16 attributes in Builder.

PiperOrigin-RevId: 269120226


  Commit: cb1bcba69beeeb259eaf15d36892b1922046c525
      https://github.com/llvm/llvm-project/commit/cb1bcba69beeeb259eaf15d36892b1922046c525
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-09-14 (Sat, 14 Sep 2019)

  Changed paths:
    M mlir/include/mlir/Pass/Pass.h
    M mlir/include/mlir/Pass/PassManager.h
    M mlir/lib/Pass/Pass.cpp

  Log Message:
  -----------
  NFC: Merge OpPass with OperationPass into just OperationPass.

OperationPass' are defined exactly the same way as they are now:
   class DerivedPass :  public OperationPass<DerivedPass>;

OpPass' are now defined as OperationPass, but with an additional template parameter for the operation type:
   class DerivedPass :  public OperationPass<DerivedPass, FuncOp>;

PiperOrigin-RevId: 269122410


  Commit: bbe65b46f567021f2b77925ec2a1112b5fd1e1e1
      https://github.com/llvm/llvm-project/commit/bbe65b46f567021f2b77925ec2a1112b5fd1e1e1
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-09-14 (Sat, 14 Sep 2019)

  Changed paths:
    M mlir/g3doc/WritingAPass.md
    M mlir/include/mlir/Pass/PassInstrumentation.h
    M mlir/include/mlir/Pass/PassManager.h
    M mlir/lib/Pass/IRPrinting.cpp
    M mlir/lib/Pass/Pass.cpp
    M mlir/lib/Pass/PassTiming.cpp

  Log Message:
  -----------
  NFC: Pass PassInstrumentations by unique_ptr instead of raw pointer.

This makes the ownership model explicit, and removes potential user errors.

PiperOrigin-RevId: 269122834


  Commit: d37777c440af424b5d5129c0f54326d89c7b6da6
      https://github.com/llvm/llvm-project/commit/d37777c440af424b5d5129c0f54326d89c7b6da6
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-09-14 (Sat, 14 Sep 2019)

  Changed paths:
    M mlir/g3doc/WritingAPass.md
    M mlir/lib/Pass/IRPrinting.cpp
    M mlir/lib/Pass/PassManagerOptions.cpp
    M mlir/test/Pass/ir-printing.mlir

  Log Message:
  -----------
  Update the IRPrinter instrumentation to work on non function/module operations.

This is necessary now that the pass manager may work on different types of operations.

PiperOrigin-RevId: 269139669


  Commit: bbc6d48d1c63827d8fc4557f4784a6225a6efc5c
      https://github.com/llvm/llvm-project/commit/bbc6d48d1c63827d8fc4557f4784a6225a6efc5c
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-09-14 (Sat, 14 Sep 2019)

  Changed paths:
    M mlir/g3doc/WritingAPass.md

  Log Message:
  -----------
  NFC: Update the expected outputs of pass-timing.

The output of the pass timing instrumentation has been changed now that the pass hierarchy has been generalized.

PiperOrigin-RevId: 269140277


  Commit: f22011ccbad1a8a55260069d195a17d5ae275b41
      https://github.com/llvm/llvm-project/commit/f22011ccbad1a8a55260069d195a17d5ae275b41
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-09-14 (Sat, 14 Sep 2019)

  Changed paths:
    M mlir/g3doc/WritingAPass.md

  Log Message:
  -----------
  NFC: Update the PassInstrumentation section.

This section has grown stale as the pass infrastructure has been generalized.

PiperOrigin-RevId: 269140863


  Commit: 16eac9656082e3414cc29499ef55a3a6ed54b5cb
      https://github.com/llvm/llvm-project/commit/16eac9656082e3414cc29499ef55a3a6ed54b5cb
  Author: Uday Bondhugula <udayb at iisc.ac.in>
  Date:   2019-09-15 (Sun, 15 Sep 2019)

  Changed paths:
    M mlir/test/AffineOps/ops.mlir

  Log Message:
  -----------
  Fix typo in test/AffineOps/ops.mlir

Closes tensorflow/mlir#135

COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/135 from bondhugula:patch-1 539a7f1b43d09ef539b2fd15875f8ac765600263
PiperOrigin-RevId: 269187507


  Commit: faaa1ced1002acef661cfd352c32c1cb86c22726
      https://github.com/llvm/llvm-project/commit/faaa1ced1002acef661cfd352c32c1cb86c22726
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-09-15 (Sun, 15 Sep 2019)

  Changed paths:
    M mlir/g3doc/WritingAPass.md

  Log Message:
  -----------
  Update the pass registration section and add a sub-section on the textual pipeline specification.

Now that the pass manager is generalized, and nested/arbritrary pipelines are possible, it is important to document how to specify these types of pipelines from the command line.

PiperOrigin-RevId: 269207681


  Commit: 9814b3fa0ddc497f215813ca261dc97214e53295
      https://github.com/llvm/llvm-project/commit/9814b3fa0ddc497f215813ca261dc97214e53295
  Author: Mahesh Ravishankar <ravishankarm at google.com>
  Date:   2019-09-15 (Sun, 15 Sep 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/SPIRV/CMakeLists.txt
    M mlir/include/mlir/Dialect/SPIRV/SPIRVBase.td
    A mlir/include/mlir/Dialect/SPIRV/SPIRVGLSLOps.h
    A mlir/include/mlir/Dialect/SPIRV/SPIRVGLSLOps.td
    M mlir/include/mlir/IR/OpBase.td
    M mlir/lib/Conversion/StandardToSPIRV/StandardToSPIRV.td
    M mlir/lib/Dialect/SPIRV/CMakeLists.txt
    M mlir/lib/Dialect/SPIRV/SPIRVDialect.cpp
    A mlir/lib/Dialect/SPIRV/SPIRVGLSLOps.cpp
    A mlir/test/Dialect/SPIRV/glslops.mlir

  Log Message:
  -----------
  Add mechanism to specify extended instruction sets in SPIR-V.

Add support for specifying extended instructions sets. The operations
in SPIR-V dialect are named as 'spv.<extension-name>.<op-name>'. Use
this mechanism to define a 'Exp' operation from GLSL(450)
instructions.
Later CLs will add support for (de)serialization of these operations,
and update the dialect generation scripts to auto-generate the
specification using the spec directly.

Additional changes:
Add a Type Constraint to OpBase.td to check for vector of specified
lengths. This is used to check that the vector type used in SPIR-V
dialect are of lengths 2, 3 or 4.
Update SPIRVBase.td to use this Type constraints for vectors.

PiperOrigin-RevId: 269234377


  Commit: 6755dfdec9e4af64109d5767ad374d1d5fd2c95d
      https://github.com/llvm/llvm-project/commit/6755dfdec9e4af64109d5767ad374d1d5fd2c95d
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2019-09-16 (Mon, 16 Sep 2019)

  Changed paths:
    M mlir/examples/Linalg/Linalg1/lib/ConvertToLLVMDialect.cpp
    M mlir/examples/Linalg/Linalg3/lib/ConvertToLLVMDialect.cpp
    M mlir/lib/Conversion/VectorToLLVM/VectorToLLVM.cpp
    M mlir/lib/Dialect/Linalg/Transforms/LowerToLLVMDialect.cpp

  Log Message:
  -----------
  Drop makePositionAttr and the like in favor of Builder::getI64ArrayAttr

The helper functions makePositionAttr() and positionAttr() were originally
introduced in the lowering-to-LLVM-dialect pass to construct integer array
attributes that are used for static positions in extract/insertelement.
Constructing an integer array attribute being fairly common, a utility function
Builder::getI64ArrayAttr was later introduced into the Builder API.  Drop
makePositionAttr and similar homegrown functions and use that API instead.
PiperOrigin-RevId: 269295836


  Commit: 1da0290c4b7c24d222d4f9d323f719c6707cb840
      https://github.com/llvm/llvm-project/commit/1da0290c4b7c24d222d4f9d323f719c6707cb840
  Author: MLIR Team <no-reply at google.com>
  Date:   2019-09-16 (Mon, 16 Sep 2019)

  Changed paths:
    M mlir/lib/Conversion/GPUToCUDA/ConvertLaunchFuncToCudaCalls.cpp

  Log Message:
  -----------
  Error out when kernel function is not found while translating GPU calls.

PiperOrigin-RevId: 269327909


  Commit: 0ce64b0bf36198446721f2c9aaa3fee0b0abd98c
      https://github.com/llvm/llvm-project/commit/0ce64b0bf36198446721f2c9aaa3fee0b0abd98c
  Author: MLIR Team <no-reply at google.com>
  Date:   2019-09-16 (Mon, 16 Sep 2019)

  Changed paths:
    M mlir/lib/Dialect/GPU/IR/GPUDialect.cpp

  Log Message:
  -----------
  Unify how errors are emitted in LaunchFuncOp verification.

PiperOrigin-RevId: 269331869


  Commit: e94db619d9727ba18732158996204e782be47d5d
      https://github.com/llvm/llvm-project/commit/e94db619d9727ba18732158996204e782be47d5d
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2019-09-16 (Mon, 16 Sep 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/SDBM/SDBMExpr.h
    M mlir/unittests/SDBM/SDBMTest.cpp

  Log Message:
  -----------
  Introduce SDBMDirect expression into the SDBM expression hierarchy

Direct expressions are those that do not negate any of the variables they
involve.  They include input expressions (dimensions and symbols), stripe and
sum expressions, and combinations of those.  Reifying direct expressions as a
class is a precondition for enabling additions on the LHS of a stripe
expression.

PiperOrigin-RevId: 269336031


  Commit: cb3ecb5291ad71c74cd9db7903fffc0ad4019ff1
      https://github.com/llvm/llvm-project/commit/cb3ecb5291ad71c74cd9db7903fffc0ad4019ff1
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2019-09-16 (Mon, 16 Sep 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/SDBM/SDBMExpr.h
    M mlir/lib/Dialect/SDBM/SDBMExpr.cpp
    M mlir/lib/Dialect/SDBM/SDBMExprDetail.h
    M mlir/test/SDBM/sdbm-api-test.cpp
    M mlir/unittests/SDBM/SDBMTest.cpp

  Log Message:
  -----------
  Overhaul the SDBM expression kind hierarchy

Swap the allowed nesting of sum and diff expressions: now a diff expression can
contain a sum expression, but only on the left hand side.  A difference of two
expressions sum must be canonicalized by grouping their constant terms in a
single expression.  This change of sturcture became possible thanks to the
introduction of the "direct" super-kind.  It is necessary to enable support of
sum expressions on the left hand side of the stripe expression.

SDBM expressions are now grouped into the following structure
- expression
  - varying
    - direct
      - sum <- (term, constant)
      - term
        - symbol
        - dimension
        - stripe <- (term, constant)
    - negation <- (direct)
    - difference <- (direct, term)
  - constant
The notation <- (...) denotes the types of subexpressions a compound
expression can combine.

PiperOrigin-RevId: 269337222


  Commit: 6934a337f099f4ccb22625e1bf440b3356f8c09f
      https://github.com/llvm/llvm-project/commit/6934a337f099f4ccb22625e1bf440b3356f8c09f
  Author: Lei Zhang <antiagainst at google.com>
  Date:   2019-09-16 (Mon, 16 Sep 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/SPIRV/CMakeLists.txt
    M mlir/include/mlir/Dialect/SPIRV/SPIRVBase.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVTypes.h
    M mlir/include/mlir/IR/OpBase.td
    M mlir/include/mlir/TableGen/Attribute.h
    M mlir/lib/Dialect/SPIRV/CMakeLists.txt
    M mlir/lib/Dialect/SPIRV/SPIRVOps.cpp
    M mlir/lib/Dialect/SPIRV/SPIRVTypes.cpp
    M mlir/lib/TableGen/Attribute.cpp
    M mlir/test/Dialect/SPIRV/ops.mlir
    M mlir/tools/mlir-tblgen/EnumsGen.cpp
    A mlir/tools/mlir-tblgen/EnumsGen.h
    M mlir/tools/mlir-tblgen/SPIRVUtilsGen.cpp
    M mlir/utils/spirv/gen_spirv_dialect.py

  Log Message:
  -----------
  [spirv] Add support for BitEnumAttr

Certain enum classes in SPIR-V, like function/loop control and memory
access, are bitmasks. This CL introduces a BitEnumAttr to properly
model this and drive auto-generation of verification code and utility
functions. We still store the attribute using an 32-bit IntegerAttr
for minimal memory footprint and easy (de)serialization. But utility
conversion functions are adjusted to inspect each bit and generate
"|"-concatenated strings for the bits; vice versa.

Each such enum class has a "None" case that means no bit is set. We
need special handling for "None". Because of this, the logic is not
general anymore. So right now the definition is placed in the SPIR-V
dialect. If later this turns out to be useful for other dialects,
then we can see how to properly adjust it and move to OpBase.td.

Added tests for SPV_MemoryAccess to check and demonstrate.

PiperOrigin-RevId: 269350620


  Commit: 9619ba10d47a11b968efe835afb040be1c8c63cc
      https://github.com/llvm/llvm-project/commit/9619ba10d47a11b968efe835afb040be1c8c63cc
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-09-16 (Mon, 16 Sep 2019)

  Changed paths:
    M mlir/lib/Transforms/DialectConversion.cpp
    M mlir/test/Transforms/test-legalizer-analysis.mlir
    A mlir/test/Transforms/test-legalizer-full.mlir
    M mlir/test/lib/TestDialect/TestOps.td
    M mlir/test/lib/TestDialect/TestPatterns.cpp

  Log Message:
  -----------
  Add support for multi-level value mapping to DialectConversion.

When performing A->B->C conversion, an operation may still refer to an operand of A. This makes it necessary to unmap through multiple levels of replacement for a specific value.

PiperOrigin-RevId: 269367859


  Commit: 8a34d5d18cdd509f06945b512ea889133c7b3a0e
      https://github.com/llvm/llvm-project/commit/8a34d5d18cdd509f06945b512ea889133c7b3a0e
  Author: Denis Khalikov <khalikov.denis at huawei.com>
  Date:   2019-09-16 (Mon, 16 Sep 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/SPIRV/SPIRVBase.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVControlFlowOps.td
    M mlir/lib/Dialect/SPIRV/SPIRVOps.cpp
    M mlir/lib/Dialect/SPIRV/Serialization/Deserializer.cpp
    M mlir/lib/Dialect/SPIRV/Serialization/Serializer.cpp
    A mlir/test/Dialect/SPIRV/Serialization/function_call.mlir
    M mlir/test/Dialect/SPIRV/control-flow-ops.mlir

  Log Message:
  -----------
  [spirv] Add support for function calls.

Add spv.FunctionCall operation and (de)serialization.

Closes tensorflow/mlir#137

COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/137 from denis0x0D:sandbox/function_call_op e2e6f07d21e7f23e8b44c7df8a8ab784f3356ce4
PiperOrigin-RevId: 269437167


  Commit: 2d86ad79f0021eb5612f1b37d5a3de5160e919fb
      https://github.com/llvm/llvm-project/commit/2d86ad79f0021eb5612f1b37d5a3de5160e919fb
  Author: Mahesh Ravishankar <ravishankarm at google.com>
  Date:   2019-09-16 (Mon, 16 Sep 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/SPIRV/CMakeLists.txt
    M mlir/include/mlir/Dialect/SPIRV/SPIRVBase.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVControlFlowOps.td
    R mlir/include/mlir/Dialect/SPIRV/SPIRVGLSLOps.h
    M mlir/include/mlir/Dialect/SPIRV/SPIRVGLSLOps.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVOps.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVStructureOps.td
    M mlir/lib/Dialect/SPIRV/CMakeLists.txt
    M mlir/lib/Dialect/SPIRV/SPIRVDialect.cpp
    R mlir/lib/Dialect/SPIRV/SPIRVGLSLOps.cpp
    M mlir/lib/Dialect/SPIRV/SPIRVOps.cpp
    M mlir/lib/Dialect/SPIRV/Serialization/Deserializer.cpp
    M mlir/lib/Dialect/SPIRV/Serialization/Serializer.cpp
    A mlir/test/Dialect/SPIRV/Serialization/glslops.mlir
    M mlir/test/Dialect/SPIRV/glslops.mlir
    M mlir/tools/mlir-tblgen/SPIRVUtilsGen.cpp

  Log Message:
  -----------
  Autogenerate (de)serialization for Extended Instruction Sets

A generic mechanism for (de)serialization of extended instruction sets
is added with this CL. To facilitate this, a new class
"SPV_ExtendedInstSetOp" is added which is a base class for all
operations corresponding to extended instruction sets. The methods to
(de)serialization such ops as well as its dispatch is generated
automatically.

The behavior controlled by autogenSerialization and hasOpcode is also
slightly modified to enable this. They are now decoupled.
1) Setting hasOpcode=1 means the operation has a corresponding
   opcode in SPIR-V binary format, and its dispatch for
   (de)serialization is automatically generated.
2) Setting autogenSerialization=1 generates the function for
   (de)serialization automatically.
So now it is possible to have hasOpcode=0 and autogenSerialization=1
(for example SPV_ExtendedInstSetOp).

Since the dispatch functions is also auto-generated, the input file
needs to contain all operations. To this effect, SPIRVGLSLOps.td is
included into SPIRVOps.td. This makes the previously added
SPIRVGLSLOps.h and SPIRVGLSLOps.cpp unnecessary, and are deleted.

The SPIRVUtilsGen.cpp is also changed to make better use of
formatv,making the code more readable.

PiperOrigin-RevId: 269456263


  Commit: 62e1faa6f6bd9f49b1bb68ba01e543850ebff5d0
      https://github.com/llvm/llvm-project/commit/62e1faa6f6bd9f49b1bb68ba01e543850ebff5d0
  Author: Mehdi Amini <aminim at google.com>
  Date:   2019-09-17 (Tue, 17 Sep 2019)

  Changed paths:
    M mlir/lib/Analysis/CMakeLists.txt

  Log Message:
  -----------
  Add missing CMake dependency from libAnalysis to the Vector dialect

Fixes tensorflow/mlir#138

PiperOrigin-RevId: 269509668


  Commit: bd7de6d4dfb82df21f36c1c331cba87a4d0118f7
      https://github.com/llvm/llvm-project/commit/bd7de6d4dfb82df21f36c1c331cba87a4d0118f7
  Author: Uday Bondhugula <udayb at iisc.ac.in>
  Date:   2019-09-17 (Tue, 17 Sep 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/AffineOps/AffineOps.h
    M mlir/lib/Analysis/LoopAnalysis.cpp
    M mlir/lib/Analysis/Utils.cpp
    M mlir/lib/Dialect/AffineOps/AffineOps.cpp
    M mlir/lib/Transforms/LowerAffine.cpp
    M mlir/lib/Transforms/Vectorize.cpp
    M mlir/test/AffineOps/canonicalize.mlir
    M mlir/test/Transforms/canonicalize.mlir

  Log Message:
  -----------
  Add rewrite pattern to compose maps into affine load/stores

- add canonicalization pattern to compose maps into affine loads/stores;
  templatize the pattern and reuse it for affine.apply as well

- rename getIndices -> getMapOperands() (getIndices is confusing since
  these are no longer the indices themselves but operands to the map
  whose results are the indices). This also makes the accessor uniform
  across affine.apply/load/store. Change arg names on the affine
  load/store builder to avoid confusion. Drop an unused confusing build
  method on AffineStoreOp.

- update incomplete doc comment for canonicalizeMapAndOperands (this was
  missed from a previous update).

Addresses issue tensorflow/mlir#121

Signed-off-by: Uday Bondhugula <uday at polymagelabs.com>

Closes tensorflow/mlir#122

COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/122 from bondhugula:compose-load-store e71de1771e56a85c4282c10cb43f30cef0701c4f
PiperOrigin-RevId: 269619540


  Commit: b00a522b801015f0c3d3ac7c3db1eddafca603cb
      https://github.com/llvm/llvm-project/commit/b00a522b801015f0c3d3ac7c3db1eddafca603cb
  Author: Lei Zhang <antiagainst at google.com>
  Date:   2019-09-17 (Tue, 17 Sep 2019)

  Changed paths:
    M mlir/include/mlir/Support/TranslateClParser.h
    M mlir/include/mlir/Translation.h
    M mlir/lib/Dialect/SPIRV/Serialization/ConvertFromBinary.cpp
    M mlir/lib/Dialect/SPIRV/Serialization/ConvertToBinary.cpp
    M mlir/lib/Support/TranslateClParser.cpp
    M mlir/lib/Target/LLVMIR/ConvertToLLVMIR.cpp
    M mlir/lib/Target/LLVMIR/ConvertToNVVMIR.cpp
    M mlir/tools/mlir-translate/mlir-translate.cpp

  Log Message:
  -----------
  Change MLIR translation functions signature

This CL changes translation functions to take MemoryBuffer
as input and raw_ostream as output. It is generally better to
avoid handling files directly in a library (unless the library
is specifically for file manipulation) and we can unify all
file handling to the mlir-translate binary itself.

PiperOrigin-RevId: 269625911


  Commit: b991e8b1e40cca25a6ed1b52ffe4a71a39cb72fb
      https://github.com/llvm/llvm-project/commit/b991e8b1e40cca25a6ed1b52ffe4a71a39cb72fb
  Author: Lei Zhang <antiagainst at google.com>
  Date:   2019-09-17 (Tue, 17 Sep 2019)

  Changed paths:
    M mlir/include/mlir/Translation.h
    M mlir/lib/Support/TranslateClParser.cpp
    M mlir/lib/Translation/Translation.cpp

  Log Message:
  -----------
  Support file-to-file translation in mlir-translate

Existing translations are either from MLIR or to MLIR. To support
cases like round-tripping some external format via MLIR, one must
chain two mlir-translate invocations together using pipes. This
can be problematic to support -split-input-file in mlir-translate
given that it won't work across pipes.

Motivated by the above, this CL adds another translation category
that allows file to file. This gives users more freedom.

PiperOrigin-RevId: 269636438


  Commit: 3e2ac62b7d54e37a8b55dfc2e9654a0eef2c6fd6
      https://github.com/llvm/llvm-project/commit/3e2ac62b7d54e37a8b55dfc2e9654a0eef2c6fd6
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-09-17 (Tue, 17 Sep 2019)

  Changed paths:
    M mlir/utils/generate-test-checks.py

  Log Message:
  -----------
  Add a preprocess pass to remove sequences that are problematic with FileCheck

Add a preprocess phase to rewrite parts of the input line that may be problematic with filecheck. This change adds preprocessing to escape '[[' bracket sequences, as these are used by FileCheck for variables.

PiperOrigin-RevId: 269648490


  Commit: af45ca844fb4dcfbd9f84586a1f55c1352d25242
      https://github.com/llvm/llvm-project/commit/af45ca844fb4dcfbd9f84586a1f55c1352d25242
  Author: Lei Zhang <antiagainst at google.com>
  Date:   2019-09-17 (Tue, 17 Sep 2019)

  Changed paths:
    M mlir/lib/Dialect/SPIRV/Serialization/CMakeLists.txt
    R mlir/lib/Dialect/SPIRV/Serialization/ConvertFromBinary.cpp
    R mlir/lib/Dialect/SPIRV/Serialization/ConvertToBinary.cpp
    A mlir/lib/Dialect/SPIRV/Serialization/TranslateRegistration.cpp
    M mlir/test/Dialect/SPIRV/Serialization/access_chain.mlir
    M mlir/test/Dialect/SPIRV/Serialization/array_stride.mlir
    M mlir/test/Dialect/SPIRV/Serialization/bin_ops.mlir
    M mlir/test/Dialect/SPIRV/Serialization/capability.mlir
    M mlir/test/Dialect/SPIRV/Serialization/constant.mlir
    M mlir/test/Dialect/SPIRV/Serialization/entry.mlir
    M mlir/test/Dialect/SPIRV/Serialization/entry_interface.mlir
    M mlir/test/Dialect/SPIRV/Serialization/execution_mode.mlir
    M mlir/test/Dialect/SPIRV/Serialization/extension.mlir
    M mlir/test/Dialect/SPIRV/Serialization/function_call.mlir
    M mlir/test/Dialect/SPIRV/Serialization/glslops.mlir
    M mlir/test/Dialect/SPIRV/Serialization/load_store.mlir
    M mlir/test/Dialect/SPIRV/Serialization/loop.mlir
    M mlir/test/Dialect/SPIRV/Serialization/minimal-module.mlir
    M mlir/test/Dialect/SPIRV/Serialization/select.mlir
    M mlir/test/Dialect/SPIRV/Serialization/spec_constant.mlir
    M mlir/test/Dialect/SPIRV/Serialization/struct.mlir
    M mlir/test/Dialect/SPIRV/Serialization/terminator.mlir
    M mlir/test/Dialect/SPIRV/Serialization/variable_reference.mlir
    M mlir/test/Dialect/SPIRV/Serialization/variables.mlir
    M mlir/test/Dialect/SPIRV/Serialization/variables_init.mlir

  Log Message:
  -----------
  Register a -test-spirv-roundtrip hook to mlir-translate

This CL registers a new mlir-translate hook, -test-spirv-roundtrip,
for testing SPIR-V serialization and deserialization round-trip.

This CL also moves the existing -serialize-spirv and
-deserialize-spirv hooks to one source file.

PiperOrigin-RevId: 269659528


  Commit: 9330c1b9a1d70711294be25db98289929385f6fe
      https://github.com/llvm/llvm-project/commit/9330c1b9a1d70711294be25db98289929385f6fe
  Author: Mahesh Ravishankar <ravishankarm at google.com>
  Date:   2019-09-17 (Tue, 17 Sep 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/SPIRV/SPIRVBase.td
    M mlir/lib/Dialect/SPIRV/Serialization/Deserializer.cpp
    M mlir/lib/Dialect/SPIRV/Serialization/Serializer.cpp
    A mlir/test/Dialect/SPIRV/Serialization/rtarray.mlir

  Log Message:
  -----------
  Add (de)serialization support for OpRuntimeArray.

Update the SPIR-V (de)serialization to handle RuntimeArrayType.

PiperOrigin-RevId: 269667196


  Commit: b58d9aee11000c2ccfd4905750b15fa7e2681323
      https://github.com/llvm/llvm-project/commit/b58d9aee11000c2ccfd4905750b15fa7e2681323
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-09-17 (Tue, 17 Sep 2019)

  Changed paths:
    M mlir/include/mlir/IR/OpImplementation.h
    M mlir/lib/Dialect/GPU/IR/GPUDialect.cpp
    M mlir/lib/Dialect/SPIRV/SPIRVOps.cpp
    M mlir/lib/Parser/Parser.cpp
    M mlir/test/IR/parser.mlir
    M mlir/test/lib/TestDialect/TestDialect.cpp
    M mlir/test/lib/TestDialect/TestOps.td

  Log Message:
  -----------
  Add support to OpAsmParser for parsing unknown keywords.

This is useful in several cases, for example a user may want to sugar the syntax of a string(as we do with custom operation syntax), or avoid many nested ifs for  parsing a set of known keywords.

PiperOrigin-RevId: 269695451


  Commit: a15e0ce1ba5fa049052b92583abb196f49f1e70c
      https://github.com/llvm/llvm-project/commit/a15e0ce1ba5fa049052b92583abb196f49f1e70c
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2019-09-18 (Wed, 18 Sep 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/SDBM/SDBMExpr.h
    M mlir/lib/Dialect/SDBM/SDBMExpr.cpp
    M mlir/unittests/SDBM/SDBMTest.cpp

  Log Message:
  -----------
  Simplify SDBM expressions more aggressively in operators and conversions

Extend SDBM simplification patterns to support more cases where the addition of
two expressions each involving one or two variables would result in a sum
expression that only contains one variable and thus remains in the SDBM domain.
This is made possible by the new canonical structure of SDBM where the constant
term appears once.  This simplification will be necessary to support
round-tripping of stripe expressions containing constant terms on the LHS
through affine expressions.

PiperOrigin-RevId: 269757732


  Commit: 5709aeb9930776bfaee81bb51d9b2c0b0142c395
      https://github.com/llvm/llvm-project/commit/5709aeb9930776bfaee81bb51d9b2c0b0142c395
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2019-09-18 (Wed, 18 Sep 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/SDBM/SDBMExpr.h
    M mlir/lib/Dialect/SDBM/SDBM.cpp
    M mlir/lib/Dialect/SDBM/SDBMExpr.cpp
    M mlir/unittests/SDBM/SDBMTest.cpp

  Log Message:
  -----------
  SDBM: support sum expressions on the LHS of stripe expressions

Introduce support for applying the stripe operator to sum expressions, as in
  (x + A) # B = x + A - (x + A) mod B.
This is required to represent a combination of tiling and padding in the SDBM
framework, and is a valid SDBM construct that was not originally supported.

PiperOrigin-RevId: 269758807


  Commit: 1c73be76d84a04499b7e9ac5dfe129c204880dd8
      https://github.com/llvm/llvm-project/commit/1c73be76d84a04499b7e9ac5dfe129c204880dd8
  Author: MLIR Team <no-reply at google.com>
  Date:   2019-09-18 (Wed, 18 Sep 2019)

  Changed paths:
    M mlir/examples/toy/Ch2/mlir/MLIRGen.cpp
    M mlir/examples/toy/Ch3/mlir/MLIRGen.cpp
    M mlir/examples/toy/Ch3/mlir/ToyDialect.cpp
    M mlir/examples/toy/Ch4/mlir/MLIRGen.cpp
    M mlir/examples/toy/Ch4/mlir/ShapeInferencePass.cpp
    M mlir/examples/toy/Ch4/mlir/ToyDialect.cpp
    M mlir/examples/toy/Ch5/mlir/LateLowering.cpp
    M mlir/examples/toy/Ch5/mlir/MLIRGen.cpp
    M mlir/examples/toy/Ch5/mlir/ShapeInferencePass.cpp
    M mlir/examples/toy/Ch5/mlir/ToyDialect.cpp
    M mlir/lib/Analysis/SliceAnalysis.cpp
    M mlir/lib/Analysis/Utils.cpp
    M mlir/lib/Conversion/GPUToCUDA/ConvertKernelFuncToCubin.cpp
    M mlir/lib/Conversion/GPUToCUDA/ConvertLaunchFuncToCudaCalls.cpp
    M mlir/lib/Transforms/MaterializeVectors.cpp
    M mlir/lib/Transforms/Utils/LoopUtils.cpp

  Log Message:
  -----------
  Unify error messages to start with lower-case.

PiperOrigin-RevId: 269803466


  Commit: 727a50ae2db4492a8c3168647996abacd75d0622
      https://github.com/llvm/llvm-project/commit/727a50ae2db4492a8c3168647996abacd75d0622
  Author: Uday Bondhugula <udayb at iisc.ac.in>
  Date:   2019-09-18 (Wed, 18 Sep 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/StandardOps/Ops.td
    M mlir/include/mlir/Transforms/Utils.h
    M mlir/lib/Transforms/LoopFusion.cpp
    M mlir/lib/Transforms/PipelineDataTransfer.cpp
    M mlir/lib/Transforms/Utils/LoopUtils.cpp
    M mlir/lib/Transforms/Utils/Utils.cpp
    M mlir/test/Transforms/memref-normalize.mlir

  Log Message:
  -----------
  Support symbolic operands for memref replacement; fix memrefNormalize

- allow symbols in index remapping provided for memref replacement
- fix memref normalize crash on cases with layout maps with symbols

Signed-off-by: Uday Bondhugula <uday at polymagelabs.com>
Reported by: Alex Zinenko

Closes tensorflow/mlir#139

COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/139 from bondhugula:memref-rep-symbols 2f48c1fdb5d4c58915bbddbd9f07b18541819233
PiperOrigin-RevId: 269851182


  Commit: 35df51086aefa1420784a096fd406febadae315a
      https://github.com/llvm/llvm-project/commit/35df51086aefa1420784a096fd406febadae315a
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-09-18 (Wed, 18 Sep 2019)

  Changed paths:
    M mlir/include/mlir/IR/Operation.h
    M mlir/lib/Analysis/Dominance.cpp
    M mlir/lib/IR/Operation.cpp
    M mlir/test/IR/invalid.mlir

  Log Message:
  -----------
  Fix nested dominance relationship between parent results and child operations.

This modifies DominanceInfo::properlyDominates(Value *value, Operation *op) to return false if the value is defined by a parent operation of 'op'. This prevents using values defined by the parent operation from within any child regions.

PiperOrigin-RevId: 269934920


  Commit: 25f0f769aa7de1338158becbe614856802d43e1a
      https://github.com/llvm/llvm-project/commit/25f0f769aa7de1338158becbe614856802d43e1a
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-09-18 (Wed, 18 Sep 2019)

  Changed paths:
    M mlir/lib/IR/Block.cpp

  Log Message:
  -----------
  NFC: Remove stray logging from ~Block().
PiperOrigin-RevId: 269941815


  Commit: 5684a12434f923d03b6870f2aa16226bfb0b38b6
      https://github.com/llvm/llvm-project/commit/5684a12434f923d03b6870f2aa16226bfb0b38b6
  Author: MLIR Team <no-reply at google.com>
  Date:   2019-09-19 (Thu, 19 Sep 2019)

  Changed paths:
    M mlir/include/mlir/Conversion/GPUToNVVM/GPUToNVVMPass.h
    M mlir/include/mlir/Dialect/GPU/GPUDialect.h
    M mlir/lib/Conversion/GPUToCUDA/ConvertKernelFuncToCubin.cpp
    M mlir/lib/Conversion/GPUToCUDA/GenerateCubinAccessors.cpp
    M mlir/lib/Conversion/GPUToNVVM/LowerGpuOpsToNVVMOps.cpp
    M mlir/lib/Dialect/GPU/Transforms/KernelOutlining.cpp
    M mlir/test/Conversion/GPUToCUDA/insert-cubin-getter.mlir
    M mlir/test/Conversion/GPUToCUDA/lower-nvvm-kernel-to-cubin.mlir
    M mlir/test/Conversion/GPUToNVVM/gpu-to-nvvm.mlir
    M mlir/test/Dialect/GPU/outlining.mlir
    M mlir/tools/mlir-cuda-runner/mlir-cuda-runner.cpp

  Log Message:
  -----------
  Outline GPU kernel function into a nested module.

When outlining GPU kernels, put the kernel function inside a nested module. Then use a nested pipeline to generate the cubins, independently per kernel. In a final pass, move the cubins back to the parent module.

PiperOrigin-RevId: 269987720


  Commit: e79bfefb89201de52b9c8d609b67b416d3982977
      https://github.com/llvm/llvm-project/commit/e79bfefb89201de52b9c8d609b67b416d3982977
  Author: MLIR Team <no-reply at google.com>
  Date:   2019-09-19 (Thu, 19 Sep 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
    M mlir/lib/Target/LLVMIR/ModuleTranslation.cpp
    M mlir/test/Dialect/LLVMIR/global.mlir
    M mlir/test/Target/llvmir.mlir

  Log Message:
  -----------
  Add address space attribute to LLVMIR's GlobalOp.

PiperOrigin-RevId: 270012505


  Commit: 5f86dc5fc9fe909dbcc03043fc5f960be00e1024
      https://github.com/llvm/llvm-project/commit/5f86dc5fc9fe909dbcc03043fc5f960be00e1024
  Author: Prakalp Srivastava <prakalps at google.com>
  Date:   2019-09-19 (Thu, 19 Sep 2019)

  Changed paths:
    M mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp

  Log Message:
  -----------
  NFC: Fix return indentation in generated op definitions.
PiperOrigin-RevId: 270070670


  Commit: c8961d408ee0f48e3156e3c4248bba9a43579f1f
      https://github.com/llvm/llvm-project/commit/c8961d408ee0f48e3156e3c4248bba9a43579f1f
  Author: Feng Liu <fengliuai at google.com>
  Date:   2019-09-19 (Thu, 19 Sep 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/QuantOps/UniformSupport.h
    M mlir/lib/Dialect/QuantOps/Utils/QuantizeUtils.cpp
    M mlir/lib/Dialect/QuantOps/Utils/UniformSupport.cpp
    M mlir/test/Dialect/QuantOps/convert-const.mlir

  Log Message:
  -----------
  Quantize attribute values by per axis quantization parameters

A new converter with per axis quantization parameters is added to quantize a
dense elements attribute. For each slice along the quantization axis, it
creates an uniform quantized value converter, with different scale and zero
point, and quantizes the values in the slice.

The current implementation doesn't handle sparse elements attributes.

PiperOrigin-RevId: 270121986


  Commit: 2df646bef6e7665fdb8523613d82e7d4a5013217
      https://github.com/llvm/llvm-project/commit/2df646bef6e7665fdb8523613d82e7d4a5013217
  Author: George Karpenkov <cheshire at google.com>
  Date:   2019-09-19 (Thu, 19 Sep 2019)

  Changed paths:
    M mlir/include/mlir/Conversion/GPUToNVVM/GPUToNVVMPass.h
    M mlir/include/mlir/Dialect/GPU/GPUDialect.h
    M mlir/lib/Conversion/GPUToCUDA/ConvertKernelFuncToCubin.cpp
    M mlir/lib/Conversion/GPUToCUDA/GenerateCubinAccessors.cpp
    M mlir/lib/Conversion/GPUToNVVM/LowerGpuOpsToNVVMOps.cpp
    M mlir/lib/Dialect/GPU/Transforms/KernelOutlining.cpp
    M mlir/test/Conversion/GPUToCUDA/insert-cubin-getter.mlir
    M mlir/test/Conversion/GPUToCUDA/lower-nvvm-kernel-to-cubin.mlir
    M mlir/test/Conversion/GPUToNVVM/gpu-to-nvvm.mlir
    M mlir/test/Dialect/GPU/outlining.mlir
    M mlir/tools/mlir-cuda-runner/mlir-cuda-runner.cpp

  Log Message:
  -----------
  Automated rollback of commit 5684a12434f923d03b6870f2aa16226bfb0b38b6

PiperOrigin-RevId: 270126672


  Commit: 9a4f5d2ee324f536cede769c10022d1ce7b875f1
      https://github.com/llvm/llvm-project/commit/9a4f5d2ee324f536cede769c10022d1ce7b875f1
  Author: Mahesh Ravishankar <ravishankarm at google.com>
  Date:   2019-09-19 (Thu, 19 Sep 2019)

  Changed paths:
    M mlir/g3doc/Dialects/SPIR-V.md
    M mlir/include/mlir/Dialect/SPIRV/SPIRVTypes.h
    M mlir/lib/Dialect/SPIRV/SPIRVDialect.cpp
    M mlir/lib/Dialect/SPIRV/SPIRVTypes.cpp
    M mlir/lib/Dialect/SPIRV/Serialization/Deserializer.cpp
    M mlir/lib/Dialect/SPIRV/Serialization/Serializer.cpp
    M mlir/test/Dialect/SPIRV/Serialization/struct.mlir
    M mlir/test/Dialect/SPIRV/types.mlir

  Log Message:
  -----------
  Allow specification of decorators on SPIR-V StructType members.

Allow specification of decorators on SPIR-V StructType members. If the
struct has layout information, these decorations are to be specified
after the offset specification of the member. These decorations are
emitted as OpMemberDecorate instructions on the struct <id>. Update
(de)serialization to handle these decorations.

PiperOrigin-RevId: 270130136


  Commit: 5002e98b92bbf300b41b7a7af6492d7c1bd662f4
      https://github.com/llvm/llvm-project/commit/5002e98b92bbf300b41b7a7af6492d7c1bd662f4
  Author: Jacques Pienaar <jpienaar at google.com>
  Date:   2019-09-19 (Thu, 19 Sep 2019)

  Changed paths:
    M mlir/utils/generate-test-checks.py

  Log Message:
  -----------
  Remove unused import and two import forms

argparse was imported with both 'import' and 'import from' and string import was unused,

PiperOrigin-RevId: 270164488


  Commit: a00b5682776555ed378d67ae2569d12c4e9b112d
      https://github.com/llvm/llvm-project/commit/a00b5682776555ed378d67ae2569d12c4e9b112d
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2019-09-20 (Fri, 20 Sep 2019)

  Changed paths:
    M mlir/include/mlir/IR/StandardTypes.h
    M mlir/lib/IR/StandardTypes.cpp
    A mlir/test/AffineOps/memref-stride-calculation.mlir
    A mlir/test/lib/Transforms/TestMemRefStrideCalculation.cpp

  Log Message:
  -----------
  Add utility to extract strides from layout map in MemRefType.

The RFC for unifying Linalg and Affine compilation passes into an end-to-end flow discusses the notion of a strided MemRef (https://groups.google.com/a/tensorflow.org/forum/#!topic/mlir/MaL8m2nXuio).

This CL adds helper functions to extract strides from the layout map which in turn will allow converting between a strided form of the type and a layout map.

For now strides are only computed on a single affine map with a single result (i.e. the closed subset of linearization maps that are compatible with striding semantics). This restriction will be reevaluated / lifted in the future based on concrete use cases.

PiperOrigin-RevId: 270284686


  Commit: daf3b855100c56552ed44f796e31184c274e33f8
      https://github.com/llvm/llvm-project/commit/daf3b855100c56552ed44f796e31184c274e33f8
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2019-09-20 (Fri, 20 Sep 2019)

  Changed paths:
    M mlir/test/lib/Transforms/CMakeLists.txt

  Log Message:
  -----------
  Fix public build

TestMemRefStrideCalculation.cpp was missing

PiperOrigin-RevId: 270304543


  Commit: d8fda38ceac490ef47a4b8bf1a692030dd2d92e8
      https://github.com/llvm/llvm-project/commit/d8fda38ceac490ef47a4b8bf1a692030dd2d92e8
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2019-09-20 (Fri, 20 Sep 2019)

  Changed paths:
    M mlir/include/mlir/IR/StandardTypes.h
    M mlir/lib/IR/StandardTypes.cpp

  Log Message:
  -----------
  Use SmallVectorImpl in getStrides

No need to force a particular size on the user of the API.

PiperOrigin-RevId: 270310570


  Commit: 2797517ecf89df597a49d670b633cae3de6c4c5a
      https://github.com/llvm/llvm-project/commit/2797517ecf89df597a49d670b633cae3de6c4c5a
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-09-20 (Fri, 20 Sep 2019)

  Changed paths:
    M mlir/examples/Linalg/Linalg1/include/linalg1/RangeOp.h
    M mlir/examples/Linalg/Linalg1/include/linalg1/SliceOp.h
    M mlir/examples/Linalg/Linalg1/include/linalg1/ViewOp.h
    M mlir/examples/Linalg/Linalg1/lib/RangeOp.cpp
    M mlir/examples/Linalg/Linalg1/lib/SliceOp.cpp
    M mlir/examples/Linalg/Linalg1/lib/ViewOp.cpp
    M mlir/examples/Linalg/Linalg2/include/linalg2/TensorOps-inl.h
    M mlir/examples/Linalg/Linalg2/include/linalg2/TensorOps.h
    M mlir/examples/Linalg/Linalg2/lib/TensorOps.cpp
    M mlir/examples/Linalg/Linalg3/include/linalg3/LoadStoreOps.h
    M mlir/examples/Linalg/Linalg3/lib/LoadStoreOps.cpp
    M mlir/include/mlir/Dialect/AffineOps/AffineOps.h
    M mlir/include/mlir/Dialect/AffineOps/AffineOps.td
    M mlir/include/mlir/Dialect/GPU/GPUDialect.h
    M mlir/include/mlir/Dialect/Linalg/IR/LinalgOps.td
    M mlir/include/mlir/Dialect/LoopOps/LoopOps.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVBase.td
    M mlir/include/mlir/Dialect/StandardOps/Ops.h
    M mlir/include/mlir/Dialect/StandardOps/Ops.td
    M mlir/include/mlir/Dialect/VectorOps/VectorOps.h
    M mlir/include/mlir/Dialect/VectorOps/VectorOps.td
    M mlir/include/mlir/IR/Function.h
    M mlir/include/mlir/IR/FunctionSupport.h
    M mlir/include/mlir/IR/Module.h
    M mlir/include/mlir/IR/OpDefinition.h
    M mlir/include/mlir/IR/OperationSupport.h
    M mlir/lib/Dialect/AffineOps/AffineOps.cpp
    M mlir/lib/Dialect/GPU/IR/GPUDialect.cpp
    M mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
    M mlir/lib/Dialect/LLVMIR/IR/NVVMDialect.cpp
    M mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
    M mlir/lib/Dialect/LoopOps/LoopOps.cpp
    M mlir/lib/Dialect/SPIRV/SPIRVOps.cpp
    M mlir/lib/Dialect/StandardOps/Ops.cpp
    M mlir/lib/Dialect/VectorOps/VectorOps.cpp
    M mlir/lib/IR/Function.cpp
    M mlir/lib/IR/FunctionSupport.cpp
    M mlir/lib/IR/Module.cpp
    M mlir/lib/IR/Operation.cpp
    M mlir/lib/Parser/Parser.cpp
    M mlir/test/lib/TestDialect/TestDialect.cpp
    M mlir/test/lib/TestDialect/TestOps.td
    M mlir/test/mlir-tblgen/op-decl.td
    M mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp

  Log Message:
  -----------
  NFC: Pass OpAsmParser by reference instead of by pointer.

MLIR follows the LLVM style of pass-by-reference.

PiperOrigin-RevId: 270315612


  Commit: 91125d33ed9a46495a50338ce206ddf5c461a763
      https://github.com/llvm/llvm-project/commit/91125d33ed9a46495a50338ce206ddf5c461a763
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-09-20 (Fri, 20 Sep 2019)

  Changed paths:
    M mlir/lib/Transforms/DialectConversion.cpp

  Log Message:
  -----------
  Avoid iterator invalidation when recursively computing pattern depth.

computeDepth calls itself recursively, which may insert into minPatternDepth. minPatternDepth is a DenseMap, which invalidates iterators on insertion, so this may lead to asan failures.

PiperOrigin-RevId: 270374203


  Commit: 729727ebc7e9e5b27e73b1ae0fdaa4bb7c312098
      https://github.com/llvm/llvm-project/commit/729727ebc7e9e5b27e73b1ae0fdaa4bb7c312098
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-09-20 (Fri, 20 Sep 2019)

  Changed paths:
    M mlir/examples/Linalg/Linalg1/include/linalg1/RangeOp.h
    M mlir/examples/Linalg/Linalg1/include/linalg1/SliceOp.h
    M mlir/examples/Linalg/Linalg1/include/linalg1/ViewOp.h
    M mlir/examples/Linalg/Linalg1/lib/RangeOp.cpp
    M mlir/examples/Linalg/Linalg1/lib/SliceOp.cpp
    M mlir/examples/Linalg/Linalg1/lib/ViewOp.cpp
    M mlir/examples/Linalg/Linalg2/include/linalg2/TensorOps-inl.h
    M mlir/examples/Linalg/Linalg2/include/linalg2/TensorOps.h
    M mlir/examples/Linalg/Linalg2/lib/TensorOps.cpp
    M mlir/examples/Linalg/Linalg3/include/linalg3/LoadStoreOps.h
    M mlir/examples/Linalg/Linalg3/lib/LoadStoreOps.cpp
    M mlir/examples/toy/Ch3/include/toy/Dialect.h
    M mlir/examples/toy/Ch3/mlir/ToyDialect.cpp
    M mlir/examples/toy/Ch4/include/toy/Dialect.h
    M mlir/examples/toy/Ch4/mlir/ToyDialect.cpp
    M mlir/examples/toy/Ch5/include/toy/Dialect.h
    M mlir/examples/toy/Ch5/mlir/ToyDialect.cpp
    M mlir/g3doc/OpDefinitions.md
    M mlir/g3doc/Tutorials/Linalg/Ch-1.md
    M mlir/g3doc/Tutorials/Toy/Ch-3.md
    M mlir/include/mlir/Dialect/AffineOps/AffineOps.h
    M mlir/include/mlir/Dialect/AffineOps/AffineOps.td
    M mlir/include/mlir/Dialect/GPU/GPUDialect.h
    M mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
    M mlir/include/mlir/Dialect/Linalg/IR/LinalgLibraryOps.td
    M mlir/include/mlir/Dialect/Linalg/IR/LinalgOps.td
    M mlir/include/mlir/Dialect/LoopOps/LoopOps.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVBase.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVControlFlowOps.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVOps.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVStructureOps.td
    M mlir/include/mlir/Dialect/StandardOps/Ops.h
    M mlir/include/mlir/Dialect/StandardOps/Ops.td
    M mlir/include/mlir/Dialect/VectorOps/VectorOps.h
    M mlir/include/mlir/Dialect/VectorOps/VectorOps.td
    M mlir/include/mlir/IR/Builders.h
    M mlir/include/mlir/IR/Function.h
    M mlir/include/mlir/IR/FunctionSupport.h
    M mlir/include/mlir/IR/Module.h
    M mlir/include/mlir/IR/OpBase.td
    M mlir/include/mlir/IR/OpDefinition.h
    M mlir/include/mlir/IR/OperationSupport.h
    M mlir/include/mlir/IR/PatternMatch.h
    M mlir/lib/Dialect/AffineOps/AffineOps.cpp
    M mlir/lib/Dialect/GPU/IR/GPUDialect.cpp
    M mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
    M mlir/lib/Dialect/LLVMIR/IR/NVVMDialect.cpp
    M mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
    M mlir/lib/Dialect/LoopOps/LoopOps.cpp
    M mlir/lib/Dialect/SPIRV/SPIRVOps.cpp
    M mlir/lib/Dialect/SPIRV/Serialization/Deserializer.cpp
    M mlir/lib/Dialect/StandardOps/Ops.cpp
    M mlir/lib/Dialect/VectorOps/VectorOps.cpp
    M mlir/lib/IR/Function.cpp
    M mlir/lib/IR/FunctionSupport.cpp
    M mlir/lib/IR/Module.cpp
    M mlir/lib/IR/Operation.cpp
    M mlir/lib/Parser/Parser.cpp
    M mlir/test/lib/TestDialect/TestDialect.cpp
    M mlir/test/lib/TestDialect/TestOps.td
    M mlir/test/mlir-tblgen/op-attribute.td
    M mlir/test/mlir-tblgen/op-decl.td
    M mlir/test/mlir-tblgen/op-operand.td
    M mlir/test/mlir-tblgen/op-result.td
    M mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
    M mlir/unittests/Dialect/SPIRV/SerializationTest.cpp

  Log Message:
  -----------
  NFC: Pass OperationState by reference instead of by pointer.

MLIR follows the LLVM convention of passing by reference instead of by pointer.

PiperOrigin-RevId: 270396945


  Commit: 3a643de92b4c1a93b0725f171f4384c8dd941dd5
      https://github.com/llvm/llvm-project/commit/3a643de92b4c1a93b0725f171f4384c8dd941dd5
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-09-20 (Fri, 20 Sep 2019)

  Changed paths:
    M mlir/examples/Linalg/Linalg1/include/linalg1/RangeOp.h
    M mlir/examples/Linalg/Linalg1/include/linalg1/SliceOp.h
    M mlir/examples/Linalg/Linalg1/include/linalg1/ViewOp.h
    M mlir/examples/Linalg/Linalg1/lib/RangeOp.cpp
    M mlir/examples/Linalg/Linalg1/lib/SliceOp.cpp
    M mlir/examples/Linalg/Linalg1/lib/ViewOp.cpp
    M mlir/examples/Linalg/Linalg2/include/linalg2/TensorOps-inl.h
    M mlir/examples/Linalg/Linalg2/include/linalg2/TensorOps.h
    M mlir/examples/Linalg/Linalg2/lib/TensorOps.cpp
    M mlir/examples/Linalg/Linalg3/include/linalg3/LoadStoreOps.h
    M mlir/examples/Linalg/Linalg3/lib/LoadStoreOps.cpp
    M mlir/include/mlir/Dialect/AffineOps/AffineOps.h
    M mlir/include/mlir/Dialect/AffineOps/AffineOps.td
    M mlir/include/mlir/Dialect/GPU/GPUDialect.h
    M mlir/include/mlir/Dialect/GPU/GPUOps.td
    M mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
    M mlir/include/mlir/Dialect/Linalg/IR/LinalgOps.td
    M mlir/include/mlir/Dialect/LoopOps/LoopOps.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVBase.td
    M mlir/include/mlir/Dialect/StandardOps/Ops.h
    M mlir/include/mlir/Dialect/StandardOps/Ops.td
    M mlir/include/mlir/Dialect/VectorOps/VectorOps.h
    M mlir/include/mlir/Dialect/VectorOps/VectorOps.td
    M mlir/include/mlir/IR/Function.h
    M mlir/include/mlir/IR/FunctionSupport.h
    M mlir/include/mlir/IR/Module.h
    M mlir/include/mlir/IR/OpDefinition.h
    M mlir/include/mlir/IR/OperationSupport.h
    M mlir/lib/Dialect/AffineOps/AffineOps.cpp
    M mlir/lib/Dialect/GPU/IR/GPUDialect.cpp
    M mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
    M mlir/lib/Dialect/LLVMIR/IR/NVVMDialect.cpp
    M mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
    M mlir/lib/Dialect/LoopOps/LoopOps.cpp
    M mlir/lib/Dialect/SPIRV/SPIRVOps.cpp
    M mlir/lib/Dialect/StandardOps/Ops.cpp
    M mlir/lib/Dialect/VectorOps/VectorOps.cpp
    M mlir/lib/IR/AsmPrinter.cpp
    M mlir/lib/IR/Function.cpp
    M mlir/lib/IR/FunctionSupport.cpp
    M mlir/lib/IR/Module.cpp
    M mlir/lib/IR/Operation.cpp
    M mlir/test/lib/TestDialect/TestDialect.cpp
    M mlir/test/lib/TestDialect/TestOps.td
    M mlir/test/mlir-tblgen/op-decl.td
    M mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp

  Log Message:
  -----------
  NFC: Pass OpAsmPrinter by reference instead of by pointer.

MLIR follows the LLVM style of pass-by-reference.

PiperOrigin-RevId: 270401378


  Commit: 33a3a91ba2decbf5187228e0fdd528c05b6b963c
      https://github.com/llvm/llvm-project/commit/33a3a91ba2decbf5187228e0fdd528c05b6b963c
  Author: Christian Sigg <csigg at google.com>
  Date:   2019-09-21 (Sat, 21 Sep 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
    M mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
    M mlir/lib/Target/LLVMIR/ModuleTranslation.cpp
    M mlir/test/Dialect/LLVMIR/global.mlir
    M mlir/test/Target/llvmir.mlir

  Log Message:
  -----------
  Make GlobalOp's value attribute optional.

Make GlobalOp's value attribute an OptionalAttr. Change code that uses the value to handle 'nullopt'. Translate an unitialized value attribute to llvm::UndefValue.

PiperOrigin-RevId: 270423646


  Commit: 8e4906362edba6ea763497c8a050a66291c3b087
      https://github.com/llvm/llvm-project/commit/8e4906362edba6ea763497c8a050a66291c3b087
  Author: Lei Zhang <antiagainst at google.com>
  Date:   2019-09-21 (Sat, 21 Sep 2019)

  Changed paths:
    M mlir/include/mlir/IR/OpBase.td
    M mlir/test/IR/attribute.mlir
    M mlir/test/lib/TestDialect/TestOps.td
    M mlir/test/mlir-tblgen/pattern.mlir

  Log Message:
  -----------
  [ODS] Add support for FloatElementsAttr

This CL adds a new FloatElementsAttr definition to ODS for float
elements attributes of a certain type.

Tests are added to show both verification and how to use it in patterns.

PiperOrigin-RevId: 270455487


  Commit: 4d880d09e0ce2d026ff1313b596151102420ad2b
      https://github.com/llvm/llvm-project/commit/4d880d09e0ce2d026ff1313b596151102420ad2b
  Author: Mehdi Amini <aminim at google.com>
  Date:   2019-09-21 (Sat, 21 Sep 2019)

  Changed paths:
    M mlir/g3doc/DeveloperGuide.md

  Log Message:
  -----------
  Add a note about the use of recursion in the developer guide

PiperOrigin-RevId: 270455509


  Commit: f559c38c28caf67576d23a8f9e3f02c88ecc13e4
      https://github.com/llvm/llvm-project/commit/f559c38c28caf67576d23a8f9e3f02c88ecc13e4
  Author: Uday Bondhugula <udayb at iisc.ac.in>
  Date:   2019-09-21 (Sat, 21 Sep 2019)

  Changed paths:
    M mlir/include/mlir/Analysis/AffineAnalysis.h
    M mlir/include/mlir/Analysis/AffineStructures.h
    M mlir/include/mlir/IR/AffineExpr.h
    M mlir/lib/Analysis/AffineStructures.cpp
    M mlir/lib/Analysis/Utils.cpp
    M mlir/lib/IR/AffineExpr.cpp
    M mlir/lib/Transforms/MemRefDataFlowOpt.cpp
    M mlir/test/Transforms/memref-dataflow-opt.mlir

  Log Message:
  -----------
  Upgrade/fix/simplify store to load forwarding

- fix store to load forwarding for a certain set of cases (where
  forwarding shouldn't have happened); use AffineValueMap difference
  based MemRefAccess equality checking; utility logic is also greatly
  simplified

- add missing equality/inequality operators for AffineExpr ==/!= ints

- add == != operators on MemRefAccess

Closes tensorflow/mlir#136

COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/136 from bondhugula:store-load-forwarding d79fd1add8bcfbd9fa71d841a6a9905340dcd792
PiperOrigin-RevId: 270457011


  Commit: 2ec8e2be1f01aaec0a9543ed90dd8f472c037a45
      https://github.com/llvm/llvm-project/commit/2ec8e2be1f01aaec0a9543ed90dd8f472c037a45
  Author: Denis Khalikov <khalikov.denis at huawei.com>
  Date:   2019-09-21 (Sat, 21 Sep 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/SPIRV/SPIRVBase.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVOps.td
    M mlir/lib/Dialect/SPIRV/SPIRVOps.cpp
    M mlir/lib/Dialect/SPIRV/Serialization/Deserializer.cpp
    M mlir/lib/Dialect/SPIRV/Serialization/Serializer.cpp
    A mlir/test/Dialect/SPIRV/Serialization/barrier.mlir
    M mlir/test/Dialect/SPIRV/ops.mlir
    M mlir/tools/mlir-tblgen/SPIRVUtilsGen.cpp

  Log Message:
  -----------
  [spirv] Add OpControlBarrier and OpMemoryBarrier.

Add OpControlBarrier and OpMemoryBarrier (de)serialization.

Closes tensorflow/mlir#130

COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/130 from denis0x0D:sandbox/memory_barrier 2e3fff16bca44904dc1039592cb9a65d526faea8
PiperOrigin-RevId: 270457478


  Commit: a26bb0346e88a09a28ba8f2eb5e74136084c161e
      https://github.com/llvm/llvm-project/commit/a26bb0346e88a09a28ba8f2eb5e74136084c161e
  Author: brett koonce <koonce at hello.com>
  Date:   2019-09-21 (Sat, 21 Sep 2019)

  Changed paths:
    M mlir/g3doc/OpDefinitions.md
    M mlir/g3doc/TestingGuide.md

  Log Message:
  -----------
  minor spelling tweaks

Closes tensorflow/mlir#143

COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/143 from brettkoonce:minor_sp_demo 76bdf7c121a824417969627fc15e50259356a2fa
PiperOrigin-RevId: 270462293


  Commit: 2c11997d4857ceacebf4124aa73725e2b584c6dd
      https://github.com/llvm/llvm-project/commit/2c11997d4857ceacebf4124aa73725e2b584c6dd
  Author: Manuel Freiberger <manuel.freiberger at gmail.com>
  Date:   2019-09-21 (Sat, 21 Sep 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/StandardOps/Ops.td
    M mlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp
    M mlir/lib/Dialect/StandardOps/Ops.cpp
    M mlir/test/Conversion/StandardToLLVM/convert-to-llvmir.mlir
    M mlir/test/IR/core-ops.mlir
    M mlir/test/IR/invalid-ops.mlir
    M mlir/test/Target/llvmir.mlir

  Log Message:
  -----------
  Add integer sign- and zero-extension and truncation to standard.

This adds sign- and zero-extension and truncation of integer types to the
standard dialects. This allows to perform integer type conversions without
having to go to the LLVM dialect and introduce custom type casts (between
standard and LLVM integer types).

Closes tensorflow/mlir#134

COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/134 from ombre5733:sext-zext-trunc-in-std c7657bc84c0ca66b304e53ec03797e09152e4d31
PiperOrigin-RevId: 270479722


  Commit: 6414c0855605e2cf96b9f4f918b4e06a69fe0abe
      https://github.com/llvm/llvm-project/commit/6414c0855605e2cf96b9f4f918b4e06a69fe0abe
  Author: Denis Khalikov <khalikov.denis at huawei.com>
  Date:   2019-09-22 (Sun, 22 Sep 2019)

  Changed paths:
    M mlir/lib/Dialect/StandardOps/CMakeLists.txt

  Log Message:
  -----------
  Fix undefined reference to mlir::getElementTypeOrSelf(mlir::Type)

Fix undefined reference:
mlir/lib/Dialect/StandardOps/Ops.cpp:2029:
undefined reference to `mlir::getElementTypeOrSelf(mlir::Type)'

Closes tensorflow/mlir#144

COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/144 from denis0x0D:sandbox/fix_undef 494d4f7fa2e98ba21954d2b2f7ec1776b9397e08
PiperOrigin-RevId: 270545190


  Commit: 08ae1bb83014e84dfe5e335a3d7e835321542f9d
      https://github.com/llvm/llvm-project/commit/08ae1bb83014e84dfe5e335a3d7e835321542f9d
  Author: Uday Bondhugula <udayb at iisc.ac.in>
  Date:   2019-09-22 (Sun, 22 Sep 2019)

  Changed paths:
    M mlir/g3doc/LangRef.md

  Log Message:
  -----------
  update layout map examples in doc, drop stale ones

- add more examples for affine layout maps showing various use
  cases

- affine map range sizes were removed from code, but examples in
  LangRef weren't updated

Signed-off-by: Uday Bondhugula <uday at polymagelabs.com>

Closes tensorflow/mlir#142

COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/142 from bondhugula:doc 3291a8784bc69883f7a7cead21445fc8118aaad2
PiperOrigin-RevId: 270548991


  Commit: 541f1945d105b0b2c076da27abb7e58d34ca3d90
      https://github.com/llvm/llvm-project/commit/541f1945d105b0b2c076da27abb7e58d34ca3d90
  Author: MLIR Team <no-reply at google.com>
  Date:   2019-09-22 (Sun, 22 Sep 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/StandardOps/Ops.td

  Log Message:
  -----------
  Update TruncateIOp builder to pass OperationState by reference.

PiperOrigin-RevId: 270560295


  Commit: 54f4522a5c9c321648fbc52e787fef811205f3c6
      https://github.com/llvm/llvm-project/commit/54f4522a5c9c321648fbc52e787fef811205f3c6
  Author: Jing Pu <jingpu at google.com>
  Date:   2019-09-22 (Sun, 22 Sep 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/QuantOps/UniformSupport.h
    M mlir/test/Dialect/QuantOps/convert-const.mlir

  Log Message:
  -----------
  Specalize f32->i8/u8 Quanitization with C++ native arithmetic to optimize performance.

The CL adds a rounding mode flag to the class and changes the default to rmNearestTiesToAway from rmNearestTiesToEven because 1) Tensorflow QuantizeV2 ops uses rmNearestTiesToAway; 2) the specialization only implements rmNearestTiesToAway.

PiperOrigin-RevId: 270600739


  Commit: f1442f1eff482ff1d331e0f9871590063e7546bd
      https://github.com/llvm/llvm-project/commit/f1442f1eff482ff1d331e0f9871590063e7546bd
  Author: Jing Pu <jingpu at google.com>
  Date:   2019-09-22 (Sun, 22 Sep 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/QuantOps/UniformSupport.h

  Log Message:
  -----------
  [NFC] Replace std::clamp with inline implementation.

std::clamp is not in C++14, thus replace it with std::min and std::max.
PiperOrigin-RevId: 270604708


  Commit: c900d4994e609ac0f4730d0cdd918eae958e9d28
      https://github.com/llvm/llvm-project/commit/c900d4994e609ac0f4730d0cdd918eae958e9d28
  Author: Christian Sigg <csigg at google.com>
  Date:   2019-09-23 (Mon, 23 Sep 2019)

  Changed paths:
    M mlir/examples/Linalg/Linalg1/lib/Analysis.cpp
    M mlir/examples/Linalg/Linalg3/lib/Transforms.cpp
    M mlir/lib/Analysis/AffineStructures.cpp
    M mlir/lib/Conversion/StandardToSPIRV/ConvertStandardToSPIRV.cpp
    M mlir/lib/Conversion/VectorToLLVM/VectorToLLVM.cpp
    M mlir/lib/Dialect/FxpMathOps/Transforms/LowerUniformRealMath.cpp
    M mlir/lib/Dialect/Linalg/Transforms/Fusion.cpp
    M mlir/lib/Dialect/Linalg/Transforms/LowerToLLVMDialect.cpp
    M mlir/lib/Dialect/Linalg/Transforms/LowerToLoops.cpp
    M mlir/lib/Dialect/Linalg/Transforms/Tiling.cpp
    M mlir/lib/Dialect/SPIRV/Serialization/Serializer.cpp
    M mlir/lib/IR/AsmPrinter.cpp
    M mlir/lib/IR/Diagnostics.cpp
    M mlir/lib/Parser/Lexer.cpp
    M mlir/lib/Parser/Parser.cpp
    M mlir/lib/Pass/Pass.cpp
    M mlir/lib/Pass/PassTiming.cpp
    M mlir/lib/Transforms/AffineDataCopyGeneration.cpp
    M mlir/lib/Transforms/LowerAffine.cpp
    M mlir/lib/Transforms/LowerVectorTransfers.cpp
    M mlir/lib/Transforms/Utils/LoopUtils.cpp
    M mlir/lib/Transforms/ViewRegionGraph.cpp
    M mlir/test/lib/TestDialect/TestDialect.cpp

  Log Message:
  -----------
  Fix a number of Clang-Tidy warnings.

PiperOrigin-RevId: 270632324


  Commit: b8676da1fc5e7d371a76defbd1b4a93a41fe2e33
      https://github.com/llvm/llvm-project/commit/b8676da1fc5e7d371a76defbd1b4a93a41fe2e33
  Author: Christian Sigg <csigg at google.com>
  Date:   2019-09-23 (Mon, 23 Sep 2019)

  Changed paths:
    M mlir/include/mlir/Conversion/GPUToNVVM/GPUToNVVMPass.h
    M mlir/include/mlir/Dialect/GPU/GPUDialect.h
    M mlir/lib/Conversion/GPUToCUDA/ConvertKernelFuncToCubin.cpp
    M mlir/lib/Conversion/GPUToCUDA/GenerateCubinAccessors.cpp
    M mlir/lib/Conversion/GPUToNVVM/LowerGpuOpsToNVVMOps.cpp
    M mlir/lib/Dialect/GPU/Transforms/KernelOutlining.cpp
    M mlir/test/Conversion/GPUToCUDA/insert-cubin-getter.mlir
    M mlir/test/Conversion/GPUToCUDA/lower-nvvm-kernel-to-cubin.mlir
    M mlir/test/Conversion/GPUToNVVM/gpu-to-nvvm.mlir
    M mlir/test/Dialect/GPU/outlining.mlir
    M mlir/tools/mlir-cuda-runner/mlir-cuda-runner.cpp

  Log Message:
  -----------
  Outline GPU kernel function into a nested module.

Roll forward of commit 5684a12.

When outlining GPU kernels, put the kernel function inside a nested module. Then use a nested pipeline to generate the cubins, independently per kernel. In a final pass, move the cubins back to the parent module.

PiperOrigin-RevId: 270639748


  Commit: 59e3b30af05357adc41344a4451b2e7629baf64e
      https://github.com/llvm/llvm-project/commit/59e3b30af05357adc41344a4451b2e7629baf64e
  Author: Jacques Pienaar <jpienaar at google.com>
  Date:   2019-09-23 (Mon, 23 Sep 2019)

  Changed paths:
    M mlir/include/mlir/Support/STLExtras.h
    M mlir/lib/Dialect/SPIRV/SPIRVDialect.cpp

  Log Message:
  -----------
  Add variants of interleave that take separator

Make the common case of string separator easier to specify.

PiperOrigin-RevId: 270697581


  Commit: 4b6b58ec0f391b09acbb65c4bc8cf97f9eec685b
      https://github.com/llvm/llvm-project/commit/4b6b58ec0f391b09acbb65c4bc8cf97f9eec685b
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-09-23 (Mon, 23 Sep 2019)

  Changed paths:
    M mlir/lib/Pass/PassRegistry.cpp

  Log Message:
  -----------
  NFC: Fix warning for uninitialized field.
PiperOrigin-RevId: 270704572


  Commit: 3eade4304656fd20773a24b7e0c3b183b3e7b426
      https://github.com/llvm/llvm-project/commit/3eade4304656fd20773a24b7e0c3b183b3e7b426
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-09-23 (Mon, 23 Sep 2019)

  Changed paths:
    M mlir/g3doc/WritingAPass.md

  Log Message:
  -----------
  Update the Pass, Analysis, and PassManager sections of WritingAPass.md.

These have become out-of-date with the pass manager generalization.

PiperOrigin-RevId: 270719105


  Commit: c61991ef01c34aa2d09fe6d16aead943b7fba2fa
      https://github.com/llvm/llvm-project/commit/c61991ef01c34aa2d09fe6d16aead943b7fba2fa
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-09-23 (Mon, 23 Sep 2019)

  Changed paths:
    M mlir/g3doc/Diagnostics.md
    M mlir/include/mlir/IR/Diagnostics.h
    M mlir/lib/IR/Diagnostics.cpp
    M mlir/unittests/Dialect/SPIRV/DeserializationTest.cpp

  Log Message:
  -----------
  Refactor DiagnosticEngine to support multiple registered diagnostic handlers.

This fixes a problem with current save-restore pattern of diagnostics handlers, as there may be a thread race between when the previous handler is destroyed. For example, this occurs when using multiple ParallelDiagnosticHandlers asynchronously:

Handler A
Handler B | - LifeTime - |    Restore A here.
Handler C | --- LifeTime ---| Restore B after it has been destroyed.

The new design allows for multiple handlers to be registered in a stack like fashion. Handlers can return success() to signal that they have fully processed a diagnostic, or failure to propagate otherwise.

PiperOrigin-RevId: 270720625


  Commit: 8965011fadf24f4986b0d9c00fc6af0f2b13ee28
      https://github.com/llvm/llvm-project/commit/8965011fadf24f4986b0d9c00fc6af0f2b13ee28
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-09-23 (Mon, 23 Sep 2019)

  Changed paths:
    A mlir/include/mlir/Analysis/CMakeLists.txt
    A mlir/include/mlir/Analysis/CallInterfaces.h
    A mlir/include/mlir/Analysis/CallInterfaces.td
    M mlir/include/mlir/CMakeLists.txt
    M mlir/include/mlir/Dialect/StandardOps/Ops.h
    M mlir/include/mlir/Dialect/StandardOps/Ops.td
    M mlir/include/mlir/IR/Attributes.h
    M mlir/include/mlir/IR/Function.h
    M mlir/lib/Analysis/CMakeLists.txt
    A mlir/lib/Analysis/CallGraph.cpp
    M mlir/lib/Dialect/StandardOps/CMakeLists.txt
    M mlir/lib/IR/CMakeLists.txt
    M mlir/lib/Support/CMakeLists.txt
    M mlir/test/lib/TestDialect/TestDialect.h
    M mlir/test/lib/TestDialect/TestOps.td

  Log Message:
  -----------
  Add interfaces for call-like/callable operations.

These two operation interfaces will be used in a followup to support building a callgraph:
* CallOpInterface
  - Operations providing this interface are call-like, and have a "call" target. A call target may be a symbol reference, via SymbolRefAttr, or a SSA value.

* CallableOpInterface
  - Operations providing this interfaces define destinations to call-like operations, e.g. FuncOp. These operations may define any number of callable regions.

PiperOrigin-RevId: 270723300


  Commit: 8cb405a8bed4a6a3782591c5eb447a83857f94c8
      https://github.com/llvm/llvm-project/commit/8cb405a8bed4a6a3782591c5eb447a83857f94c8
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-09-23 (Mon, 23 Sep 2019)

  Changed paths:
    A mlir/include/mlir/Analysis/CallGraph.h
    M mlir/include/mlir/IR/SymbolTable.h
    M mlir/lib/Analysis/CallGraph.cpp
    M mlir/lib/IR/SymbolTable.cpp
    A mlir/test/Analysis/test-callgraph.mlir
    M mlir/test/lib/Transforms/CMakeLists.txt
    A mlir/test/lib/Transforms/TestCallGraph.cpp

  Log Message:
  -----------
  Add initial callgraph support.

Using the two call interfaces, CallOpInterface and CallableOpInterface, this change adds support for an initial multi-level CallGraph. This call graph builds a set of nodes for each callable region, and connects them via edges. An edge may be any of the following types:
* Abstract
  - An edge not produced by a call operation, used for connecting to internal nodes from external nodes.
* Call
  - A call edge is an edge defined via a call-like operation.
* Child
  - This is an artificial edge connecting nested callgraph nodes.

This callgraph will be used, and improved upon, to begin supporting more interesting interprocedural analyses and transformation. In a followup, this callgraph will be used to support more complex inlining support.

PiperOrigin-RevId: 270724968


  Commit: 5583252173682098a4dfa0fff0fc225b7e2f1034
      https://github.com/llvm/llvm-project/commit/5583252173682098a4dfa0fff0fc225b7e2f1034
  Author: Mehdi Amini <aminim at google.com>
  Date:   2019-09-23 (Mon, 23 Sep 2019)

  Changed paths:
    M mlir/examples/toy/Ch5/mlir/ShapeInferencePass.cpp
    M mlir/include/mlir/IR/Builders.h
    M mlir/lib/Conversion/GPUToCUDA/GenerateCubinAccessors.cpp
    M mlir/lib/Transforms/PipelineDataTransfer.cpp

  Log Message:
  -----------
  Add convenience methods to set an OpBuilder insertion point after an Operation (NFC)

PiperOrigin-RevId: 270727180


  Commit: 98d1d3fc437f5d2b9b3dc99ab79ee734c8127072
      https://github.com/llvm/llvm-project/commit/98d1d3fc437f5d2b9b3dc99ab79ee734c8127072
  Author: Mahesh Ravishankar <ravishankarm at google.com>
  Date:   2019-09-23 (Mon, 23 Sep 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/SPIRV/SPIRVTypes.h
    M mlir/include/mlir/Parser.h
    M mlir/lib/Dialect/SPIRV/SPIRVDialect.cpp
    M mlir/lib/Dialect/SPIRV/SPIRVTypes.cpp
    M mlir/lib/Dialect/SPIRV/Serialization/Deserializer.cpp
    M mlir/lib/Parser/Parser.cpp
    M mlir/test/Dialect/SPIRV/Serialization/struct.mlir
    M mlir/test/Dialect/SPIRV/types.mlir
    M mlir/test/IR/invalid.mlir

  Log Message:
  -----------
  Simplify the way spirv::StructTypes are parsed.

The existing logic to parse spirv::StructTypes is very brittle. This
change simplifies the parsing logic a lot. The simplification also
allows for memberdecorations to be separated by commas instead of
spaces (which was an artifact of the existing parsing logic). The
change also needs a modification to mlir::parseType to return the
number of chars parsed. Adding a new parseType method to do so.

Also allow specification of spirv::StructType with no members.

PiperOrigin-RevId: 270739672


  Commit: 4a862fbd6337bb926e7a88ed4749b726e1a09ed9
      https://github.com/llvm/llvm-project/commit/4a862fbd6337bb926e7a88ed4749b726e1a09ed9
  Author: Jacques Pienaar <jpienaar at google.com>
  Date:   2019-09-23 (Mon, 23 Sep 2019)

  Changed paths:
    M mlir/lib/Parser/Parser.cpp
    M mlir/test/IR/invalid.mlir

  Log Message:
  -----------
  Use constant's location for reporting errors in parsing of hex constant

Before this the line following the error would be reported in some cases.

PiperOrigin-RevId: 270778722


  Commit: 75906bd565a199edb6b9b8088236376d6234a9a6
      https://github.com/llvm/llvm-project/commit/75906bd565a199edb6b9b8088236376d6234a9a6
  Author: Mahesh Ravishankar <ravishankarm at google.com>
  Date:   2019-09-23 (Mon, 23 Sep 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/SPIRV/SPIRVBase.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVBinaryUtils.h
    M mlir/lib/Dialect/SPIRV/Serialization/Deserializer.cpp
    M mlir/lib/Dialect/SPIRV/Serialization/SPIRVBinaryUtils.cpp
    M mlir/lib/Dialect/SPIRV/Serialization/Serializer.cpp
    M mlir/test/Dialect/SPIRV/ops.mlir
    M mlir/unittests/Dialect/SPIRV/DeserializationTest.cpp

  Log Message:
  -----------
  Handle OpMemberName instruction in SPIR-V deserializer.

Sdd support in deserializer for OpMemberName instruction. For now
the name is just processed and not associated with the
spirv::StructType being built. That needs an enhancement to
spirv::StructTypes itself.
Add tests to check for errors reported during deserialization with
some refactoring to common out some utility functions.
PiperOrigin-RevId: 270794524


  Commit: 0e7edcfe7e434221c46fac2a4166c672cbb35de5
      https://github.com/llvm/llvm-project/commit/0e7edcfe7e434221c46fac2a4166c672cbb35de5
  Author: Lei Zhang <antiagainst at google.com>
  Date:   2019-09-23 (Mon, 23 Sep 2019)

  Changed paths:
    A mlir/include/mlir/Support/ToolUtilities.h
    M mlir/lib/Support/CMakeLists.txt
    M mlir/lib/Support/MlirOptMain.cpp
    A mlir/lib/Support/ToolUtilities.cpp
    M mlir/tools/mlir-translate/mlir-translate.cpp

  Log Message:
  -----------
  Let mlir-translate support -split-input-file

Similar to mlir-opt, having a -split-input-file mode is quite useful
in mlir-translate. It allows to put logically related tests in the
same test file for better organization.

PiperOrigin-RevId: 270805467


  Commit: 69af46875479c33cf40fdad96f1517260f9f33fb
      https://github.com/llvm/llvm-project/commit/69af46875479c33cf40fdad96f1517260f9f33fb
  Author: Mahesh Ravishankar <ravishankarm at google.com>
  Date:   2019-09-23 (Mon, 23 Sep 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/SPIRV/SPIRVBase.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVTypes.h
    M mlir/lib/Dialect/SPIRV/SPIRVTypes.cpp
    M mlir/test/Dialect/SPIRV/ops.mlir

  Log Message:
  -----------
  Make spirv::RuntimeArrayType part of spirv::CompositeType.

According to SPIR-V spec, spirv::CompositeType includes
spirv::RuntimeArrayType. This allows using objects of
spirv::RuntimeArrayType with spirv::AccessChainOp.
PiperOrigin-RevId: 270809492


  Commit: 6caa4f500b149fd74086e60ff5dbcd33a826c30e
      https://github.com/llvm/llvm-project/commit/6caa4f500b149fd74086e60ff5dbcd33a826c30e
  Author: Lei Zhang <antiagainst at google.com>
  Date:   2019-09-23 (Mon, 23 Sep 2019)

  Changed paths:
    R mlir/test/Dialect/SPIRV/Serialization/access_chain.mlir
    A mlir/test/Dialect/SPIRV/Serialization/arithmetic-ops.mlir
    A mlir/test/Dialect/SPIRV/Serialization/array.mlir
    R mlir/test/Dialect/SPIRV/Serialization/array_stride.mlir
    R mlir/test/Dialect/SPIRV/Serialization/bin_ops.mlir
    R mlir/test/Dialect/SPIRV/Serialization/capability.mlir
    A mlir/test/Dialect/SPIRV/Serialization/entry-point.mlir
    R mlir/test/Dialect/SPIRV/Serialization/entry.mlir
    R mlir/test/Dialect/SPIRV/Serialization/entry_interface.mlir
    A mlir/test/Dialect/SPIRV/Serialization/execution-mode.mlir
    R mlir/test/Dialect/SPIRV/Serialization/execution_mode.mlir
    R mlir/test/Dialect/SPIRV/Serialization/extension.mlir
    A mlir/test/Dialect/SPIRV/Serialization/function-call.mlir
    R mlir/test/Dialect/SPIRV/Serialization/function_call.mlir
    A mlir/test/Dialect/SPIRV/Serialization/global-variable.mlir
    A mlir/test/Dialect/SPIRV/Serialization/glsl-ops.mlir
    R mlir/test/Dialect/SPIRV/Serialization/glslops.mlir
    R mlir/test/Dialect/SPIRV/Serialization/load_store.mlir
    A mlir/test/Dialect/SPIRV/Serialization/logical-ops.mlir
    A mlir/test/Dialect/SPIRV/Serialization/memory-ops.mlir
    R mlir/test/Dialect/SPIRV/Serialization/minimal-module.mlir
    A mlir/test/Dialect/SPIRV/Serialization/module.mlir
    R mlir/test/Dialect/SPIRV/Serialization/rtarray.mlir
    R mlir/test/Dialect/SPIRV/Serialization/select.mlir
    A mlir/test/Dialect/SPIRV/Serialization/spec-constant.mlir
    R mlir/test/Dialect/SPIRV/Serialization/spec_constant.mlir
    R mlir/test/Dialect/SPIRV/Serialization/variable_reference.mlir
    R mlir/test/Dialect/SPIRV/Serialization/variables.mlir
    R mlir/test/Dialect/SPIRV/Serialization/variables_init.mlir

  Log Message:
  -----------
  [spirv] NFC: clean up (de)serialization tests

This CL uses the newly added -split-input-file CLI option to
mlir-translate to combine certain (de)serialization tests.
It also renames certain test filenames.

PiperOrigin-RevId: 270816324


  Commit: eba6014cdc1cc1a9d9732a2e9010afde2d9d898e
      https://github.com/llvm/llvm-project/commit/eba6014cdc1cc1a9d9732a2e9010afde2d9d898e
  Author: Christian Sigg <csigg at google.com>
  Date:   2019-09-24 (Tue, 24 Sep 2019)

  Changed paths:
    M mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp

  Log Message:
  -----------
  Allow null Attribute for value when building GlobalOp.

PiperOrigin-RevId: 270853596


  Commit: 74cdbf5909e57b42b6ed5b3b6eea4f76448a7d48
      https://github.com/llvm/llvm-project/commit/74cdbf5909e57b42b6ed5b3b6eea4f76448a7d48
  Author: Christian Sigg <csigg at google.com>
  Date:   2019-09-24 (Tue, 24 Sep 2019)

  Changed paths:
    M mlir/lib/Dialect/GPU/Transforms/KernelOutlining.cpp
    M mlir/test/Dialect/GPU/outlining.mlir

  Log Message:
  -----------
  Clone called functions into nested GPU module.

PiperOrigin-RevId: 270891190


  Commit: 42d8fa667bcdb81ad305e64a4d6fb0ff1cc4cc3d
      https://github.com/llvm/llvm-project/commit/42d8fa667bcdb81ad305e64a4d6fb0ff1cc4cc3d
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2019-09-24 (Tue, 24 Sep 2019)

  Changed paths:
    M mlir/examples/Linalg/Linalg1/lib/ConvertToLLVMDialect.cpp
    M mlir/examples/toy/Ch5/mlir/LateLowering.cpp
    M mlir/g3doc/ConversionToLLVMDialect.md
    M mlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp
    M mlir/test/Conversion/StandardToLLVM/convert-argattrs.mlir
    M mlir/test/Conversion/StandardToLLVM/convert-memref-ops.mlir
    M mlir/test/Conversion/StandardToLLVM/convert-to-llvmir.mlir
    M mlir/test/Conversion/StandardToLLVM/standard-to-llvm.mlir
    M mlir/test/Examples/Linalg/Linalg1.mlir

  Log Message:
  -----------
  Normalize lowering of MemRef types

The RFC for unifying Linalg and Affine compilation passes into an end-to-end flow with a predictable ABI and linkage to external function calls raised the question of why we have variable sized descriptors for memrefs depending on whether they have static or dynamic dimensions  (https://groups.google.com/a/tensorflow.org/forum/#!topic/mlir/MaL8m2nXuio).

This CL standardizes the ABI on the rank of the memrefs.
The LLVM struct for a memref becomes equivalent to:
```
template <typename Elem, size_t Rank>
struct {
  Elem *ptr;
  int64_t sizes[Rank];
};
```

PiperOrigin-RevId: 270947276


  Commit: 458ede8775d0180434692cada24c12eb25839efc
      https://github.com/llvm/llvm-project/commit/458ede8775d0180434692cada24c12eb25839efc
  Author: Uday Bondhugula <udayb at iisc.ac.in>
  Date:   2019-09-24 (Tue, 24 Sep 2019)

  Changed paths:
    M mlir/g3doc/Dialects/Standard.md
    M mlir/g3doc/LangRef.md
    M mlir/include/mlir/Dialect/StandardOps/Ops.td
    M mlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp
    M mlir/lib/Dialect/StandardOps/Ops.cpp
    M mlir/test/Conversion/StandardToLLVM/convert-to-llvmir.mlir
    M mlir/test/IR/core-ops.mlir
    M mlir/test/IR/invalid-ops.mlir
    M mlir/test/Transforms/constant-fold.mlir
    M mlir/utils/vim/syntax/mlir.vim

  Log Message:
  -----------
  Introduce splat op + provide its LLVM lowering

- introduce splat op in standard dialect (currently for int/float/index input
  type, output type can be vector or statically shaped tensor)
- implement LLVM lowering (when result type is 1-d vector)
- add constant folding hook for it
- while on Ops.cpp, fix some stale names

Signed-off-by: Uday Bondhugula <uday at polymagelabs.com>

Closes tensorflow/mlir#141

COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/141 from bondhugula:splat 48976a6aa0a75be6d91187db6418de989e03eb51
PiperOrigin-RevId: 270965304


  Commit: 635544fc120cc3956f909af08d861dca9b709fef
      https://github.com/llvm/llvm-project/commit/635544fc120cc3956f909af08d861dca9b709fef
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-09-24 (Tue, 24 Sep 2019)

  Changed paths:
    M mlir/g3doc/OpDefinitions.md
    M mlir/include/mlir/Analysis/CallInterfaces.td
    M mlir/include/mlir/Dialect/Linalg/IR/LinalgLibraryOps.td
    M mlir/include/mlir/IR/OpBase.td
    A mlir/tools/mlir-tblgen/DocGenUtilities.h
    M mlir/tools/mlir-tblgen/OpDocGen.cpp
    M mlir/tools/mlir-tblgen/OpInterfacesGen.cpp

  Log Message:
  -----------
  Allow attaching descriptions to OpInterfaces and InterfaceMethods.

This change adds support for documenting interfaces and their methods. A tablegen generator for the interface documentation is also added(gen-op-interface-doc).

Documentation is added to an OpInterface via the `description` field:
def MyOpInterface : OpInterface<"MyOpInterface"> {
  let description = [{
    My interface is very interesting.
  }];
}

Documentation is added to an InterfaceMethod via a new `description` field that comes right before the optional body:

InterfaceMethod<"void", "foo", (ins), [{
  This is the foo method.
}]>,

PiperOrigin-RevId: 270965485


  Commit: f7ad5b411c7b051565d9a3c372882f44f1719e0b
      https://github.com/llvm/llvm-project/commit/f7ad5b411c7b051565d9a3c372882f44f1719e0b
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-09-24 (Tue, 24 Sep 2019)

  Changed paths:
    M mlir/g3doc/Interfaces.md

  Log Message:
  -----------
  NFC: Add a description to the ODS interface example.
PiperOrigin-RevId: 270978748


  Commit: cf00feed037bdd9d2d53d3ff34fc90378247038a
      https://github.com/llvm/llvm-project/commit/cf00feed037bdd9d2d53d3ff34fc90378247038a
  Author: Lei Zhang <antiagainst at google.com>
  Date:   2019-09-24 (Tue, 24 Sep 2019)

  Changed paths:
    M mlir/lib/Dialect/SPIRV/SPIRVOps.cpp

  Log Message:
  -----------
  [spirv] Replace bitwiseCast with llvm::bit_cast

PiperOrigin-RevId: 271035618


  Commit: c5284fe85ed547a25007f67ce5449a34f0d1f3a1
      https://github.com/llvm/llvm-project/commit/c5284fe85ed547a25007f67ce5449a34f0d1f3a1
  Author: Mahesh Ravishankar <ravishankarm at google.com>
  Date:   2019-09-24 (Tue, 24 Sep 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/SPIRV/SPIRVGLSLOps.td
    M mlir/test/Dialect/SPIRV/Serialization/glsl-ops.mlir
    M mlir/test/Dialect/SPIRV/glslops.mlir

  Log Message:
  -----------
  Add support for GLSL Binary ops, and use it to implement GLSL FMax.

A base class is added to implement all GLSL Binary operations and is
used to implement the FMax operation. The existing framework already
generates all the necessary (de)serialization code.

PiperOrigin-RevId: 271037166


  Commit: 03db4223598a6757f3ac7dc5f65135fe5e508e17
      https://github.com/llvm/llvm-project/commit/03db4223598a6757f3ac7dc5f65135fe5e508e17
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-09-24 (Tue, 24 Sep 2019)

  Changed paths:
    M mlir/include/mlir/IR/Operation.h

  Log Message:
  -----------
  NFC: Add 'const' dereference method to OperandTypeIterator.

The deference provided by mapped_iterator is non-const.

PiperOrigin-RevId: 271051375


  Commit: 3a4bee0fe1883dfad62233675513c61fdaa060f5
      https://github.com/llvm/llvm-project/commit/3a4bee0fe1883dfad62233675513c61fdaa060f5
  Author: Mahesh Ravishankar <ravishankarm at google.com>
  Date:   2019-09-24 (Tue, 24 Sep 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/SPIRV/SPIRVBase.td
    M mlir/lib/Dialect/SPIRV/Serialization/Deserializer.cpp
    M mlir/tools/mlir-tblgen/SPIRVUtilsGen.cpp

  Log Message:
  -----------
  Miscellaneous fixes to SPIR-V Deserializer (details below).

1) Process and ignore the following debug instructions: OpSource,
OpSourceContinued, OpSourceExtension, OpString, OpModuleProcessed.
2) While processing OpTypeInt instruction, ignore the signedness
specification. Currently MLIR doesnt make a distinction between signed
and unsigned integer types.
3) Process and ignore BufferBlock decoration (similar to Buffer
decoration). StructType needs to be enhanced to track this attribute
since its needed for proper validation checks.
4) Report better error for unhandled instruction during
deserialization.

PiperOrigin-RevId: 271057060


  Commit: 4e32dc9b8ae3735a49f8e4ce23a620044f51c55f
      https://github.com/llvm/llvm-project/commit/4e32dc9b8ae3735a49f8e4ce23a620044f51c55f
  Author: Lei Zhang <antiagainst at google.com>
  Date:   2019-09-25 (Wed, 25 Sep 2019)

  Changed paths:
    M mlir/include/mlir/Support/ToolUtilities.h

  Log Message:
  -----------
  Forward declare LogicalResult as a struct to be consistent

This addresses a MSVC linker error saying splitAndProcessBuffer
was unresolved.

PiperOrigin-RevId: 271126570


  Commit: b76c4f878025f112af28f38e4a88ce97e2c249cd
      https://github.com/llvm/llvm-project/commit/b76c4f878025f112af28f38e4a88ce97e2c249cd
  Author: Lei Zhang <antiagainst at google.com>
  Date:   2019-09-25 (Wed, 25 Sep 2019)

  Changed paths:
    M mlir/test/AffineOps/memref-stride-calculation.mlir
    M mlir/test/lib/Transforms/TestMemRefStrideCalculation.cpp

  Log Message:
  -----------
  Fix memref-stride-calculation on Windows

Call llvm::outs().flush() to make sure we don't mix streams.
Remove CHECK-LABEL to avoid assuming the relative order
between the additional info and the output IR.

PiperOrigin-RevId: 271131100


  Commit: 9b7435fb50230621b5660a8d3dad51c40c6c348d
      https://github.com/llvm/llvm-project/commit/9b7435fb50230621b5660a8d3dad51c40c6c348d
  Author: Geoffrey Martin-Noble <gcmn at google.com>
  Date:   2019-09-25 (Wed, 25 Sep 2019)

  Changed paths:
    M mlir/include/mlir/IR/OpBase.td
    M mlir/test/lib/TestDialect/TestOps.td
    M mlir/test/mlir-tblgen/types.mlir

  Log Message:
  -----------
  Add tablegen verification traits for comparing different properties

This allows things like comparing the rank of one operand to the size of another that specifies indices into it.

PiperOrigin-RevId: 271150439


  Commit: 3848baec69e3e5f67b5cefb59543a701553a1b09
      https://github.com/llvm/llvm-project/commit/3848baec69e3e5f67b5cefb59543a701553a1b09
  Author: Jacques Pienaar <jpienaar at google.com>
  Date:   2019-09-25 (Wed, 25 Sep 2019)

  Changed paths:
    M mlir/test/AffineOps/memref-stride-calculation.mlir
    M mlir/test/lib/Transforms/TestMemRefStrideCalculation.cpp

  Log Message:
  -----------
  Emit function name being tested in TestMemRefStrideCalculation

Bring back CHECK-LABEL post

PiperOrigin-RevId: 271166428


  Commit: a2bce652af5ed78ff2463cfe927f880e8bb54b49
      https://github.com/llvm/llvm-project/commit/a2bce652af5ed78ff2463cfe927f880e8bb54b49
  Author: Kazuaki Ishizaki <kiszk at users.noreply.github.com>
  Date:   2019-09-25 (Wed, 25 Sep 2019)

  Changed paths:
    M mlir/g3doc/Canonicalization.md
    M mlir/g3doc/DeclarativeRewrites.md
    M mlir/g3doc/DefiningAttributesAndTypes.md
    M mlir/g3doc/DeveloperGuide.md
    M mlir/g3doc/Dialects/Affine.md
    M mlir/g3doc/Dialects/LLVM.md
    M mlir/g3doc/Dialects/SPIR-V.md
    M mlir/g3doc/Dialects/Vector.md
    M mlir/g3doc/GenericDAGRewriter.md
    M mlir/g3doc/LangRef.md
    M mlir/g3doc/MLIRForGraphAlgorithms.md
    M mlir/g3doc/OpDefinitions.md
    M mlir/g3doc/Quantization.md
    M mlir/g3doc/QuickstartRewrites.md
    M mlir/g3doc/Rationale.md
    M mlir/g3doc/RationaleSimplifiedPolyhedralForm.md
    M mlir/g3doc/TestingGuide.md
    M mlir/g3doc/Tutorials/Linalg/Ch-1.md
    M mlir/g3doc/Tutorials/Linalg/LLVMConversion.md
    M mlir/g3doc/Tutorials/Toy/Ch-1.md

  Log Message:
  -----------
  Minor spelling tweaks

Closes tensorflow/mlir#145

COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/145 from kiszk:spelling_tweaks_g3doc ae9140aab5b797441e880d43e557903585815e40
PiperOrigin-RevId: 271173907


  Commit: ae13c28f3f69843fc1b98d63be42f3b00ce8d2a0
      https://github.com/llvm/llvm-project/commit/ae13c28f3f69843fc1b98d63be42f3b00ce8d2a0
  Author: Lei Zhang <antiagainst at google.com>
  Date:   2019-09-25 (Wed, 25 Sep 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/SPIRV/SPIRVArithmeticOps.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVBase.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVGLSLOps.td
    M mlir/lib/Dialect/SPIRV/SPIRVOps.cpp
    M mlir/test/Dialect/SPIRV/Serialization/arithmetic-ops.mlir
    M mlir/test/Dialect/SPIRV/arithmetic-ops.mlir
    M mlir/utils/spirv/gen_spirv_dialect.py

  Log Message:
  -----------
  [spirv] Add SPV_UnaryOp and spv.FNegate

This CL also moves common parsers and printers to the
same section in SPIRVOps.cpp.

PiperOrigin-RevId: 271233546


  Commit: 47a7021cc3b0858e53c52a468b234a3f1a4c4abf
      https://github.com/llvm/llvm-project/commit/47a7021cc3b0858e53c52a468b234a3f1a4c4abf
  Author: Jing Pu <jingpu at google.com>
  Date:   2019-09-25 (Wed, 25 Sep 2019)

  Changed paths:
    M mlir/include/mlir/Transforms/ViewRegionGraph.h
    M mlir/lib/Transforms/ViewRegionGraph.cpp

  Log Message:
  -----------
  Change the return type of createPrintCFGGraphPass to match other passes.

PiperOrigin-RevId: 271252404


  Commit: 6f0e65441c5cd018e8b0ad5c340435c0ee57eea1
      https://github.com/llvm/llvm-project/commit/6f0e65441c5cd018e8b0ad5c340435c0ee57eea1
  Author: Mahesh Ravishankar <ravishankarm at google.com>
  Date:   2019-09-25 (Wed, 25 Sep 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/SPIRV/SPIRVBase.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVOps.td
    M mlir/lib/Dialect/SPIRV/SPIRVOps.cpp
    A mlir/test/Dialect/SPIRV/Serialization/cast-ops.mlir
    M mlir/test/Dialect/SPIRV/ops.mlir

  Log Message:
  -----------
  Add spv.Bitcast operation to SPIR-V dialect

Support the OpBitcast instruction of SPIR-V using the spv.Bitcast
operation. The semantics implemented in the dialect differ from the
SPIR-V spec in that the dialect does not allow conversion to/from
pointer types from/to non-pointer types.

PiperOrigin-RevId: 271255957


  Commit: 94298cea933991b29dcb7f340725bc25e78cebcf
      https://github.com/llvm/llvm-project/commit/94298cea933991b29dcb7f340725bc25e78cebcf
  Author: Lei Zhang <antiagainst at google.com>
  Date:   2019-09-25 (Wed, 25 Sep 2019)

  Changed paths:
    M mlir/lib/Dialect/Linalg/Transforms/LowerToLLVMDialect.cpp
    M mlir/lib/Dialect/SPIRV/Serialization/Deserializer.cpp
    M mlir/lib/TableGen/Pattern.cpp
    M mlir/tools/mlir-tblgen/SPIRVUtilsGen.cpp

  Log Message:
  -----------
  Remove unused variables and methods to address compiler warnings

PiperOrigin-RevId: 271256784


  Commit: 116dac00baa6870aec2a2b469b2d6f95c2fbb316
      https://github.com/llvm/llvm-project/commit/116dac00baa6870aec2a2b469b2d6f95c2fbb316
  Author: Christian Sigg <csigg at google.com>
  Date:   2019-09-26 (Thu, 26 Sep 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/GPU/GPUOps.td
    M mlir/lib/Conversion/GPUToNVVM/LowerGpuOpsToNVVMOps.cpp
    M mlir/test/Conversion/GPUToNVVM/gpu-to-nvvm.mlir
    M mlir/test/Dialect/GPU/ops.mlir
    A mlir/test/mlir-cuda-runner/all-reduce.mlir

  Log Message:
  -----------
  Add AllReduceOp to GPU dialect with lowering to NVVM.

The reduction operation is currently fixed to "add", and the scope is fixed to "workgroup".

The implementation is currently limited to sizes that are multiple 32 (warp size) and no larger than 1024.

PiperOrigin-RevId: 271290265


  Commit: 99be3351b874444498c03a87e2aeec6f2f8c208d
      https://github.com/llvm/llvm-project/commit/99be3351b874444498c03a87e2aeec6f2f8c208d
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2019-09-26 (Thu, 26 Sep 2019)

  Changed paths:
    M mlir/lib/Support/JitRunner.cpp
    M mlir/test/mlir-cpu-runner/simple.mlir
    M mlir/tools/mlir-cpu-runner/CMakeLists.txt

  Log Message:
  -----------
  Drop support for memrefs from JitRunner

The support for functions taking and returning memrefs of floats was introduced
in the first version of the runner, created before MLIR had reliable lowering
of allocation/deallocation to library calls.  It forcibly runs MLIR
transformation convering affine, loop and standard dialects into the LLVM
dialect, unlike the other runner flows that accept the LLVM dialect directly.
Memref support leads to more complex layering and is generally fragile.  Drop
it in favor of functions returning a scalar, or library-based function calls to
print memrefs and other data structures.

PiperOrigin-RevId: 271330839


  Commit: 445232df0b43cd8a6fdf34392626c61f819c94f2
      https://github.com/llvm/llvm-project/commit/445232df0b43cd8a6fdf34392626c61f819c94f2
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2019-09-26 (Thu, 26 Sep 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/Linalg/Passes.h
    M mlir/lib/Dialect/Linalg/Analysis/DependenceAnalysis.cpp
    M mlir/lib/Dialect/Linalg/CMakeLists.txt
    M mlir/lib/Dialect/Linalg/Transforms/Fusion.cpp
    M mlir/test/Dialect/Linalg/fusion-2-level.mlir
    M mlir/test/Dialect/Linalg/fusion.mlir

  Log Message:
  -----------
  Decouple tiling from fusion in Linalg.

This CL modifies the linalg-fusion pass such that it does not tile anymore as part of the pass. Tiling is a separate concern that enables linalg fusion but should happen before.
This makes fusion more composable with other decisions.
In particular the fusion pass now becomes greedy and only applies the transformation on a best-effort basis.

This should also let fusion work in a multi-hop fashion with chains of producer/consumers.

Since the fusion pass does not perform tiling anymore, tests are rewritten to be in pretiled form and make the intent of the test clearer (albeit more verbose).

PiperOrigin-RevId: 271357741


  Commit: 19841775d4c18385379b7fcec52b05e58b82026b
      https://github.com/llvm/llvm-project/commit/19841775d4c18385379b7fcec52b05e58b82026b
  Author: Jacques Pienaar <jpienaar at google.com>
  Date:   2019-09-26 (Thu, 26 Sep 2019)

  Changed paths:
    M mlir/tools/mlir-tblgen/RewriterGen.cpp

  Log Message:
  -----------
  Make result ops generated output deterministic

Sort the result ops reported in lexographical order.

PiperOrigin-RevId: 271426258


  Commit: 7385d8789560a392971c60426c7d17569551bd32
      https://github.com/llvm/llvm-project/commit/7385d8789560a392971c60426c7d17569551bd32
  Author: Jacques Pienaar <jpienaar at google.com>
  Date:   2019-09-26 (Thu, 26 Sep 2019)

  Changed paths:
    M mlir/test/mlir-cpu-runner/linalg_integration_test.mlir
    M mlir/test/mlir-cpu-runner/simple.mlir

  Log Message:
  -----------
  Disable failing tests

PiperOrigin-RevId: 271460509


  Commit: fee40fef5c37fee2b398d4d6ec28958bf5c0c0f5
      https://github.com/llvm/llvm-project/commit/fee40fef5c37fee2b398d4d6ec28958bf5c0c0f5
  Author: Deven Desai <36858332+deven-amd at users.noreply.github.com>
  Date:   2019-09-27 (Fri, 27 Sep 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/LLVMIR/CMakeLists.txt
    A mlir/include/mlir/Dialect/LLVMIR/ROCDLDialect.h
    A mlir/include/mlir/Dialect/LLVMIR/ROCDLOps.td
    A mlir/include/mlir/Target/ROCDLIR.h
    M mlir/lib/Dialect/LLVMIR/CMakeLists.txt
    A mlir/lib/Dialect/LLVMIR/IR/ROCDLDialect.cpp
    M mlir/lib/Target/CMakeLists.txt
    A mlir/lib/Target/LLVMIR/ConvertToROCDLIR.cpp
    A mlir/test/Dialect/LLVMIR/rocdl.mlir
    A mlir/test/Target/rocdl.mlir
    M mlir/tools/mlir-opt/CMakeLists.txt
    M mlir/tools/mlir-translate/CMakeLists.txt

  Log Message:
  -----------
  [ROCm] Adding ROCDL Dialect.

This commit introduces the ROCDL Dialect (i.e. the ROCDL ops + the code to lower those ROCDL ops to LLWM intrinsics/functions). Think of ROCDL Dialect as analogous to the NVVM Dialect, but for AMD GPUs. This patch contains just the essentials needed to get a simple example up and running. We expect to make further additions to the ROCDL Dialect.

This is the first of 3 commits, the follow-up will be:
 * add a pass that lowers GPU Dialect to ROCDL Dialect
 * add a "mlir-rocm-runner" utility

Closes tensorflow/mlir#146

COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/146 from deven-amd:deven-rocdl-dialect e78e8005c75a78912631116c78dc844fcc4b0de9
PiperOrigin-RevId: 271511259


  Commit: 18f4a37836a2de53b043053239b825bb2a3282dd
      https://github.com/llvm/llvm-project/commit/18f4a37836a2de53b043053239b825bb2a3282dd
  Author: Kazuaki Ishizaki <kiszk at users.noreply.github.com>
  Date:   2019-09-27 (Fri, 27 Sep 2019)

  Changed paths:
    M mlir/g3doc/Dialects/Affine.md
    M mlir/g3doc/Dialects/Vector.md
    M mlir/g3doc/LangRef.md
    M mlir/g3doc/OpDefinitions.md
    M mlir/g3doc/Tutorials/Toy/Ch-1.md
    M mlir/g3doc/WritingAPass.md

  Log Message:
  -----------
  Fix missing links in the documentation

Closes tensorflow/mlir#149

COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/149 from kiszk:missing_links_g3doc 5f98bc279649d54ea3dcf9fe0e17be6ad6d6cb8f
PiperOrigin-RevId: 271568274


  Commit: e39b5a19ba2e5ed89975c1906ae2994b4d70cca8
      https://github.com/llvm/llvm-project/commit/e39b5a19ba2e5ed89975c1906ae2994b4d70cca8
  Author: Denis Khalikov <khalikov.denis at huawei.com>
  Date:   2019-09-27 (Fri, 27 Sep 2019)

  Changed paths:
    M mlir/g3doc/OpDefinitions.md

  Log Message:
  -----------
  Fix Documentation OpDefinitions.md

Add missing semicolon for the builders example.

Closes tensorflow/mlir#150

COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/150 from denis0x0D:sandbox/doc_fix 07e3680e678bf141a70af7747136e9fde7b4cc0a
PiperOrigin-RevId: 271568527


  Commit: 6543e99fe51b9077d8185ba9741770adc5f7cde5
      https://github.com/llvm/llvm-project/commit/6543e99fe51b9077d8185ba9741770adc5f7cde5
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2019-09-27 (Fri, 27 Sep 2019)

  Changed paths:
    M mlir/lib/Support/JitRunner.cpp
    M mlir/test/mlir-cpu-runner/linalg_integration_test.mlir
    M mlir/test/mlir-cpu-runner/simple.mlir

  Log Message:
  -----------
  Fix JitRunner.cpp Error creation pattern and reactivate tests.

linalg_integration_test.mlir and simple.mlir were temporarily disabled due to an OSS-only failure.

The issue is that, once created, an llvm::Error must be explicitly checked before it can be discarded or overwritten.

This CL fixes the issue and reenable the test.

PiperOrigin-RevId: 271589651


  Commit: ddf737c5da728f25c5e0413bc737d04b2d92df96
      https://github.com/llvm/llvm-project/commit/ddf737c5da728f25c5e0413bc737d04b2d92df96
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2019-09-27 (Fri, 27 Sep 2019)

  Changed paths:
    M mlir/examples/Linalg/Linalg3/Execution.cpp
    M mlir/include/mlir/Conversion/StandardToLLVM/ConvertStandardToLLVM.h
    M mlir/include/mlir/Transforms/DialectConversion.h
    M mlir/lib/Conversion/GPUToCUDA/ConvertLaunchFuncToCudaCalls.cpp
    M mlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp
    M mlir/lib/Dialect/GPU/IR/GPUDialect.cpp
    M mlir/lib/Transforms/DialectConversion.cpp
    M mlir/test/Conversion/StandardToLLVM/convert-argattrs.mlir
    M mlir/test/Conversion/StandardToLLVM/convert-funcs.mlir
    M mlir/test/Conversion/StandardToLLVM/convert-memref-ops.mlir
    M mlir/test/Conversion/StandardToLLVM/standard-to-llvm.mlir
    M mlir/test/Dialect/GPU/invalid.mlir
    M mlir/test/Examples/Linalg/Linalg1.mlir
    M mlir/tools/mlir-cuda-runner/cuda-runtime-wrappers.cpp

  Log Message:
  -----------
  Promote MemRefDescriptor to a pointer to struct when passing function boundaries in LLVMLowering.

The strided MemRef RFC discusses a normalized descriptor and interaction with library calls (https://groups.google.com/a/tensorflow.org/forum/#!topic/mlir/MaL8m2nXuio).
Lowering of nested LLVM structs as value types does not play nicely with externally compiled C/C++ functions due to ABI issues.
Solving the ABI problem generally is a very complex problem and most likely involves taking
a dependence on clang that we do not want atm.

A simple workaround is to pass pointers to memref descriptors at function boundaries, which this CL implement.

PiperOrigin-RevId: 271591708


  Commit: 74eabdd14eb3ed697d6dc4d72c3423ec81dd80f4
      https://github.com/llvm/llvm-project/commit/74eabdd14eb3ed697d6dc4d72c3423ec81dd80f4
  Author: Uday Bondhugula <udayb at iisc.ac.in>
  Date:   2019-09-27 (Fri, 27 Sep 2019)

  Changed paths:
    M mlir/g3doc/Rationale.md
    M mlir/include/mlir/Analysis/NestedMatcher.h
    M mlir/include/mlir/Dialect/AffineOps/AffineOps.h
    M mlir/include/mlir/Dialect/StandardOps/Ops.td
    M mlir/lib/Dialect/AffineOps/AffineOps.cpp
    M mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
    M mlir/lib/Dialect/StandardOps/Ops.cpp
    M mlir/lib/Transforms/LoopTiling.cpp
    M mlir/lib/Transforms/LowerAffine.cpp
    M mlir/lib/Transforms/MaterializeVectors.cpp
    M mlir/lib/Transforms/Utils/LoopFusionUtils.cpp
    M mlir/lib/Transforms/Utils/LoopUtils.cpp
    M mlir/test/IR/core-ops.mlir

  Log Message:
  -----------
  NFC - clean up op accessor usage, std.load/store op verify, other stale info

- also remove stale terminology/references in docs

Signed-off-by: Uday Bondhugula <uday at polymagelabs.com>

Closes tensorflow/mlir#148

COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/148 from bondhugula:cleanup e846b641a3c2936e874138aff480a23cdbf66591
PiperOrigin-RevId: 271618279


  Commit: bc4984e4f7c40ae9a51c84bcd3c4bb4c876b0b13
      https://github.com/llvm/llvm-project/commit/bc4984e4f7c40ae9a51c84bcd3c4bb4c876b0b13
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2019-09-27 (Fri, 27 Sep 2019)

  Changed paths:
    M mlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp

  Log Message:
  -----------
  Add TODO to revisit coupling of CallOp to MemRefType lowering

PiperOrigin-RevId: 271619132


  Commit: b569c969f0e3aec63f13b97b99a05f70a17867ad
      https://github.com/llvm/llvm-project/commit/b569c969f0e3aec63f13b97b99a05f70a17867ad
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2019-09-27 (Fri, 27 Sep 2019)

  Changed paths:
    M mlir/test/Conversion/StandardToLLVM/convert-funcs.mlir
    M mlir/test/Conversion/StandardToLLVM/convert-memref-ops.mlir
    M mlir/test/Conversion/StandardToLLVM/standard-to-llvm.mlir
    M mlir/test/Examples/Linalg/Linalg1.mlir

  Log Message:
  -----------
  Remove spurious debug spew in tests

PiperOrigin-RevId: 271624731


  Commit: 5f8dff936b3015f161537a65b5e64a5f93cb2322
      https://github.com/llvm/llvm-project/commit/5f8dff936b3015f161537a65b5e64a5f93cb2322
  Author: Yanan Cao <ycao at google.com>
  Date:   2019-09-27 (Fri, 27 Sep 2019)

  Changed paths:
    M mlir/lib/IR/AsmPrinter.cpp

  Log Message:
  -----------
  Append a newline when dumping a Value.

This is more consistent with other dump methods. Otherwise successive Value dumps are concatenated in same line, hurting readability.

PiperOrigin-RevId: 271669846


  Commit: e7c3ca92f846fd757fd755b2fa0c908bb1775b1b
      https://github.com/llvm/llvm-project/commit/e7c3ca92f846fd757fd755b2fa0c908bb1775b1b
  Author: Geoffrey Martin-Noble <gcmn at google.com>
  Date:   2019-09-27 (Fri, 27 Sep 2019)

  Changed paths:
    M mlir/include/mlir/IR/OpBase.td
    M mlir/test/lib/TestDialect/TestOps.td

  Log Message:
  -----------
  Tablegen helpers for accessing properties of shaped types

Tablegen's lack of functions continues to be annoying

PiperOrigin-RevId: 271680947


  Commit: c57f202c8cbb14f3f8a403056c56011cd10f93c9
      https://github.com/llvm/llvm-project/commit/c57f202c8cbb14f3f8a403056c56011cd10f93c9
  Author: Jacques Pienaar <jpienaar at google.com>
  Date:   2019-09-28 (Sat, 28 Sep 2019)

  Changed paths:
    M mlir/include/mlir/IR/Operation.h
    M mlir/lib/IR/Operation.cpp
    M mlir/lib/Parser/Parser.cpp
    M mlir/lib/Transforms/DialectConversion.cpp
    M mlir/unittests/IR/OperationSupportTest.cpp

  Log Message:
  -----------
  Switch explicit create methods to match generated build's order

The generated build methods have result type before the arguments (operands and attributes, which are also now adjacent in the explicit create method). This also results in changing the create method's ordering to match most build method's ordering.

PiperOrigin-RevId: 271755054


  Commit: b6cec098f930932a557a3db6a8a9cab65e27e62a
      https://github.com/llvm/llvm-project/commit/b6cec098f930932a557a3db6a8a9cab65e27e62a
  Author: Uday Bondhugula <udayb at iisc.ac.in>
  Date:   2019-09-29 (Sun, 29 Sep 2019)

  Changed paths:
    M mlir/g3doc/Dialects/Standard.md

  Log Message:
  -----------
  Fix syntax of 'call' and 'splat' ops

- fix missing return value syntax on call / splat ops
- reflow cond_br / store op syntax

Closes tensorflow/mlir#161

COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/161 from bondhugula:patch-1 2beb5bdcb387a5e7c52438985f79e2987d3b3ebe
PiperOrigin-RevId: 271876453


  Commit: 0db0fe3c0396f1b43ea7fd7588d01a5d947350af
      https://github.com/llvm/llvm-project/commit/0db0fe3c0396f1b43ea7fd7588d01a5d947350af
  Author: Roberto Rosmaninho <robertogomes at dcc.ufmg.br>
  Date:   2019-09-29 (Sun, 29 Sep 2019)

  Changed paths:
    M mlir/g3doc/Tutorials/Toy/Ch-2.md

  Log Message:
  -----------
  Fix a typo in Toy Chapter 2 tutorial documentation

Closes tensorflow/mlir#155

COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/155 from Robertorosmaninho:patch-1 232ac4e1253948c7f3150515e93abe50fcec2f96
PiperOrigin-RevId: 271876515


  Commit: f45a39256603a2cb7f6818cc6a07d9029bf703d2
      https://github.com/llvm/llvm-project/commit/f45a39256603a2cb7f6818cc6a07d9029bf703d2
  Author: Uday Bondhugula <udayb at iisc.ac.in>
  Date:   2019-09-29 (Sun, 29 Sep 2019)

  Changed paths:
    M mlir/g3doc/Rationale.md

  Log Message:
  -----------
  update Rationale.md - remove outdated info

- removing outdated/confusing info
- the affine dialect is missing documentation on
  affine.load/affine.store; the references herein have to be updated
  once that's updated.

Signed-off-by: Uday Bondhugula <uday at polymagelabs.com>

Closes tensorflow/mlir#159

COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/159 from bondhugula:doc 86dd794f2d0d7fd097dde5764c62eb406ed4f910
PiperOrigin-RevId: 271876525


  Commit: e5a43186d38c239380c22c2629dff748677c4bd1
      https://github.com/llvm/llvm-project/commit/e5a43186d38c239380c22c2629dff748677c4bd1
  Author: Jacques Pienaar <jpienaar at google.com>
  Date:   2019-09-29 (Sun, 29 Sep 2019)

  Changed paths:
    M mlir/include/mlir/Analysis/CMakeLists.txt
    A mlir/include/mlir/Analysis/InferTypeOpInterface.h
    A mlir/include/mlir/Analysis/InferTypeOpInterface.td
    M mlir/lib/Analysis/CMakeLists.txt
    A mlir/lib/Analysis/InferTypeOpInterface.cpp
    M mlir/test/lib/TestDialect/TestDialect.cpp
    M mlir/test/lib/TestDialect/TestDialect.h
    M mlir/test/lib/TestDialect/TestOps.td
    M mlir/test/lib/TestDialect/TestPatterns.cpp
    A mlir/test/mlir-tblgen/return-types.mlir

  Log Message:
  -----------
  Add InferTypeOpTrait & enable generating its member function definition

Use OpInterfaces to add an interface for ops defining a return type function.

This change does not use this trait in any meaningful way, I'll use it in a
follow up to generalize and unify some of the op type traits/constraints. Also,
currently the infer type function can only be manually specified in C++, that should rather be the fallback in future.

PiperOrigin-RevId: 271883746


  Commit: 3d9679bde4de0250207ee6282a5359df41e54e75
      https://github.com/llvm/llvm-project/commit/3d9679bde4de0250207ee6282a5359df41e54e75
  Author: Christian Sigg <csigg at google.com>
  Date:   2019-09-30 (Mon, 30 Sep 2019)

  Changed paths:
    M mlir/lib/Conversion/GPUToNVVM/LowerGpuOpsToNVVMOps.cpp

  Log Message:
  -----------
  Switch comments from GPU dialect terms to CUDA terms (NFC).

local workgroup -> block, subgroup -> warp, invocation -> thread.

PiperOrigin-RevId: 271946342


  Commit: 1ce524623cd6150e7938e42c9301720af198fde5
      https://github.com/llvm/llvm-project/commit/1ce524623cd6150e7938e42c9301720af198fde5
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2019-09-30 (Mon, 30 Sep 2019)

  Changed paths:
    M mlir/include/mlir/IR/StandardTypes.h
    M mlir/lib/IR/StandardTypes.cpp
    M mlir/test/AffineOps/memref-stride-calculation.mlir
    M mlir/test/lib/Transforms/TestMemRefStrideCalculation.cpp

  Log Message:
  -----------
  Fix MemRefType::getStrides corner case

MemRefType::getStrides uses AffineExpr::walk which operates in post-order from the leaves. In order to compute strides properly, it needs to escape on terminal nodes and analyze binary ops only. This did not work for AffineExpr that consist of a single term (i.e. without a binary op).

This CL fixes the corner case and adds relevant tests.

PiperOrigin-RevId: 271975746


  Commit: a932f0786c25db7607470925021758b40cbb9835
      https://github.com/llvm/llvm-project/commit/a932f0786c25db7607470925021758b40cbb9835
  Author: Jacques Pienaar <jpienaar at google.com>
  Date:   2019-09-30 (Mon, 30 Sep 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td

  Log Message:
  -----------
  Use MaybeAlign when setting alignment

PiperOrigin-RevId: 272000548


  Commit: 2f7bb1e25f1be3ee5c6dce72aa1eced4c823f123
      https://github.com/llvm/llvm-project/commit/2f7bb1e25f1be3ee5c6dce72aa1eced4c823f123
  Author: Mahesh Ravishankar <ravishankarm at google.com>
  Date:   2019-09-30 (Mon, 30 Sep 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/SPIRV/SPIRVBase.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVLogicalOps.td
    M mlir/lib/Dialect/SPIRV/SPIRVOps.cpp
    M mlir/test/Dialect/SPIRV/ops.mlir
    M mlir/utils/spirv/define_inst.sh
    M mlir/utils/spirv/gen_spirv_dialect.py

  Log Message:
  -----------
  Add support for Logical Ops in SPIR-V dialect

Add operations corresponding to OpLogicalAnd, OpLogicalNot,
OpLogicalEqual, OpLogicalNotEqual and OpLogicalOr instructions in
SPIR-V dialect. This needs changes to class hierarchy in SPIR-V
TableGen files to split SPIRVLogicalOp into SPIRVLogicalUnaryOp and
SPIRVLogicalBinaryOp. All derived classes of SPIRVLogicalOp are
updated accordingly.

Update the spirv dialect generation script to
1) Allow specifying base class to use for instruction spec generation
and file name to generate the specification in separately.
2) Use the existing descriptions for operations.
3) Update define_inst.sh to also invoke define_opcode.sh to also
define the corresponding SPIR-V instruction opcode enum.

PiperOrigin-RevId: 272014876


  Commit: 2713f3638e5905f5fb938a84fadd950040f4bbf9
      https://github.com/llvm/llvm-project/commit/2713f3638e5905f5fb938a84fadd950040f4bbf9
  Author: Lei Zhang <antiagainst at google.com>
  Date:   2019-09-30 (Mon, 30 Sep 2019)

  Changed paths:
    M mlir/g3doc/DeclarativeRewrites.md

  Log Message:
  -----------
  [DRR] Explain result type deduction in doc

PiperOrigin-RevId: 272031467


  Commit: 923b33ea16ac8734bc7430ccb4cc4169d0bce785
      https://github.com/llvm/llvm-project/commit/923b33ea16ac8734bc7430ccb4cc4169d0bce785
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2019-09-30 (Mon, 30 Sep 2019)

  Changed paths:
    M mlir/examples/Linalg/Linalg1/lib/ConvertToLLVMDialect.cpp
    M mlir/examples/Linalg/Linalg3/Execution.cpp
    M mlir/g3doc/ConversionToLLVMDialect.md
    M mlir/include/mlir/IR/StandardTypes.h
    M mlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp
    M mlir/lib/IR/StandardTypes.cpp
    M mlir/test/Conversion/StandardToLLVM/convert-argattrs.mlir
    M mlir/test/Conversion/StandardToLLVM/convert-memref-ops.mlir
    M mlir/test/Conversion/StandardToLLVM/convert-to-llvmir.mlir
    M mlir/test/Conversion/StandardToLLVM/standard-to-llvm.mlir
    M mlir/test/Examples/Linalg/Linalg1.mlir
    M mlir/test/lib/Transforms/TestMemRefStrideCalculation.cpp
    M mlir/tools/mlir-cuda-runner/cuda-runtime-wrappers.cpp

  Log Message:
  -----------
  Normalize MemRefType lowering to LLVM as strided MemRef descriptor

This CL finishes the implementation of the lowering part of the [strided memref RFC](https://groups.google.com/a/tensorflow.org/forum/#!topic/mlir/MaL8m2nXuio).

Strided memrefs correspond conceptually to the following templated C++ struct:
```
template <typename Elem, size_t Rank>
struct {
  Elem *ptr;
  int64_t offset;
  int64_t sizes[Rank];
  int64_t strides[Rank];
};
```
The linearization procedure for address calculation for strided memrefs is the same as for linalg views:
`base_offset + SUM_i index_i * stride_i`.

The following CL will unify Linalg and Standard by removing !linalg.view in favor of strided memrefs.

PiperOrigin-RevId: 272033399


  Commit: c97a9320a0eb20c7cba5bb23e4ff5ca46cadd4e0
      https://github.com/llvm/llvm-project/commit/c97a9320a0eb20c7cba5bb23e4ff5ca46cadd4e0
  Author: Ben Vanik <benvanik at google.com>
  Date:   2019-09-30 (Mon, 30 Sep 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/SPIRV/SPIRVBase.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVGLSLOps.td

  Log Message:
  -----------
  Adding some missing SPIR-V core and GLSL extended ops.

PiperOrigin-RevId: 272039887


  Commit: 8e67039e31dc77f4762173c45052928983d0cb4e
      https://github.com/llvm/llvm-project/commit/8e67039e31dc77f4762173c45052928983d0cb4e
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-09-30 (Mon, 30 Sep 2019)

  Changed paths:
    M mlir/include/mlir/IR/OpDefinition.h

  Log Message:
  -----------
  NFC: Change `classof` on registered operations to use pointer comparison.

The current implementation always uses string comparison, but if the operation is registered the AbstractOperation instance can be used to provide faster pointer comparison.

PiperOrigin-RevId: 272041333


  Commit: 0b81eb928b3882ccb63e38ef26348fd0fb75c2cd
      https://github.com/llvm/llvm-project/commit/0b81eb928b3882ccb63e38ef26348fd0fb75c2cd
  Author: Jacques Pienaar <jpienaar at google.com>
  Date:   2019-09-30 (Mon, 30 Sep 2019)

  Changed paths:
    M mlir/g3doc/OpDefinitions.md
    M mlir/include/mlir/IR/OpBase.td
    A mlir/include/mlir/TableGen/OpInterfaces.h
    M mlir/include/mlir/TableGen/OpTrait.h
    A mlir/lib/TableGen/OpInterfaces.cpp
    M mlir/lib/TableGen/OpTrait.cpp
    M mlir/test/lib/TestDialect/TestOps.td
    M mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
    M mlir/tools/mlir-tblgen/OpInterfacesGen.cpp

  Log Message:
  -----------
  Enable autogenerating OpInterface method declarations

Add DeclareOpInterfaceFunctions to enable specifying whether OpInterfaceMethods
for an OpInterface should be generated automatically. This avoids needing to
declare the extra methods, while also allowing adding function declaration by way of trait/inheritance.

Most of this change is mechanical/extracting classes to be reusable.

PiperOrigin-RevId: 272042739


  Commit: f015b020f3dc4cfddd7fee9b5dd1d8474bdc98bc
      https://github.com/llvm/llvm-project/commit/f015b020f3dc4cfddd7fee9b5dd1d8474bdc98bc
  Author: Jacques Pienaar <jpienaar at google.com>
  Date:   2019-09-30 (Mon, 30 Sep 2019)

  Changed paths:
    M mlir/lib/TableGen/CMakeLists.txt

  Log Message:
  -----------
  Add missing file from cmakelist

PiperOrigin-RevId: 272054623


  Commit: 5ef8b2d31e708b7fd87715b4cc94233501651cab
      https://github.com/llvm/llvm-project/commit/5ef8b2d31e708b7fd87715b4cc94233501651cab
  Author: Ben Vanik <benvanik at google.com>
  Date:   2019-09-30 (Mon, 30 Sep 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/SPIRV/SPIRVGLSLOps.td

  Log Message:
  -----------
  Adding signed integer ops for abs, sign, min, and max in the GLSL extension.

PiperOrigin-RevId: 272067942


  Commit: 219421ece7426d7e28c81c98b17bc3a6da77f0dd
      https://github.com/llvm/llvm-project/commit/219421ece7426d7e28c81c98b17bc3a6da77f0dd
  Author: Denis Khalikov <khalikov.denis at huawei.com>
  Date:   2019-09-30 (Mon, 30 Sep 2019)

  Changed paths:
    M mlir/lib/Dialect/SPIRV/SPIRVDialect.cpp
    M mlir/lib/Dialect/SPIRV/SPIRVTypes.cpp
    M mlir/test/Dialect/SPIRV/types.mlir

  Log Message:
  -----------
  [spirv] Add array length check.

According to the SPIR-V spec:
"Length is the number of elements in the array. It must be at least 1."

Closes tensorflow/mlir#160

COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/160 from denis0x0D:sandbox/array_len 0840dc0986ad0088a3aa7d5d8d3e97d489377ed9
PiperOrigin-RevId: 272094669


  Commit: fb41df9c4adb8249660623480a77e31146eb8d85
      https://github.com/llvm/llvm-project/commit/fb41df9c4adb8249660623480a77e31146eb8d85
  Author: MLIR Team <no-reply at google.com>
  Date:   2019-09-30 (Mon, 30 Sep 2019)

  Changed paths:
    M mlir/g3doc/Rationale.md

  Log Message:
  -----------
  Format markdown list.

PiperOrigin-RevId: 272095611


  Commit: 1c649d57857d866daf2439b50c17eb835754e2dc
      https://github.com/llvm/llvm-project/commit/1c649d57857d866daf2439b50c17eb835754e2dc
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-09-30 (Mon, 30 Sep 2019)

  Changed paths:
    M mlir/include/mlir/Pass/PassInstrumentation.h
    M mlir/lib/Pass/Pass.cpp
    M mlir/lib/Pass/PassTiming.cpp

  Log Message:
  -----------
  Pass the pointer of the parent pipeline collection pass to PassInstrumentation::run*Pipeline.

For the cases where there are multiple levels of nested pass managers, the parent thread ID is not enough to distinguish the parent of a given pass pipeline. Passing in the parent pass gives an exact anchor point.

PiperOrigin-RevId: 272105461


  Commit: 66bcd05bb7ed1653d3dc1619c20dcaa858471c9f
      https://github.com/llvm/llvm-project/commit/66bcd05bb7ed1653d3dc1619c20dcaa858471c9f
  Author: MLIR Team <no-reply at google.com>
  Date:   2019-09-30 (Mon, 30 Sep 2019)

  Changed paths:
    M mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp

  Log Message:
  -----------
  Fold away reduction over 0 dimensions.

PiperOrigin-RevId: 272113564


  Commit: f479f816f99aea10f1f2d09282b90c7695a8b0c6
      https://github.com/llvm/llvm-project/commit/f479f816f99aea10f1f2d09282b90c7695a8b0c6
  Author: Christian Sigg <csigg at google.com>
  Date:   2019-09-30 (Mon, 30 Sep 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
    M mlir/test/Target/llvmir.mlir

  Log Message:
  -----------
  Add integer shift ops to LLVM dialect.

PiperOrigin-RevId: 272140049


  Commit: 8503ffbe3af8a7b9c30f668353054a3721263374
      https://github.com/llvm/llvm-project/commit/8503ffbe3af8a7b9c30f668353054a3721263374
  Author: Christian Sigg <csigg at google.com>
  Date:   2019-10-01 (Tue, 01 Oct 2019)

  Changed paths:
    M mlir/lib/IR/Operation.cpp
    M mlir/test/IR/traits.mlir
    M mlir/test/lib/TestDialect/TestOps.td

  Log Message:
  -----------
  Add verification error message for ops that require at least one operand or result.

PiperOrigin-RevId: 272153634


  Commit: 1129931a625b19b57800c938f528b53f9ce737c1
      https://github.com/llvm/llvm-project/commit/1129931a625b19b57800c938f528b53f9ce737c1
  Author: Christian Sigg <csigg at google.com>
  Date:   2019-10-01 (Tue, 01 Oct 2019)

  Changed paths:
    M mlir/lib/Conversion/GPUToNVVM/LowerGpuOpsToNVVMOps.cpp
    M mlir/test/mlir-cuda-runner/all-reduce.mlir

  Log Message:
  -----------
  Change all_reduce lowering to support 2D and 3D blocks.

Perform second reduce only with first warp. This requires an additional __sync_threads(), but doesn't need special handling when the last warp is small. This simplifies support for block sizes that are not multiple of 32.

Supporting partial warp reduce will be done in a separate CL.

PiperOrigin-RevId: 272168917


  Commit: f8ae7396130d7483b7038fa3639751980e8e5dc4
      https://github.com/llvm/llvm-project/commit/f8ae7396130d7483b7038fa3639751980e8e5dc4
  Author: Lei Zhang <antiagainst at google.com>
  Date:   2019-10-01 (Tue, 01 Oct 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/SPIRV/SPIRVArithmeticOps.td

  Log Message:
  -----------
  [spirv] NFC: rename SPV_ArithmeticOp to SPV_ArithmeticBinaryOp

Also rename SPV_UnaryArithmeticOp to SPV_ArithmeticUnaryOp to be
consistent.

PiperOrigin-RevId: 272173974


  Commit: e36337a998a6be39d65872eab3e3e2291b6518b9
      https://github.com/llvm/llvm-project/commit/e36337a998a6be39d65872eab3e3e2291b6518b9
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2019-10-01 (Tue, 01 Oct 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/Linalg/IR/LinalgBase.td
    M mlir/include/mlir/Dialect/Linalg/IR/LinalgLibraryOps.td
    M mlir/include/mlir/Dialect/Linalg/IR/LinalgOps.h
    M mlir/include/mlir/Dialect/Linalg/IR/LinalgOps.td
    M mlir/include/mlir/Dialect/Linalg/IR/LinalgTraits.h
    M mlir/include/mlir/Dialect/Linalg/IR/LinalgTypes.h
    M mlir/include/mlir/Dialect/Linalg/Utils/Intrinsics.h
    M mlir/include/mlir/Dialect/Linalg/Utils/Utils.h
    M mlir/include/mlir/IR/OpBase.td
    M mlir/include/mlir/IR/StandardTypes.h
    M mlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp
    M mlir/lib/Dialect/Linalg/Analysis/DependenceAnalysis.cpp
    M mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
    M mlir/lib/Dialect/Linalg/IR/LinalgTypes.cpp
    M mlir/lib/Dialect/Linalg/Transforms/Fusion.cpp
    M mlir/lib/Dialect/Linalg/Transforms/LowerToLLVMDialect.cpp
    M mlir/lib/Dialect/Linalg/Transforms/LowerToLoops.cpp
    M mlir/lib/Dialect/Linalg/Transforms/Tiling.cpp
    M mlir/lib/IR/StandardTypes.cpp
    R mlir/test/Dialect/Linalg/canonicalize.mlir
    M mlir/test/Dialect/Linalg/fusion-2-level.mlir
    M mlir/test/Dialect/Linalg/fusion.mlir
    M mlir/test/Dialect/Linalg/invalid.mlir
    M mlir/test/Dialect/Linalg/llvm.mlir
    M mlir/test/Dialect/Linalg/loops.mlir
    M mlir/test/Dialect/Linalg/promote.mlir
    M mlir/test/Dialect/Linalg/roundtrip.mlir
    M mlir/test/Dialect/Linalg/tile.mlir
    M mlir/test/Dialect/Linalg/tile_conv.mlir
    M mlir/test/lib/Transforms/TestMemRefStrideCalculation.cpp
    M mlir/test/mlir-cpu-runner/cblas_interface.cpp
    M mlir/test/mlir-cpu-runner/linalg_integration_test.mlir

  Log Message:
  -----------
  Unify Linalg types by using strided memrefs

This CL finishes the implementation of the Linalg + Affine type unification of the [strided memref RFC](https://groups.google.com/a/tensorflow.org/forum/#!topic/mlir/MaL8m2nXuio).
As a consequence, the !linalg.view type, linalg::DimOp, linalg::LoadOp and linalg::StoreOp can now disappear and Linalg can use standard types everywhere.

PiperOrigin-RevId: 272187165


  Commit: c760f233b30ef3f93dfe3380fb85437460180465
      https://github.com/llvm/llvm-project/commit/c760f233b30ef3f93dfe3380fb85437460180465
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2019-10-01 (Tue, 01 Oct 2019)

  Changed paths:
    M mlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp
    M mlir/test/Conversion/StandardToLLVM/convert-to-llvmir.mlir

  Log Message:
  -----------
  Fix and simplify CallOp/CallIndirectOp to LLVM::CallOp conversion

A recent ABI compatibility change affected the conversion from standard
CallOp/CallIndirectOp to LLVM::CallOp by changing its signature. In order to
analyze the signature, the code was looking up the callee symbol in the module.
This is incorrect since, during the conversion, the module may contain both the
original and the converted function op that have the same symbol name. There is
no strict guarantee on which of the two symbols will be found by the lookup.
The conversion was not failing because the type legalizer converts the LLVM
types to themselves making the original and the converted function signatures
ultimately produce the same type.

Instead of looking up the function signature to get the list of result types,
use the types of the CallOp/CallIndirectOp results which must match those of
the function in valid IR. These types are guaranteed to be the original,
unconverted types when converting the operation. Furthermore, this avoids the
need to perform a lookup of a symbol name in the module which may be expensive.

Finally, propagate attributes as-is from the original op to the converted op
since they share the attribute name for the callee of direct calls and the rest
of attributes are not affected by the conversion. This removes the need for
additional contorsions between direct and indirect calls to extract the name of
the optional callee attribute only to insert it back. This also prevents the
conversion from unintentionally dropping the other attributes of the op.

PiperOrigin-RevId: 272218871


  Commit: 9e6dde3977911628a1f5f531a5462b58b79658ee
      https://github.com/llvm/llvm-project/commit/9e6dde3977911628a1f5f531a5462b58b79658ee
  Author: Eric Schweitz <eric.schweitz at pgroup.com>
  Date:   2019-10-01 (Tue, 01 Oct 2019)

  Changed paths:
    M mlir/include/mlir/Analysis/Dominance.h
    M mlir/lib/Analysis/Dominance.cpp

  Log Message:
  -----------
  Add a pair of hooks to DominanceInfo.

This exposes hooks for accessing internal dominance nodes, and updating the internal DFS numbers.

Closes tensorflow/mlir#151

COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/151 from schweitzpgi:dominance_hooks 69d14214a423b816cbd59feffcacdd02f3b5f921
PiperOrigin-RevId: 272287352


  Commit: 3597711bdd18d21e5f36b7dff9c26c65c7c98452
      https://github.com/llvm/llvm-project/commit/3597711bdd18d21e5f36b7dff9c26c65c7c98452
  Author: Lei Zhang <antiagainst at google.com>
  Date:   2019-10-01 (Tue, 01 Oct 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/SPIRV/SPIRVBase.td
    M mlir/utils/spirv/gen_spirv_dialect.py

  Log Message:
  -----------
  [spirv] Change enum case uniquing in gen_spirv_dialect.py

In SPIR-V we can have multiple symbols corresponding to the same
enum value. This is because when an extension is introduced into
the core spec, its suffix is typically removed, e.g., 'VulkanKHR'
memory model becomes 'Vulkan' memory model in SPIR-V 1.5.

Previously we just keep the first symbol for an enum value. That
symbol is not necessarily a better one. This CL changes to sort
symbols, grouped by enum values, alphabetically and then keep
the first one, which is typically shorter and without the extension
suffix. We also fix up certain ones like HlslSemanticGOOGLE.

PiperOrigin-RevId: 272290363


  Commit: 2b86e27dbd822ee972da8ab71ec1b368302127c0
      https://github.com/llvm/llvm-project/commit/2b86e27dbd822ee972da8ab71ec1b368302127c0
  Author: Jacques Pienaar <jpienaar at google.com>
  Date:   2019-10-02 (Wed, 02 Oct 2019)

  Changed paths:
    M mlir/lib/Transforms/ViewOpGraph.cpp

  Log Message:
  -----------
  Show type even if elementsattr is elided in graph

The type is quite useful for debugging and shouldn't be too large.

PiperOrigin-RevId: 272390311


  Commit: e81b3129b465b3b6a79ad041f27921e80fe69e71
      https://github.com/llvm/llvm-project/commit/e81b3129b465b3b6a79ad041f27921e80fe69e71
  Author: Deven Desai <36858332+deven-amd at users.noreply.github.com>
  Date:   2019-10-02 (Wed, 02 Oct 2019)

  Changed paths:
    A mlir/include/mlir/Conversion/GPUToROCDL/GPUToROCDLPass.h
    M mlir/lib/Conversion/CMakeLists.txt
    A mlir/lib/Conversion/GPUToROCDL/CMakeLists.txt
    A mlir/lib/Conversion/GPUToROCDL/LowerGpuOpsToROCDLOps.cpp
    A mlir/test/Conversion/GPUToROCDL/gpu-to-rocdl.mlir
    M mlir/tools/mlir-opt/CMakeLists.txt

  Log Message:
  -----------
  [ROCm] Adding pass to lower GPU Dialect to ROCDL Dialect.

This is a follow-up to the PRtensorflow/mlir#146 which introduced the ROCDL Dialect. This PR introduces a pass to lower GPU Dialect to the ROCDL Dialect. As with the previous PR, this one builds on the work done by @whchung, and addresses most of the review comments in the original PR.

Closes tensorflow/mlir#154

COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/154 from deven-amd:deven-lower-gpu-to-rocdl 809893e08236da5ab6a38e3459692fa04247773d
PiperOrigin-RevId: 272390729


  Commit: 98594d4dd5fba018c72875e701ad59badd112a29
      https://github.com/llvm/llvm-project/commit/98594d4dd5fba018c72875e701ad59badd112a29
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2019-10-02 (Wed, 02 Oct 2019)

  Changed paths:
    M mlir/tools/mlir-cuda-runner/cuda-runtime-wrappers.cpp

  Log Message:
  -----------
  Replace spurious `long` stride type by int64_t - NFC

PiperOrigin-RevId: 272425434


  Commit: 088f4c502f9fcba5f39d255ff6cdcf2ab050b201
      https://github.com/llvm/llvm-project/commit/088f4c502f9fcba5f39d255ff6cdcf2ab050b201
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2019-10-02 (Wed, 02 Oct 2019)

  Changed paths:
    M mlir/g3doc/Interfaces.md

  Log Message:
  -----------
  Fix example in OpInterfaces documentation

The concept-based polymorphism structure was missing an inheritance link
between the concept and the model. The interface class did not re-export the
base class constructor, which made it unusable with llvm::isa calls. Fix these
and reformat the code around.

PiperOrigin-RevId: 272452062


  Commit: f294e0e513464b97ae1bb2f9532979f8698c441e
      https://github.com/llvm/llvm-project/commit/f294e0e513464b97ae1bb2f9532979f8698c441e
  Author: Lei Zhang <antiagainst at google.com>
  Date:   2019-10-02 (Wed, 02 Oct 2019)

  Changed paths:
    M mlir/g3doc/Dialects/SPIR-V.md
    M mlir/include/mlir/Dialect/SPIRV/SPIRVBase.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVControlFlowOps.td
    M mlir/lib/Dialect/SPIRV/SPIRVOps.cpp
    M mlir/lib/Dialect/SPIRV/Serialization/Deserializer.cpp
    M mlir/lib/Dialect/SPIRV/Serialization/Serializer.cpp
    A mlir/test/Dialect/SPIRV/Serialization/selection.mlir
    M mlir/test/Dialect/SPIRV/control-flow-ops.mlir

  Log Message:
  -----------
  [spirv] Add support for spv.selection

Similar to spv.loop, spv.selection is another op for modelling
SPIR-V structured control flow. It covers both OpBranchConditional
and OpSwitch with OpSelectionMerge.

Instead of having a `spv.SelectionMerge` op to directly model
selection merge instruction for indicating the merge target,
we use regions to delimit the boundary of the selection: the
merge target is the next op following the `spv.selection` op.
This way it's easier to discover all blocks belonging to
the selection and it plays nicer with the MLIR system.

PiperOrigin-RevId: 272475006


  Commit: 9604bb6269bc5ff87c85dad7c8aa4b4f5f0f4696
      https://github.com/llvm/llvm-project/commit/9604bb6269bc5ff87c85dad7c8aa4b4f5f0f4696
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2019-10-02 (Wed, 02 Oct 2019)

  Changed paths:
    M mlir/include/mlir/IR/StandardTypes.h
    M mlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp
    M mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
    M mlir/lib/IR/StandardTypes.cpp
    M mlir/test/Conversion/StandardToLLVM/standard-to-llvm.mlir
    M mlir/test/lib/Transforms/TestMemRefStrideCalculation.cpp

  Log Message:
  -----------
  Extract MemRefType::getStridesAndOffset as a free function and fix dynamic offset determination.

This also adds coverage with a missing test, which uncovered a bug in the conditional for testing whether an offset is dynamic or not.

PiperOrigin-RevId: 272505798


  Commit: 44ef5e5525931ac60ce80f51a575ef7ab22e4da8
      https://github.com/llvm/llvm-project/commit/44ef5e5525931ac60ce80f51a575ef7ab22e4da8
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2019-10-03 (Thu, 03 Oct 2019)

  Changed paths:
    M mlir/lib/IR/StandardTypes.cpp
    M mlir/test/AffineOps/canonicalize.mlir
    M mlir/test/IR/invalid.mlir

  Log Message:
  -----------
  Disallow index types in memrefs.

As specified in the MLIR language reference and rationale documents, `memref`
types should not be allowed to have `index` as element types. As observed in
https://groups.google.com/a/tensorflow.org/forum/#!msg/mlir/P49hVWqTMNc/nW89a4i_AgAJ
this restriction was lifted when canonicalization unit tests for affine
operations were introduced, without sufficient motivation to lift the
restriction itself.  The test in question can be trivially rewritten (return
the value from a function instead of storing it to prevent DCE from removing
the producer operation) and the restriction put back in place.

If `memref<...x index>` is relevant for some use cases, the relaxation of the
type system can be implemented separately with appropriate modifications to the
documentation.

PiperOrigin-RevId: 272607043


  Commit: e0d78eac23898d44171e3e6a3b817c7c76aeb244
      https://github.com/llvm/llvm-project/commit/e0d78eac23898d44171e3e6a3b817c7c76aeb244
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2019-10-03 (Thu, 03 Oct 2019)

  Changed paths:
    M mlir/examples/Linalg/Linalg1/lib/CMakeLists.txt
    M mlir/examples/Linalg/Linalg1/lib/ConvertToLLVMDialect.cpp
    M mlir/examples/Linalg/Linalg3/lib/CMakeLists.txt
    M mlir/examples/Linalg/Linalg3/lib/ConvertToLLVMDialect.cpp
    R mlir/include/mlir/Conversion/ControlFlowToCFG/ConvertControlFlowToCFG.h
    A mlir/include/mlir/Conversion/LoopToStandard/ConvertLoopToStandard.h
    M mlir/lib/Conversion/CMakeLists.txt
    R mlir/lib/Conversion/ControlFlowToCFG/CMakeLists.txt
    R mlir/lib/Conversion/ControlFlowToCFG/ConvertControlFlowToCFG.cpp
    A mlir/lib/Conversion/LoopToStandard/CMakeLists.txt
    A mlir/lib/Conversion/LoopToStandard/ConvertLoopToStandard.cpp
    M mlir/lib/Conversion/StandardToLLVM/CMakeLists.txt
    M mlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp
    M mlir/lib/Dialect/Linalg/Transforms/LowerToLLVMDialect.cpp
    M mlir/test/Conversion/convert-to-cfg.mlir
    M mlir/tools/mlir-cuda-runner/CMakeLists.txt
    M mlir/tools/mlir-opt/CMakeLists.txt

  Log Message:
  -----------
  NFC: rename Conversion/ControlFlowToCFG to Conversion/LoopToStandard

This makes the name of the conversion pass more consistent with the naming
scheme, since it actually converts from the Loop dialect to the Standard
dialect rather than working with arbitrary control flow operations.

PiperOrigin-RevId: 272612112


  Commit: bd4762502c5b76285aa3910209ee16401f392229
      https://github.com/llvm/llvm-project/commit/bd4762502c5b76285aa3910209ee16401f392229
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2019-10-03 (Thu, 03 Oct 2019)

  Changed paths:
    M mlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp

  Log Message:
  -----------
  Add parentheses around boolean operators in assert

This removes a warning and is generally a good practice.

PiperOrigin-RevId: 272613597


  Commit: 8633b6bc8e50697defc91c7debd53768385e51ed
      https://github.com/llvm/llvm-project/commit/8633b6bc8e50697defc91c7debd53768385e51ed
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2019-10-03 (Thu, 03 Oct 2019)

  Changed paths:
    M mlir/include/mlir/IR/Module.h
    M mlir/lib/IR/Module.cpp
    M mlir/test/IR/module-op.mlir

  Log Message:
  -----------
  Give modules a name

Modules are now Ops and, as such, can be nested. They do not produce an SSA
value so there is no possibility to refer to them in the IR. Introduce support
for symbol names attached to the module Op so that it can be referred to using
SymbolRefAttrs. The name is optional, for example the implicit top-level module
does not have a name.

PiperOrigin-RevId: 272671600


  Commit: 0b93c092b620f0d70987061ad67f621b9c69925b
      https://github.com/llvm/llvm-project/commit/0b93c092b620f0d70987061ad67f621b9c69925b
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2019-10-03 (Thu, 03 Oct 2019)

  Changed paths:
    M mlir/g3doc/LangRef.md
    M mlir/include/mlir/IR/Module.h
    M mlir/lib/IR/Module.cpp

  Log Message:
  -----------
  Make Module::getName return Optional<StringRef>

Module names are optional so it makes more sense to take and return an optional
any time the name is involved. Also update the language reference to reflect
the module names.

PiperOrigin-RevId: 272684698


  Commit: 218f0e611a624516da2043e9495bc6c0e2bcd8a5
      https://github.com/llvm/llvm-project/commit/218f0e611a624516da2043e9495bc6c0e2bcd8a5
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2019-10-03 (Thu, 03 Oct 2019)

  Changed paths:
    M mlir/g3doc/LangRef.md
    M mlir/lib/IR/StandardTypes.cpp
    M mlir/lib/Parser/Parser.cpp
    M mlir/lib/Parser/TokenKinds.def
    M mlir/test/AffineOps/memref-stride-calculation.mlir
    M mlir/test/Dialect/Linalg/fusion-2-level.mlir
    M mlir/test/Dialect/Linalg/fusion.mlir
    M mlir/test/Dialect/Linalg/llvm.mlir
    M mlir/test/Dialect/Linalg/loops.mlir
    M mlir/test/Dialect/Linalg/promote.mlir
    M mlir/test/Dialect/Linalg/roundtrip.mlir
    M mlir/test/Dialect/Linalg/tile.mlir
    M mlir/test/Dialect/Linalg/tile_conv.mlir
    M mlir/test/IR/invalid.mlir

  Log Message:
  -----------
  Add syntactic sugar for strided memref parsing.
This CL implements the last remaining bit of the [strided memref proposal](https://groups.google.com/a/tensorflow.org/forum/#!topic/mlir/MaL8m2nXuio).

The syntax is a bit more explicit than what was originally proposed and resembles:
  `memref<?x?xf32, offset: 0 strides: [?, 1]>`

Nonnegative strides and offsets are currently supported. Future extensions will include negative strides.

This also gives a concrete example of syntactic sugar for the ([RFC] Proposed Changes to MemRef and Tensor MLIR Types)[https://groups.google.com/a/tensorflow.org/forum/#!topic/mlir/-wKHANzDNTg].

The underlying implementation still uses AffineMap layout.

PiperOrigin-RevId: 272717437


  Commit: 496f4590a1ab17615fe798de3266da3f34dfbddb
      https://github.com/llvm/llvm-project/commit/496f4590a1ab17615fe798de3266da3f34dfbddb
  Author: Christian Sigg <csigg at google.com>
  Date:   2019-10-03 (Thu, 03 Oct 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVBase.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVGLSLOps.td
    M mlir/include/mlir/Dialect/StandardOps/Ops.td
    M mlir/include/mlir/IR/OpDefinition.h
    M mlir/lib/IR/Operation.cpp
    M mlir/test/IR/invalid-ops.mlir

  Log Message:
  -----------
  Generalize parse/printBinaryOp to parse/printOneResultOp.

PiperOrigin-RevId: 272722539


  Commit: 0dfa7fc9082cd7792f3769f738468d5f1dfd5a3a
      https://github.com/llvm/llvm-project/commit/0dfa7fc9082cd7792f3769f738468d5f1dfd5a3a
  Author: MLIR Team <no-reply at google.com>
  Date:   2019-10-03 (Thu, 03 Oct 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/StandardOps/Ops.td
    M mlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp
    M mlir/lib/Dialect/StandardOps/Ops.cpp
    M mlir/test/Conversion/StandardToLLVM/convert-to-llvmir.mlir
    M mlir/test/IR/core-ops.mlir
    M mlir/test/IR/invalid-ops.mlir

  Log Message:
  -----------
  Add fpext and fptrunc to the Standard dialect and includes conversion to LLVM

PiperOrigin-RevId: 272768027


  Commit: 8c95223e3c9555165fb9f56db35c3c8e85ddd4c1
      https://github.com/llvm/llvm-project/commit/8c95223e3c9555165fb9f56db35c3c8e85ddd4c1
  Author: Feng Liu <fengliuai at google.com>
  Date:   2019-10-03 (Thu, 03 Oct 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/QuantOps/QuantOps.td
    M mlir/lib/Dialect/QuantOps/IR/QuantOps.cpp
    M mlir/lib/Quantizer/Transforms/AddDefaultStatsTestPass.cpp
    M mlir/test/Dialect/QuantOps/parse-ops-invalid.mlir
    M mlir/test/Dialect/QuantOps/parse-ops.mlir

  Log Message:
  -----------
  Add `axis` attribute to the quant.stats op

The first dim length of the axisStats attribute should equals to the slice size
of the input argument when splitted by the axis dimension.

PiperOrigin-RevId: 272798042


  Commit: a20d96e436272b52d36f52c4a07c86ed285502e9
      https://github.com/llvm/llvm-project/commit/a20d96e436272b52d36f52c4a07c86ed285502e9
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-10-03 (Thu, 03 Oct 2019)

  Changed paths:
    M mlir/include/mlir/Analysis/CallInterfaces.td
    M mlir/include/mlir/Transforms/InliningUtils.h
    M mlir/lib/Transforms/Inliner.cpp
    M mlir/lib/Transforms/Utils/InliningUtils.cpp
    M mlir/test/Transforms/inlining.mlir
    M mlir/test/lib/TestDialect/TestDialect.cpp

  Log Message:
  -----------
  Update the Inliner pass to work on SCCs of the CallGraph.

This allows for the inliner to work on arbitrary call operations. The updated inliner will also work bottom-up through the callgraph enabling support for multiple levels of inlining.

PiperOrigin-RevId: 272813876


  Commit: 5830f71a45df33e24c864bea4c5de070be47b488
      https://github.com/llvm/llvm-project/commit/5830f71a45df33e24c864bea4c5de070be47b488
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-10-03 (Thu, 03 Oct 2019)

  Changed paths:
    M mlir/include/mlir/Analysis/CallInterfaces.td
    M mlir/include/mlir/IR/Function.h
    M mlir/include/mlir/Transforms/InliningUtils.h
    M mlir/lib/Transforms/Inliner.cpp
    M mlir/lib/Transforms/Utils/InliningUtils.cpp
    M mlir/test/Transforms/inlining.mlir
    M mlir/test/lib/TestDialect/TestDialect.cpp
    M mlir/test/lib/TestDialect/TestOps.td

  Log Message:
  -----------
  Add support for inlining calls with different arg/result types from the callable.

Some dialects have implicit conversions inherent in their modeling, meaning that a call may have a different type that the type that the callable expects. To support this, a hook is added to the dialect interface that allows for materializing conversion operations during inlining when there is a mismatch. A hook is also added to the callable interface to allow for introspecting the expected result types.

PiperOrigin-RevId: 272814379


  Commit: 85dcaf19c721c4c745cd4fa3972aa9093acd69d3
      https://github.com/llvm/llvm-project/commit/85dcaf19c721c4c745cd4fa3972aa9093acd69d3
  Author: Christian Sigg <csigg at google.com>
  Date:   2019-10-04 (Fri, 04 Oct 2019)

  Changed paths:
    M mlir/examples/Linalg/Linalg3/lib/ConvertToLLVMDialect.cpp
    M mlir/examples/toy/Ch1/include/toy/Parser.h
    M mlir/examples/toy/Ch2/include/toy/Parser.h
    M mlir/examples/toy/Ch3/include/toy/Dialect.h
    M mlir/examples/toy/Ch3/include/toy/Parser.h
    M mlir/examples/toy/Ch3/parser/AST.cpp
    M mlir/examples/toy/Ch4/include/toy/Dialect.h
    M mlir/examples/toy/Ch4/include/toy/Parser.h
    M mlir/examples/toy/Ch4/mlir/MLIRGen.cpp
    M mlir/examples/toy/Ch5/include/toy/Dialect.h
    M mlir/examples/toy/Ch5/include/toy/Parser.h
    M mlir/include/mlir/Analysis/Utils.h
    M mlir/include/mlir/Conversion/GPUToCUDA/GPUToCUDAPass.h
    M mlir/include/mlir/Dialect/QuantOps/UniformSupport.h
    M mlir/include/mlir/Dialect/SPIRV/SPIRVLogicalOps.td
    M mlir/include/mlir/Dialect/StandardOps/Ops.h
    M mlir/include/mlir/IR/Block.h
    M mlir/include/mlir/IR/Diagnostics.h
    M mlir/include/mlir/IR/OpBase.td
    M mlir/include/mlir/IR/Operation.h
    M mlir/include/mlir/Support/StringExtras.h
    M mlir/include/mlir/TableGen/OpTrait.h
    M mlir/lib/Analysis/AffineAnalysis.cpp
    M mlir/lib/Analysis/AffineStructures.cpp
    M mlir/lib/Conversion/GPUToNVVM/LowerGpuOpsToNVVMOps.cpp
    M mlir/lib/Conversion/GPUToROCDL/LowerGpuOpsToROCDLOps.cpp
    M mlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp
    M mlir/lib/Dialect/AffineOps/AffineOps.cpp
    M mlir/lib/Dialect/GPU/IR/GPUDialect.cpp
    M mlir/lib/Dialect/QuantOps/Transforms/ConvertSimQuant.cpp
    M mlir/lib/Dialect/StandardOps/Ops.cpp
    M mlir/lib/IR/AsmPrinter.cpp
    M mlir/lib/IR/Attributes.cpp
    M mlir/lib/IR/Dialect.cpp
    M mlir/lib/IR/IntegerSet.cpp
    M mlir/lib/IR/MLIRContext.cpp
    M mlir/lib/Quantizer/Support/UniformSolvers.cpp
    M mlir/lib/Target/LLVMIR/ConvertToROCDLIR.cpp
    M mlir/lib/Transforms/DialectConversion.cpp
    M mlir/lib/Transforms/MemRefDataFlowOpt.cpp
    M mlir/lib/Transforms/Utils/LoopFusionUtils.cpp
    M mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
    M mlir/tools/mlir-tblgen/ReferenceImplGen.cpp
    M mlir/tools/mlir-tblgen/RewriterGen.cpp

  Log Message:
  -----------
  Fix typos, NFC.

PiperOrigin-RevId: 272851237


  Commit: d064469f6feb3187450f6220e15d92cc1a1ecada
      https://github.com/llvm/llvm-project/commit/d064469f6feb3187450f6220e15d92cc1a1ecada
  Author: Deven Desai <36858332+deven-amd at users.noreply.github.com>
  Date:   2019-10-04 (Fri, 04 Oct 2019)

  Changed paths:
    A mlir/lib/Conversion/GPUCommon/IndexIntrinsicsOpLowering.h
    M mlir/lib/Conversion/GPUToNVVM/LowerGpuOpsToNVVMOps.cpp
    M mlir/lib/Conversion/GPUToROCDL/LowerGpuOpsToROCDLOps.cpp

  Log Message:
  -----------
  Moving the GPUIndexIntrinsicOpLowering template to a common location

The GPUIndexIntrinsicOpLowering template is currently used by the code in both the GPUToNVVM and GPUToROCDL dirs.
Moving it to a common location to remove code duplication.

Closes tensorflow/mlir#163

COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/163 from deven-amd:deven-refactor-gpu-index-ops-lowering b8dc2a5f5353df196039b6ff2ad42106028693ed
PiperOrigin-RevId: 272863297


  Commit: 516f6a3477073d52224a744a720f2d62f0ea3ca9
      https://github.com/llvm/llvm-project/commit/516f6a3477073d52224a744a720f2d62f0ea3ca9
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2019-10-04 (Fri, 04 Oct 2019)

  Changed paths:
    M mlir/lib/Dialect/Linalg/Transforms/LowerToLLVMDialect.cpp
    M mlir/test/Dialect/Linalg/llvm.mlir
    M mlir/test/Dialect/Linalg/loops.mlir
    M mlir/test/Dialect/Linalg/roundtrip.mlir

  Log Message:
  -----------
  Add missing Linalg lowerings to allow roundtrip.mlir to lower to LLVM

Certain lowering patterns were reported as [missing](https://groups.google.com/a/tensorflow.org/forum/#!topic/mlir/dkdmHa77sSQ).

This CL adds them and allows Linalg/roundtrip.mlir and Linalg/loops.mlir to lower to LLVM directly. Those 2 tests are updated to additionally check that the direct lowering to LLVM does not crash.

The following points, left as TODOs still need to be addressed for correct end-to-end execution:
1. the lowering for ConvOp needs to pass attributes such as strides and dilations; the external library call needs to support it.
2. the lowering for GenericOp needs to support lowering to loops as a DialectConversion pattern. This is blocked on the DialectConversion infrastructure accepting an OperationFolder.

PiperOrigin-RevId: 272878131


  Commit: 754ea72794c819dceeab1f4cc15933971d228aed
      https://github.com/llvm/llvm-project/commit/754ea72794c819dceeab1f4cc15933971d228aed
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2019-10-04 (Fri, 04 Oct 2019)

  Changed paths:
    M mlir/include/mlir/IR/StandardTypes.h
    M mlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp
    M mlir/lib/IR/StandardTypes.cpp
    M mlir/lib/Parser/Parser.cpp
    M mlir/test/lib/Transforms/TestMemRefStrideCalculation.cpp

  Log Message:
  -----------
  Replace constexpr MemRefType::kDynamicStrideOrOffset by a MemRefType:;getDynamicStrideOrOffset() method - NFC

This fixes global ODR-use issues, some of which manifest in Parser.cpp.

Fixes tensorflow/mlir#167.

PiperOrigin-RevId: 272886347


  Commit: 77a809d7a12bf83096a670dc3c611d9c1f95eb0d
      https://github.com/llvm/llvm-project/commit/77a809d7a12bf83096a670dc3c611d9c1f95eb0d
  Author: Mahesh Ravishankar <ravishankarm at google.com>
  Date:   2019-10-04 (Fri, 04 Oct 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/SPIRV/SPIRVDialect.h
    M mlir/include/mlir/Dialect/SPIRV/SPIRVOps.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVStructureOps.td
    M mlir/lib/Dialect/SPIRV/SPIRVDialect.cpp
    M mlir/lib/Dialect/SPIRV/SPIRVOps.cpp

  Log Message:
  -----------
  Add some utility builder functions for SPIR-V operations.

Add builder functions for spv._address_of, spv.EntryPoint,
spv.ExecutionMode and spv.Load to make it easier to create these
operations.
Fix a minor bug in printing of spv.EntryPoint
Add a utility function to get the attribute name associated with a
decoration.

PiperOrigin-RevId: 272952846


  Commit: 3f8bde40cb267f1f6b168ea7bbdd918dfda650a4
      https://github.com/llvm/llvm-project/commit/3f8bde40cb267f1f6b168ea7bbdd918dfda650a4
  Author: Mahesh Ravishankar <ravishankarm at google.com>
  Date:   2019-10-04 (Fri, 04 Oct 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/SPIRV/SPIRVBase.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVOps.td
    M mlir/lib/Dialect/SPIRV/SPIRVOps.cpp
    A mlir/test/Dialect/SPIRV/Serialization/undef.mlir
    M mlir/test/Dialect/SPIRV/ops.mlir
    M mlir/utils/spirv/gen_spirv_dialect.py

  Log Message:
  -----------
  Add spv.Undef op to support OpUndef instruction in SPIR-V.

Adding support for OpUndef instruction. Updating the dialect
generation script to fix a few bugs in the instruction spec
generation.

PiperOrigin-RevId: 272975685


  Commit: 58e2ead31489aef4b3972a1af1e1e7d9a5ab4f1a
      https://github.com/llvm/llvm-project/commit/58e2ead31489aef4b3972a1af1e1e7d9a5ab4f1a
  Author: Mehdi Amini <aminim at google.com>
  Date:   2019-10-04 (Fri, 04 Oct 2019)

  Changed paths:
    M mlir/test/lib/TestDialect/CMakeLists.txt

  Log Message:
  -----------
  Add missing dependency on the TypeInferOpInterface from the Test dialect

This is fixing a build failure, usually non-deterministic because of
parallelism in the build, but could be reliably reproduced:

ninja projects/mlir/test/lib/TestDialect/CMakeFiles/MLIRTestDialect.dir/TestPatterns.cpp.o

PiperOrigin-RevId: 272998436


  Commit: c020480fc61c9c414203e3e4d18942474ccc0809
      https://github.com/llvm/llvm-project/commit/c020480fc61c9c414203e3e4d18942474ccc0809
  Author: Lei Zhang <antiagainst at google.com>
  Date:   2019-10-04 (Fri, 04 Oct 2019)

  Changed paths:
    M mlir/lib/Dialect/SPIRV/SPIRVOps.cpp
    M mlir/test/Dialect/SPIRV/control-flow-ops.mlir

  Log Message:
  -----------
  [spirv] Allow return ops to be in control flow ops

Use `getParentOfType<FunctionOp>()` instead of `cast<FuncOp>(getParentOp())`
to avoid crash when return ops are used inside spv.selection/spv.loop.

PiperOrigin-RevId: 273006041


  Commit: 8b9b72cee81226299602d3d37e794aea8efb141a
      https://github.com/llvm/llvm-project/commit/8b9b72cee81226299602d3d37e794aea8efb141a
  Author: Geoffrey Martin-Noble <gcmn at google.com>
  Date:   2019-10-05 (Sat, 05 Oct 2019)

  Changed paths:
    M mlir/test/IR/traits.mlir
    M mlir/test/lib/TestDialect/TestOps.td

  Log Message:
  -----------
  NFC: Cleanup test ops and traits tests

1. Rename a few ops to make it clear they operate on *element* types.
2. Remove unused and generic operand and result ODS names (e.g. $res, $arg, $input). These are just clutter and don't make the op definitions any clearer.
3. Give test cases with duplicate names clearer names.
4. Add missing test case for no operands in SameOperandAndResultElementType.

PiperOrigin-RevId: 273067933


  Commit: 18db4ce493b176d64ad180dc4da9bbeb148ec5d5
      https://github.com/llvm/llvm-project/commit/18db4ce493b176d64ad180dc4da9bbeb148ec5d5
  Author: Geoffrey Martin-Noble <gcmn at google.com>
  Date:   2019-10-05 (Sat, 05 Oct 2019)

  Changed paths:
    M mlir/include/mlir/IR/OpBase.td
    M mlir/include/mlir/IR/OpDefinition.h
    M mlir/lib/IR/Operation.cpp
    M mlir/test/IR/traits.mlir
    M mlir/test/lib/TestDialect/TestOps.td

  Log Message:
  -----------
  Allow element type traits to operate on scalars

This allows confirming that a scalar argument has the same element type as a shaped one. It's easy to validate a type is shaped on its own if that's desirable, so this shouldn't make that use case harder. This matches the behavior of other traits that operate on element type (e.g. AllElementTypesMatch). Also this makes the code simpler because now we just use getElementTypeOrSelf.

Verified that all uses in core already check the type is shaped in another way.

PiperOrigin-RevId: 273068507


  Commit: 77672c9777a16c26e6ba569f465a75e3349fa728
      https://github.com/llvm/llvm-project/commit/77672c9777a16c26e6ba569f465a75e3349fa728
  Author: Jacques Pienaar <jpienaar at google.com>
  Date:   2019-10-05 (Sat, 05 Oct 2019)

  Changed paths:
    M mlir/include/mlir/TableGen/Dialect.h
    M mlir/include/mlir/TableGen/Operator.h
    M mlir/lib/TableGen/Dialect.cpp
    M mlir/tools/mlir-tblgen/OpDocGen.cpp

  Log Message:
  -----------
  Enable emitting dialect summary & description during op generation

Sort ops per dialect and emit summary & description (if provided) of each dialect before emitting the ops of the dialect.

PiperOrigin-RevId: 273077138


  Commit: 7c765d97f98779ad2739a6a3e0ff500a4661efac
      https://github.com/llvm/llvm-project/commit/7c765d97f98779ad2739a6a3e0ff500a4661efac
  Author: Christian Sigg <csigg at google.com>
  Date:   2019-10-07 (Mon, 07 Oct 2019)

  Changed paths:
    M mlir/lib/Conversion/GPUToNVVM/LowerGpuOpsToNVVMOps.cpp
    M mlir/test/mlir-cuda-runner/all-reduce.mlir

  Log Message:
  -----------
  Support reduction of partial warps.

gpu.all_reduce now supports block sizes that are not multiple of 32.

PiperOrigin-RevId: 273255204


  Commit: da984166df8c6240ef898cbe55c0ea56ec535a1c
      https://github.com/llvm/llvm-project/commit/da984166df8c6240ef898cbe55c0ea56ec535a1c
  Author: MLIR Team <no-reply at google.com>
  Date:   2019-10-07 (Mon, 07 Oct 2019)

  Changed paths:
    M mlir/g3doc/Diagnostics.md
    M mlir/include/mlir/IR/Attributes.h
    M mlir/include/mlir/IR/Location.h
    M mlir/lib/IR/AsmPrinter.cpp
    M mlir/lib/IR/Location.cpp
    M mlir/lib/IR/LocationDetail.h
    M mlir/lib/IR/MLIRContext.cpp
    A mlir/test/IR/opaque_locations.mlir
    A mlir/test/lib/Transforms/TestOpaqueLoc.cpp

  Log Message:
  -----------
  Add OpaqueLoc to MLIR locations.

See RFC: https://groups.google.com/a/tensorflow.org/forum/#!topic/mlir/xE2IzfhE3Wg.

Opaque location stores two pointers, one of them points to some data structure that is external to MLIR, and the other one is unique for each type and represents type id of that data structure. OpaqueLoc also stores an optional location that can be used if the first one is not suitable.
OpaqueLoc is managed similar to FileLineColLoc. It is passed around by MLIR transformations and can be used in compound locations like CallSiteLoc.

PiperOrigin-RevId: 273266510


  Commit: c07a604f87216a21e815802ad0b186af34924f6b
      https://github.com/llvm/llvm-project/commit/c07a604f87216a21e815802ad0b186af34924f6b
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2019-10-07 (Mon, 07 Oct 2019)

  Changed paths:
    M mlir/test/lib/Transforms/CMakeLists.txt

  Log Message:
  -----------
  Fix CMake build after adding TestOpaqueLoc.cpp

PiperOrigin-RevId: 273296399


  Commit: 27e8efedf868303961b8b081151c5dfe42acb9a5
      https://github.com/llvm/llvm-project/commit/27e8efedf868303961b8b081151c5dfe42acb9a5
  Author: Jacques Pienaar <jpienaar at google.com>
  Date:   2019-10-07 (Mon, 07 Oct 2019)

  Changed paths:
    M mlir/include/mlir/IR/OpBase.td
    M mlir/include/mlir/TableGen/Dialect.h
    M mlir/include/mlir/TableGen/Type.h
    M mlir/lib/TableGen/Dialect.cpp
    M mlir/lib/TableGen/Type.cpp
    M mlir/tools/mlir-tblgen/OpDocGen.cpp

  Log Message:
  -----------
  Add DialectType and generate docs for dialect types

Add new `typeDescription` (description was already used by base constraint class) field to type to allow writing longer descriptions about a type being defined. This allows for providing additional information/rationale for a defined type. This currently uses `description` as the heading/name for the type in the generated documentation.

PiperOrigin-RevId: 273299332


  Commit: 9f98bcda47f1d1a20d584471dc8541777bc61413
      https://github.com/llvm/llvm-project/commit/9f98bcda47f1d1a20d584471dc8541777bc61413
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2019-10-07 (Mon, 07 Oct 2019)

  Changed paths:
    M mlir/lib/Dialect/Linalg/Analysis/DependenceAnalysis.cpp
    M mlir/lib/Dialect/Linalg/CMakeLists.txt
    M mlir/test/Dialect/Linalg/fusion.mlir

  Log Message:
  -----------
  Support AllocOp terminal in Linalg::AliasAnalysis.

Now that linalg.view and strided memrefs are unified, there is no reason to
disallow AllocOp in alias analysis. This CLs adds support for AllocOp which allows writing shorter tests that do not require explicitly creating a view for
each operation.

PiperOrigin-RevId: 273303060


  Commit: 3b4f133fb70b635dff8077c77296941a109a0303
      https://github.com/llvm/llvm-project/commit/3b4f133fb70b635dff8077c77296941a109a0303
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2019-10-07 (Mon, 07 Oct 2019)

  Changed paths:
    M mlir/test/CMakeLists.txt
    M mlir/test/mlir-cpu-runner/CMakeLists.txt
    M mlir/test/mlir-cpu-runner/cblas_interface.cpp
    M mlir/test/mlir-cpu-runner/include/cblas.h
    A mlir/test/mlir-cpu-runner/include/mlir_runner_utils.h
    A mlir/test/mlir-cpu-runner/mlir_runner_utils.cpp
    A mlir/test/mlir-cpu-runner/utils.mlir

  Log Message:
  -----------
  Start a minimal mlir_utils runtime library for testing debugging purposes

Now that MLIR has a standardized StridedMemRef descriptor, it becomes very easy to interact with external library functions and build utilities directly in C++.
This CL introduces basic printing support in a libmlir_utils.so.
Unit tests are rewritten using this feature and also to improve coverage.

For now, C mandates that we have a unique function for each MemRef element type and rank.
In a future a simple unranked descriptor can be introduced to only require uniqu'ing by element type.

PiperOrigin-RevId: 273304741


  Commit: b66d6e54330380987bf103a0230a9228324af276
      https://github.com/llvm/llvm-project/commit/b66d6e54330380987bf103a0230a9228324af276
  Author: Stephan Herhut <herhut at google.com>
  Date:   2019-10-07 (Mon, 07 Oct 2019)

  Changed paths:
    M mlir/g3doc/OpDefinitions.md

  Log Message:
  -----------
  Fix a comment in the OperationInterface example.

PiperOrigin-RevId: 273308494


  Commit: 9f11b0e12f964779cbf3d7cc38eaea6675370ccd
      https://github.com/llvm/llvm-project/commit/9f11b0e12f964779cbf3d7cc38eaea6675370ccd
  Author: Christian Sigg <csigg at google.com>
  Date:   2019-10-07 (Mon, 07 Oct 2019)

  Changed paths:
    M mlir/include/mlir/IR/Block.h
    M mlir/include/mlir/IR/Operation.h
    M mlir/lib/IR/Block.cpp

  Log Message:
  -----------
  Change Block::getParent() to be a const function. This is only necessary because ilist_node_with_parent specifically requires a 'getParent() const' method. If/When ilist_node removes this constraint we should drop the const to fit the rest of the MLIR const model.

PiperOrigin-RevId: 273316153


  Commit: 89e7a76a1cc77f9b67adb866e3a9e09ec5470790
      https://github.com/llvm/llvm-project/commit/89e7a76a1cc77f9b67adb866e3a9e09ec5470790
  Author: Uday Bondhugula <udayb at iisc.ac.in>
  Date:   2019-10-07 (Mon, 07 Oct 2019)

  Changed paths:
    M mlir/lib/Transforms/SimplifyAffineStructures.cpp
    M mlir/test/Transforms/memref-normalize.mlir

  Log Message:
  -----------
  fix simplify-affine-structures bug

Signed-off-by: Uday Bondhugula <uday at polymagelabs.com>

Closes tensorflow/mlir#157

COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/157 from bondhugula:quickfix bd1fcd79825fc0bd5b4a3e688153fa0993ab703d
PiperOrigin-RevId: 273316498


  Commit: ebf584b8134e6e0530e5848be55a330d185c688d
      https://github.com/llvm/llvm-project/commit/ebf584b8134e6e0530e5848be55a330d185c688d
  Author: Lei Zhang <antiagainst at google.com>
  Date:   2019-10-07 (Mon, 07 Oct 2019)

  Changed paths:
    M mlir/lib/Dialect/SPIRV/Serialization/Deserializer.cpp
    M mlir/lib/Dialect/SPIRV/Serialization/Serializer.cpp
    M mlir/test/Dialect/SPIRV/Serialization/loop.mlir
    M mlir/test/Dialect/SPIRV/Serialization/selection.mlir

  Log Message:
  -----------
  [spirv] Fix function entry block erase after moving to spv.selection

The structured selection/loop's entry block does not have arguments.
If the function's header block is also part of the structured control
flow, we cannot just simply erase it because it may contain arguments
matching the function signature and used by the cloned blocks. Instead,
turn it into a block only containing a spv.Branch op.

Also, we can directly emit instructions for the spv.selection header
block to the block containing the spv.selection op. This eliminates
unnecessary branches in the SPIR-V blob.

Added a test for nested spv.loop.

PiperOrigin-RevId: 273351424


  Commit: 9e9c3a009a19a1a35f364d79288949c66e7482af
      https://github.com/llvm/llvm-project/commit/9e9c3a009a19a1a35f364d79288949c66e7482af
  Author: Mahesh Ravishankar <ravishankarm at google.com>
  Date:   2019-10-07 (Mon, 07 Oct 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/SPIRV/SPIRVOps.td
    M mlir/lib/Dialect/SPIRV/Serialization/Deserializer.cpp
    M mlir/lib/Dialect/SPIRV/Serialization/Serializer.cpp
    M mlir/test/Dialect/SPIRV/Serialization/undef.mlir
    M mlir/test/Dialect/SPIRV/ops.mlir

  Log Message:
  -----------
  Update UndefOp (de)serialization to generate OpUndef at module level.

The SPIR-V spec recommends all OpUndef instructions be generated at
module level. For the SPIR-V dialect its better for UndefOp to produce
an SSA value for use with other instructions. If UndefOp is to be used
at module level, it cannot produce an SSA value (use of this SSA value
within FuncOp would need implicit capture). To satisfy needs of the
SPIR-V spec while making it simpler to represent UndefOp in the SPIR-V
dialect, the serialization is updated to create OpUndef instruction
at module scope.

PiperOrigin-RevId: 273355526


  Commit: aeada290b8777dc2f83350ced7df77d82fadbb5b
      https://github.com/llvm/llvm-project/commit/aeada290b8777dc2f83350ced7df77d82fadbb5b
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-10-07 (Mon, 07 Oct 2019)

  Changed paths:
    M mlir/include/mlir/IR/Module.h
    M mlir/include/mlir/IR/OpDefinition.h
    M mlir/include/mlir/IR/Operation.h
    M mlir/include/mlir/IR/OperationSupport.h
    M mlir/lib/IR/AsmPrinter.cpp

  Log Message:
  -----------
  Add a new class, OpPrintingFlags, to enable programmatic control of Operation::print behavior.

This allows for controlling the behavior of the AsmPrinter programmatically, instead of relying exclusively on cl::opt flags. This will also allow for more fine-tuned control of printing behavior per callsite, instead of being applied globally.

PiperOrigin-RevId: 273368361


  Commit: 5a1108c9a683b8b8f48cc4e6f870e21c8807d8ff
      https://github.com/llvm/llvm-project/commit/5a1108c9a683b8b8f48cc4e6f870e21c8807d8ff
  Author: Lei Zhang <antiagainst at google.com>
  Date:   2019-10-07 (Mon, 07 Oct 2019)

  Changed paths:
    M mlir/test/Dialect/SPIRV/Serialization/loop.mlir

  Log Message:
  -----------
  [spirv] Disable a crashing spv.loop test

PiperOrigin-RevId: 273379318


  Commit: 37e0e8cf16650b8d99e1f044c63fc69cca8f0899
      https://github.com/llvm/llvm-project/commit/37e0e8cf16650b8d99e1f044c63fc69cca8f0899
  Author: Mahesh Ravishankar <ravishankarm at google.com>
  Date:   2019-10-07 (Mon, 07 Oct 2019)

  Changed paths:
    M mlir/lib/Dialect/SPIRV/Serialization/Deserializer.cpp

  Log Message:
  -----------
  Do not add spirv::BitcastOp for cast from signed to unsigned type.

Since MLIR integer types don't make a distinction between signed vs
unsigned integers, during deserialization of SPIR-V binaries, the
OpBitcast might result in a cast from/to the same type. Do not add a
spv.Bitcast operation to the spv.module in these cases.

PiperOrigin-RevId: 273381887


  Commit: 6b3462a77b18b4968bbf9e56d5fd69c6107b2a45
      https://github.com/llvm/llvm-project/commit/6b3462a77b18b4968bbf9e56d5fd69c6107b2a45
  Author: MLIR Team <no-reply at google.com>
  Date:   2019-10-07 (Mon, 07 Oct 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/Linalg/Utils/Utils.h
    M mlir/lib/Dialect/Linalg/Transforms/Fusion.cpp

  Log Message:
  -----------
  Expose `fuseProducerOf` in Linalg/Utils/Utils.h.

PiperOrigin-RevId: 273384063


  Commit: 17606a108b9464da4f960e11b132c9e968f31adb
      https://github.com/llvm/llvm-project/commit/17606a108b9464da4f960e11b132c9e968f31adb
  Author: Jing Pu <jingpu at google.com>
  Date:   2019-10-07 (Mon, 07 Oct 2019)

  Changed paths:
    M mlir/lib/Transforms/ViewOpGraph.cpp

  Log Message:
  -----------
  Print result types when dumping graphviz.

PiperOrigin-RevId: 273406833


  Commit: a8a73f0640b483ff47140b642ef8ce3d9735a174
      https://github.com/llvm/llvm-project/commit/a8a73f0640b483ff47140b642ef8ce3d9735a174
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-10-07 (Mon, 07 Oct 2019)

  Changed paths:
    M mlir/include/mlir/IR/OperationSupport.h
    M mlir/lib/IR/AsmPrinter.cpp
    A mlir/test/IR/pretty-attributes.mlir

  Log Message:
  -----------
  Add a flag to the AsmPrinter for eliding large ElementsAttrs.

Some modules may have extremely large ElementsAttrs, which makes debugging involving IR dumping extremely slow and painful. This change adds a flag that will elide ElementsAttrs with a "large"(as defined by the user) number of elements by printing "..." instead of the element data.

PiperOrigin-RevId: 273413100


  Commit: 780f107a57113706a4551e32c32fcd60006d9263
      https://github.com/llvm/llvm-project/commit/780f107a57113706a4551e32c32fcd60006d9263
  Author: Jing Pu <jingpu at google.com>
  Date:   2019-10-07 (Mon, 07 Oct 2019)

  Changed paths:
    M mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
    M mlir/lib/IR/AsmPrinter.cpp

  Log Message:
  -----------
  Update upgrade some uses of mlir::interleave API to take container argument directly.

PiperOrigin-RevId: 273446814


  Commit: 90d65d32d69ca46f52a9a744eafdad0d97b4a185
      https://github.com/llvm/llvm-project/commit/90d65d32d69ca46f52a9a744eafdad0d97b4a185
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2019-10-08 (Tue, 08 Oct 2019)

  Changed paths:
    M mlir/g3doc/Dialects/GPU.md
    M mlir/include/mlir/Dialect/GPU/GPUDialect.h
    M mlir/lib/Conversion/GPUToCUDA/ConvertLaunchFuncToCudaCalls.cpp
    M mlir/lib/Conversion/GPUToCUDA/GenerateCubinAccessors.cpp
    M mlir/lib/Conversion/GPUToSPIRV/GPUToSPIRV.cpp
    M mlir/lib/Dialect/GPU/IR/GPUDialect.cpp
    M mlir/lib/Dialect/GPU/Transforms/KernelOutlining.cpp
    M mlir/test/Conversion/GPUToCUDA/insert-cubin-getter.mlir
    M mlir/test/Conversion/GPUToCUDA/lower-launch-func-to-cuda.mlir
    M mlir/test/Conversion/GPUToSPIRV/builtins.mlir
    M mlir/test/Conversion/GPUToSPIRV/load_store.mlir
    M mlir/test/Conversion/GPUToSPIRV/simple.mlir
    M mlir/test/Dialect/GPU/invalid.mlir
    M mlir/test/Dialect/GPU/ops.mlir
    M mlir/test/Dialect/GPU/outlining.mlir

  Log Message:
  -----------
  Use named modules for gpu.launch_func

The kernel function called by gpu.launch_func is now placed into an isolated
nested module during the outlining stage to simplify separate compilation.
Until recently, modules did not have names and could not be referenced. This
limitation was circumvented by introducing a stub kernel at the same name at
the same nesting level as the module containing the actual kernel. This
relation is only effective in one direction: from actual kernel function to its
launch_func "caller".

Leverage the recently introduced symbol name attributes on modules to refer to
a specific nested module from `gpu.launch_func`. This removes the implicit
connection between the identically named stub and kernel functions. It also
enables support for `gpu.launch_func`s to call different kernels located in the
same module.

PiperOrigin-RevId: 273491891


  Commit: 16af5924cb6fd2bea3a4f9acf55aef4e796f5b11
      https://github.com/llvm/llvm-project/commit/16af5924cb6fd2bea3a4f9acf55aef4e796f5b11
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2019-10-08 (Tue, 08 Oct 2019)

  Changed paths:
    M mlir/include/mlir/Conversion/GPUToCUDA/GPUToCUDAPass.h
    M mlir/lib/Conversion/GPUToCUDA/CMakeLists.txt
    M mlir/lib/Conversion/GPUToCUDA/ConvertLaunchFuncToCudaCalls.cpp
    R mlir/lib/Conversion/GPUToCUDA/GenerateCubinAccessors.cpp
    R mlir/test/Conversion/GPUToCUDA/insert-cubin-getter.mlir
    M mlir/test/Conversion/GPUToCUDA/lower-launch-func-to-cuda.mlir
    M mlir/tools/mlir-cuda-runner/mlir-cuda-runner.cpp

  Log Message:
  -----------
  Fuse GenerateCubinAccessors pass into LaunchFunctToCuda

Now that the accessor function is a trivial getter of the global variable, it
makes less sense to have the getter generation as a separate pass. Move the
getter generation into the lowering of `gpu.launch_func` to CUDA calls. This
change is mostly code motion, but the process can be simplified further by
generating the addressof inplace instead of using a call. This is will be done
in a follow-up.

PiperOrigin-RevId: 273492517


  Commit: 52e082b6ed964ad408abc637b995bc13ff2fb122
      https://github.com/llvm/llvm-project/commit/52e082b6ed964ad408abc637b995bc13ff2fb122
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2019-10-08 (Tue, 08 Oct 2019)

  Changed paths:
    M mlir/lib/Conversion/GPUToCUDA/ConvertLaunchFuncToCudaCalls.cpp
    M mlir/test/Conversion/GPUToCUDA/lower-launch-func-to-cuda.mlir

  Log Message:
  -----------
  GPUToCUDA: emit addressof directly instead of wrapping it into a getter function

Originally, the CUBIN getter function was introduced as a mechanism to
circumvent the absence of globals in the LLVM dialect. It would allocate memory
and populate it with the CUBIN data. LLVM dialect now supports globals and they
are already used to store CUBIN data, making the getter function a trivial
address computation of a global. Emit the address computation directly at the
place of `gpu.launch_func` instead of putting it in a function and calling it.
This simplifies the conversion flow and prepares it for using the
DialectConversion infrastructure.

PiperOrigin-RevId: 273496221


  Commit: 11d12670daef546f55cc76d8fe0b32f137ab3bb6
      https://github.com/llvm/llvm-project/commit/11d12670daef546f55cc76d8fe0b32f137ab3bb6
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2019-10-08 (Tue, 08 Oct 2019)

  Changed paths:
    M mlir/include/mlir/Conversion/GPUToCUDA/GPUToCUDAPass.h
    M mlir/lib/Conversion/GPUToCUDA/ConvertKernelFuncToCubin.cpp
    M mlir/lib/Conversion/GPUToCUDA/ConvertLaunchFuncToCudaCalls.cpp
    M mlir/test/Conversion/GPUToCUDA/lower-launch-func-to-cuda.mlir
    M mlir/test/Conversion/GPUToCUDA/lower-nvvm-kernel-to-cubin.mlir
    M mlir/tools/mlir-cuda-runner/mlir-cuda-runner.cpp

  Log Message:
  -----------
  GPUToCUDA: attach CUBIN to the nested module rather than to the function

Originally, we were attaching attributes containing CUBIN blobs to the kernel
function called by `gpu.launch_func`. This kernel is now contained in a nested
module that is used as a compilation unit. Attach compiled CUBIN blobs to the
module rather than to the function since we were compiling the module. This
also avoids duplication of the attribute on multiple kernels within the same
module.

PiperOrigin-RevId: 273497303


  Commit: 0cdc53a762c4300c9c60a5a0d0714f323b3eed86
      https://github.com/llvm/llvm-project/commit/0cdc53a762c4300c9c60a5a0d0714f323b3eed86
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2019-10-08 (Tue, 08 Oct 2019)

  Changed paths:
    M mlir/lib/Dialect/Linalg/Transforms/LowerToLLVMDialect.cpp

  Log Message:
  -----------
  Linalg to LLVM lowering: decrease the reliance on symbol lookup in a module

During the conversion, both the original and the converted function may coexist
in the module and have the same symbol name. There is no guarantee which of the
two will be found by the symbol lookup. Avoid returning the result of the
library function lookup when lowering Linalg to Standard or LLVM. Use the
symbol reference instead. After the conversion completes, only one symbol will
remain and the Ops using SymbolRefAttrs will be referring to the correct one.

PiperOrigin-RevId: 273510079


  Commit: 0dd404e4e10eb494859d866185dbdb09621a0ea8
      https://github.com/llvm/llvm-project/commit/0dd404e4e10eb494859d866185dbdb09621a0ea8
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-10-08 (Tue, 08 Oct 2019)

  Changed paths:
    M mlir/lib/IR/AsmPrinter.cpp

  Log Message:
  -----------
  NFC: Remove unused default cl::opt value.

The default value is never used as the value of the elide option is only used if it has an occurrence.

PiperOrigin-RevId: 273545143


  Commit: ac91e673757f215325781cde4a286e96d7734fef
      https://github.com/llvm/llvm-project/commit/ac91e673757f215325781cde4a286e96d7734fef
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-10-08 (Tue, 08 Oct 2019)

  Changed paths:
    M mlir/g3doc/LangRef.md
    M mlir/include/mlir/IR/SymbolTable.h
    M mlir/lib/IR/SymbolTable.cpp
    A mlir/test/IR/test-symbol-uses.mlir
    M mlir/test/lib/CMakeLists.txt
    A mlir/test/lib/IR/CMakeLists.txt
    A mlir/test/lib/IR/TestSymbolUses.cpp
    M mlir/tools/mlir-opt/CMakeLists.txt

  Log Message:
  -----------
  Add support for walking the uses of a symbol.

MLIR uses symbol references to model references to many global entities, such as functions/variables/etc. Before this change, there is no way to actually reason about the uses of such entities. This change provides a walker for symbol references(via SymbolTable::walkSymbolUses), as well as 'use_empty' support(via SymbolTable::symbol_use_empty). It also resolves some deficiencies in the LangRef definition of SymbolRefAttr, namely the restrictions on where a SymbolRefAttr can be stored, ArrayAttr and DictionaryAttr, and the relationship with operations containing the SymbolTable trait.

PiperOrigin-RevId: 273549331


  Commit: 6136f33d5960a63961f2b471f82e5b7df583f8f2
      https://github.com/llvm/llvm-project/commit/6136f33d5960a63961f2b471f82e5b7df583f8f2
  Author: Uday Bondhugula <udayb at iisc.ac.in>
  Date:   2019-10-08 (Tue, 08 Oct 2019)

  Changed paths:
    M mlir/lib/Transforms/LoopUnrollAndJam.cpp
    M mlir/test/Transforms/unroll-jam.mlir

  Log Message:
  -----------
  unroll and jam: fix order of jammed bodies

- bodies would earlier appear in the order (i, i+3, i+2, i+1) instead of
  (i, i+1, i+2, i+3) for example for factor 4.

- clean up hardcoded test cases

Signed-off-by: Uday Bondhugula <uday at polymagelabs.com>

Closes tensorflow/mlir#170

COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/170 from bondhugula:ujam b66b405b2b1894a03b376952e32a9d0292042665
PiperOrigin-RevId: 273613131


  Commit: 49b29dd18645e30deb49d25b5e618f628b2e96d6
      https://github.com/llvm/llvm-project/commit/49b29dd18645e30deb49d25b5e618f628b2e96d6
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-10-08 (Tue, 08 Oct 2019)

  Changed paths:
    M mlir/include/mlir/IR/PatternMatch.h
    M mlir/include/mlir/Transforms/DialectConversion.h
    M mlir/lib/IR/PatternMatch.cpp
    M mlir/lib/Transforms/DialectConversion.cpp
    M mlir/test/Transforms/test-legalizer-full.mlir
    M mlir/test/Transforms/test-legalizer.mlir
    M mlir/test/lib/TestDialect/TestPatterns.cpp

  Log Message:
  -----------
  Add a PatternRewriter hook for cloning a region into another.

This is similar to the `inlineRegionBefore` hook, except the original blocks are unchanged. The region to be cloned *must* not have been modified during the conversion process at the point of cloning, i.e. it must belong an operation that has yet to be converted, or the operation that is currently being converted.

PiperOrigin-RevId: 273622533


  Commit: d21ba951de62baf463097bfbe3fbba9dea9cf91a
      https://github.com/llvm/llvm-project/commit/d21ba951de62baf463097bfbe3fbba9dea9cf91a
  Author: Denis Khalikov <khalikov.denis at huawei.com>
  Date:   2019-10-08 (Tue, 08 Oct 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/SPIRV/Passes.h
    M mlir/include/mlir/Dialect/SPIRV/SPIRVDialect.h
    M mlir/include/mlir/Dialect/SPIRV/SPIRVStructureOps.td
    M mlir/lib/Dialect/SPIRV/CMakeLists.txt
    M mlir/lib/Dialect/SPIRV/SPIRVDialect.cpp
    A mlir/lib/Dialect/SPIRV/Transforms/CMakeLists.txt
    A mlir/lib/Dialect/SPIRV/Transforms/DecorateSPIRVCompositeTypeLayoutPass.cpp
    A mlir/test/Dialect/SPIRV/Transforms/layout-decoration.mlir
    M mlir/tools/mlir-opt/CMakeLists.txt

  Log Message:
  -----------
  [spirv] Add a pass to decorate the composite types with layout info.

Add a pass to decorate the composite types used by
composite objects in the StorageBuffer, PhysicalStorageBuffer,
Uniform, and PushConstant storage classes with layout information.

Closes tensorflow/mlir#156

COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/156 from denis0x0D:sandbox/layout_info_decoration 7c50840fd38ca169a2da7ce9886b52b50c868b84
PiperOrigin-RevId: 273634140


  Commit: 956a8311306bd21eee33ddbe9575fed5c1f8877a
      https://github.com/llvm/llvm-project/commit/956a8311306bd21eee33ddbe9575fed5c1f8877a
  Author: Deven Desai <36858332+deven-amd at users.noreply.github.com>
  Date:   2019-10-08 (Tue, 08 Oct 2019)

  Changed paths:
    M mlir/lib/Target/LLVMIR/ConvertToROCDLIR.cpp
    M mlir/test/Target/rocdl.mlir

  Log Message:
  -----------
  [ROCm] Fix the return type for the device function calls from i32 to i64.

This is matching what the runtime library is expecting.

Closes tensorflow/mlir#171

COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/171 from deven-amd:deven-rocdl-device-func-i64 80762629a8c34e844ebdc542b34dd783990db9db
PiperOrigin-RevId: 273640767


  Commit: 71c7962201cace1300ca9c981959b9693edb8eea
      https://github.com/llvm/llvm-project/commit/71c7962201cace1300ca9c981959b9693edb8eea
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-10-08 (Tue, 08 Oct 2019)

  Changed paths:
    M mlir/g3doc/LangRef.md
    M mlir/include/mlir/IR/OpImplementation.h
    M mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
    M mlir/lib/Dialect/SPIRV/SPIRVOps.cpp
    M mlir/lib/IR/AsmPrinter.cpp
    M mlir/lib/IR/FunctionSupport.cpp
    M mlir/lib/IR/Module.cpp
    M mlir/lib/Parser/Lexer.cpp
    M mlir/lib/Parser/Parser.cpp
    M mlir/lib/Parser/Token.cpp
    M mlir/lib/Parser/Token.h
    M mlir/test/IR/parser.mlir

  Log Message:
  -----------
  Add support for parsing/printing non bare-identifier SymbolRefs.

The restriction that symbols can only have identifier names is arbitrary, and artificially limits the names that a symbol may have. This change adds support for parsing and printing symbols that don't fit in the 'bare-identifier' grammar by printing the reference in quotes, e.g. @"0_my_reference" can now be used as a symbol name.

PiperOrigin-RevId: 273644768


  Commit: 744615123618e000caba27ed9fe3885e79668cb5
      https://github.com/llvm/llvm-project/commit/744615123618e000caba27ed9fe3885e79668cb5
  Author: MLIR Team <no-reply at google.com>
  Date:   2019-10-08 (Tue, 08 Oct 2019)

  Changed paths:
    M mlir/g3doc/WritingAPass.md
    M mlir/include/mlir/Pass/PassRegistry.h
    M mlir/lib/Pass/PassRegistry.cpp
    M mlir/lib/Support/MlirOptMain.cpp
    A mlir/test/Pass/pipeline-options-parsing.mlir
    M mlir/test/Transforms/parametric-tiling.mlir
    M mlir/test/lib/Pass/TestPassManager.cpp
    M mlir/test/lib/Transforms/TestLoopParametricTiling.cpp

  Log Message:
  -----------
  Add Instance Specific Pass Options.

This allows individual passes to define options structs and for these options to be parsed per instance of the pass while building the pass pipeline from the command line provided textual specification.

The user can specify these per-instance pipeline options like so:
```
struct MyPassOptions : public PassOptions<MyPassOptions> {
  Option<int> exampleOption{*this, "flag-name", llvm::cl::desc("...")};
  List<int> exampleListOption{*this, "list-flag-name", llvm::cl::desc("...")};
};

static PassRegistration<MyPass, MyPassOptions> pass("my-pass", "description");
```

PiperOrigin-RevId: 273650140


  Commit: b3a6ae8363b9d9c4d3794edabc0b3407280e4fd2
      https://github.com/llvm/llvm-project/commit/b3a6ae8363b9d9c4d3794edabc0b3407280e4fd2
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-10-08 (Tue, 08 Oct 2019)

  Changed paths:
    M mlir/include/mlir/IR/SymbolTable.h
    M mlir/lib/IR/SymbolTable.cpp
    M mlir/test/IR/test-symbol-uses.mlir
    M mlir/test/lib/IR/TestSymbolUses.cpp

  Log Message:
  -----------
  Update the symbol utility methods to handle the case of unknown operations.

This enhances the symbol table utility methods to handle the case where an unknown operation may define a symbol table. When walking symbols, we now collect all symbol uses before allowing the user to iterate. This prevents the user from assuming that all symbols are actually known before performing a transformation.

PiperOrigin-RevId: 273651963


  Commit: 85b46314c047532e5d38b3c417cb65014c97033e
      https://github.com/llvm/llvm-project/commit/85b46314c047532e5d38b3c417cb65014c97033e
  Author: Smit Hinsu <hinsu at google.com>
  Date:   2019-10-08 (Tue, 08 Oct 2019)

  Changed paths:
    M mlir/include/mlir/IR/TypeUtilities.h
    M mlir/lib/Dialect/StandardOps/Ops.cpp
    M mlir/lib/IR/Operation.cpp
    M mlir/lib/IR/TypeUtilities.cpp
    M mlir/test/IR/invalid-ops.mlir
    M mlir/test/IR/traits.mlir
    M mlir/test/lib/TestDialect/TestOps.td

  Log Message:
  -----------
  Allow dynamic but ranked types in ops with SameOperandsAndResultShape and SameOperandsAndResultType traits

Currently SameOperandsAndResultShape trait allows operands to have tensor<*xf32> and tensor<2xf32> but doesn't allow tensor<?xf32> and tensor<10xf32>.

Also, use the updated shape compatibility helper function in TensorCastOp::areCastCompatible method.

PiperOrigin-RevId: 273658336


  Commit: 395ce4b41b8ac30c173ea52a2247d214e048ac3e
      https://github.com/llvm/llvm-project/commit/395ce4b41b8ac30c173ea52a2247d214e048ac3e
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-10-08 (Tue, 08 Oct 2019)

  Changed paths:
    M mlir/test/lib/Pass/TestPassManager.cpp

  Log Message:
  -----------
  NFC: Fully qualify use of std::string.
PiperOrigin-RevId: 273668957


  Commit: 7c67ec0f032f41565d8d958703fd96717f7f7dce
      https://github.com/llvm/llvm-project/commit/7c67ec0f032f41565d8d958703fd96717f7f7dce
  Author: Christian Sigg <csigg at google.com>
  Date:   2019-10-09 (Wed, 09 Oct 2019)

  Changed paths:
    M mlir/lib/IR/Region.cpp

  Log Message:
  -----------
  Assert that region is not cloned into itself.

PiperOrigin-RevId: 273707291


  Commit: 48f819c113d7f518d7722c66e130b64a708b1ad8
      https://github.com/llvm/llvm-project/commit/48f819c113d7f518d7722c66e130b64a708b1ad8
  Author: Christian Sigg <csigg at google.com>
  Date:   2019-10-09 (Wed, 09 Oct 2019)

  Changed paths:
    M mlir/lib/Conversion/GPUToNVVM/LowerGpuOpsToNVVMOps.cpp

  Log Message:
  -----------
  Change to doxygen comments. NFC.

PiperOrigin-RevId: 273707610


  Commit: c9c24ca23b669307102878c3c41e88d4ef5431f9
      https://github.com/llvm/llvm-project/commit/c9c24ca23b669307102878c3c41e88d4ef5431f9
  Author: Alexander Belyaev <pifon at google.com>
  Date:   2019-10-09 (Wed, 09 Oct 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
    M mlir/test/Target/llvmir-intrinsics.mlir

  Log Message:
  -----------
  Add exp operation to LLVMOPs.td.

PiperOrigin-RevId: 273718958


  Commit: 15f8ee62239c61300b03f07d49cadb1b0a990fd4
      https://github.com/llvm/llvm-project/commit/15f8ee62239c61300b03f07d49cadb1b0a990fd4
  Author: MLIR Team <no-reply at google.com>
  Date:   2019-10-09 (Wed, 09 Oct 2019)

  Changed paths:
    M mlir/utils/spirv/define_inst.sh

  Log Message:
  -----------
  Update the usage and comments in define_inst.sh.

PiperOrigin-RevId: 273723108


  Commit: 3451055614a26f353438430d32e7920ce57ab4b9
      https://github.com/llvm/llvm-project/commit/3451055614a26f353438430d32e7920ce57ab4b9
  Author: Diego Caballero <diego.caballero at intel.com>
  Date:   2019-10-09 (Wed, 09 Oct 2019)

  Changed paths:
    M mlir/lib/Transforms/LoopFusion.cpp
    M mlir/test/Transforms/loop-fusion.mlir

  Log Message:
  -----------
  Add support for some multi-store cases in affine fusion

This PR is a stepping stone towards supporting generic multi-store
source loop nests in affine loop fusion. It extends the algorithm to
support fusion of multi-store loop nests that:
 1. have only one store that writes to a function-local live out, and
 2. the remaining stores are involved in loop nest self dependences
    or no dependences within the function.

Closes tensorflow/mlir#162

COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/162 from dcaballe:dcaballe/multi-output-fusion 7fb7dec6fe8b45f5ce176f018bfe37b256420c45
PiperOrigin-RevId: 273773907


  Commit: 171637d4f062e5993ecd807f3480cb2a565fa188
      https://github.com/llvm/llvm-project/commit/171637d4f062e5993ecd807f3480cb2a565fa188
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2019-10-09 (Wed, 09 Oct 2019)

  Changed paths:
    M mlir/test/mlir-cpu-runner/include/mlir_runner_utils.h

  Log Message:
  -----------
  Fix Windows linkage error

This CL fixes bad macro names usage in mlir_runner_utils.h.
The macro mlir_runner_utils_EXPORTS now matches what is defined in CMakeLists.txt.

PiperOrigin-RevId: 273773931


  Commit: e2ed25bc437fa5137fb47d0f76426a3b81256399
      https://github.com/llvm/llvm-project/commit/e2ed25bc437fa5137fb47d0f76426a3b81256399
  Author: Mahesh Ravishankar <ravishankarm at google.com>
  Date:   2019-10-09 (Wed, 09 Oct 2019)

  Changed paths:
    M mlir/include/mlir/Conversion/StandardToSPIRV/ConvertStandardToSPIRV.h
    M mlir/lib/Conversion/GPUToSPIRV/GPUToSPIRV.cpp
    M mlir/lib/Conversion/StandardToSPIRV/ConvertStandardToSPIRV.cpp
    M mlir/test/Conversion/GPUToSPIRV/load_store.mlir
    M mlir/test/Conversion/GPUToSPIRV/simple.mlir

  Log Message:
  -----------
  Make SPIR-V lowering infrastructure follow Vulkan SPIR-V validation.

The lowering infrastructure needs to be enhanced to lower into a
spv.Module that is consistent with the SPIR-V spec. The following
changes are needed
1) The Vulkan/SPIR-V validation rules dictates entry functions to have
signature of void(void). This requires changes to the function
signature conversion infrastructure within the dialect conversion
framework. When an argument is dropped from the original function
signature, a function can be specified that when invoked will return
the value to use as a replacement for the argument from the original
function.
2) Some changes to the type converter to make the converted type
consistent with the Vulkan/SPIR-V validation rules,
   a) Add support for converting dynamically shaped tensors to
   spv.rtarray type.
   b) Make the global variable of type !spv.ptr<!spv.struct<...>>
3) Generate the entry point operation for the kernel functions and
automatically compute all the interface variables needed

PiperOrigin-RevId: 273784229


  Commit: 35bb732032aca1c57ffe2dfb47d6d05e651b24e2
      https://github.com/llvm/llvm-project/commit/35bb732032aca1c57ffe2dfb47d6d05e651b24e2
  Author: Christian Sigg <csigg at google.com>
  Date:   2019-10-09 (Wed, 09 Oct 2019)

  Changed paths:
    M mlir/lib/Transforms/DialectConversion.cpp

  Log Message:
  -----------
  Guard rewriter insertion point during signature conversion.

Avoid unexpected side effect in rewriter insertion point.

PiperOrigin-RevId: 273785794


  Commit: ae6946ec11e0953461ae35077d082d59ab3573cf
      https://github.com/llvm/llvm-project/commit/ae6946ec11e0953461ae35077d082d59ab3573cf
  Author: MLIR Team <no-reply at google.com>
  Date:   2019-10-09 (Wed, 09 Oct 2019)

  Changed paths:
    M mlir/g3doc/WritingAPass.md
    M mlir/include/mlir/Pass/Pass.h
    M mlir/include/mlir/Pass/PassManager.h
    M mlir/lib/Pass/Pass.cpp
    M mlir/test/Pass/pipeline-options-parsing.mlir
    M mlir/test/lib/Pass/TestPassManager.cpp

  Log Message:
  -----------
  Add ::printAsTextualPipeline to Pass and OpPassManager.

Allow printing out pipelines in a format that is as close as possible to the
textual pass pipeline format. Individual passes can override the print function
in order to format any options that may have been used to construct that pass.

PiperOrigin-RevId: 273813627


  Commit: 27f400c8137a90e389b104138a3634044b3b3937
      https://github.com/llvm/llvm-project/commit/27f400c8137a90e389b104138a3634044b3b3937
  Author: Kazuaki Ishizaki <kiszk at users.noreply.github.com>
  Date:   2019-10-09 (Wed, 09 Oct 2019)

  Changed paths:
    M mlir/include/mlir/Analysis/AffineStructures.h
    M mlir/include/mlir/Analysis/CallGraph.h
    M mlir/include/mlir/Conversion/GPUToNVVM/GPUToNVVMPass.h
    M mlir/include/mlir/Dialect/AffineOps/AffineOps.h
    M mlir/include/mlir/Dialect/FxpMathOps/FxpMathOps.td
    M mlir/include/mlir/Dialect/SDBM/SDBMExpr.h
    M mlir/include/mlir/Dialect/SPIRV/SPIRVBase.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVGLSLOps.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVStructureOps.td
    M mlir/include/mlir/Dialect/SPIRV/Serialization.h
    M mlir/include/mlir/Dialect/StandardOps/Ops.td
    M mlir/include/mlir/Dialect/Traits.h
    M mlir/include/mlir/EDSC/Intrinsics.h
    M mlir/include/mlir/IR/AffineExprVisitor.h
    M mlir/include/mlir/IR/Attributes.h
    M mlir/include/mlir/IR/Block.h
    M mlir/include/mlir/IR/FunctionSupport.h
    M mlir/include/mlir/IR/IntegerSet.h
    M mlir/include/mlir/IR/Matchers.h
    M mlir/include/mlir/IR/Module.h
    M mlir/include/mlir/IR/OpBase.td
    M mlir/include/mlir/IR/OperationSupport.h
    M mlir/include/mlir/IR/Types.h
    M mlir/include/mlir/Pass/PassInstrumentation.h
    M mlir/include/mlir/Quantizer/Support/Metadata.h
    M mlir/include/mlir/Quantizer/Support/Statistics.h
    M mlir/include/mlir/Quantizer/Support/UniformSolvers.h
    M mlir/include/mlir/TableGen/Operator.h
    M mlir/include/mlir/TableGen/Pattern.h
    M mlir/include/mlir/Target/LLVMIR.h
    M mlir/include/mlir/Target/NVVMIR.h
    M mlir/include/mlir/Target/ROCDLIR.h
    M mlir/include/mlir/Transforms/InliningUtils.h
    M mlir/include/mlir/Transforms/Passes.h
    M mlir/tools/mlir-tblgen/EnumsGen.cpp
    M mlir/tools/mlir-tblgen/LLVMIRConversionGen.cpp
    M mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
    M mlir/tools/mlir-tblgen/SPIRVUtilsGen.cpp

  Log Message:
  -----------
  minor spelling tweaks

--
f93661f2c25aab6cc5bf439606b0a1312998a575 by Kazuaki Ishizaki <ishizaki at jp.ibm.com>:

address @River707's comment

Closes tensorflow/mlir#176

COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/176 from kiszk:spelling_tweaks_include_tools f93661f2c25aab6cc5bf439606b0a1312998a575
PiperOrigin-RevId: 273830689


  Commit: 221e661e911af59f01b7b9ba214377daf8f50611
      https://github.com/llvm/llvm-project/commit/221e661e911af59f01b7b9ba214377daf8f50611
  Author: MLIR Team <no-reply at google.com>
  Date:   2019-10-09 (Wed, 09 Oct 2019)

  Changed paths:
    M mlir/lib/IR/Diagnostics.cpp

  Log Message:
  -----------
  Pre-allocate space for results from a regex match that uses 3 match strings.

That space is 4 StringRefs, not 3, because element 0 of the match always
contains the entire source string.

PiperOrigin-RevId: 273875606


  Commit: f5813ff8e1133be1cea20166230e578281e341c3
      https://github.com/llvm/llvm-project/commit/f5813ff8e1133be1cea20166230e578281e341c3
  Author: Kazuaki Ishizaki <kiszk at users.noreply.github.com>
  Date:   2019-10-09 (Wed, 09 Oct 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/QuantOps/QuantTypes.h
    M mlir/lib/Dialect/QuantOps/IR/QuantTypes.cpp
    M mlir/lib/Dialect/QuantOps/IR/TypeParser.cpp

  Log Message:
  -----------
  Fix typo in QuantizedType method names

Closes tensorflow/mlir#172

COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/172 from kiszk:quantops e27b57eac8f4c6ef7ee6a6f7b497d3e2f56f6798
PiperOrigin-RevId: 273879164


  Commit: 309b4556d00f531988f34930eedb546512ee619f
      https://github.com/llvm/llvm-project/commit/309b4556d00f531988f34930eedb546512ee619f
  Author: Parker Schuh <parkers at google.com>
  Date:   2019-10-09 (Wed, 09 Oct 2019)

  Changed paths:
    M mlir/test/Transforms/test-canonicalize.mlir
    M mlir/test/lib/TestDialect/TestDialect.cpp
    M mlir/test/lib/TestDialect/TestOps.td

  Log Message:
  -----------
  Add test for fix to tablegen for custom folders for ops that return a single
variadic result.

Add missing test for single line fix to `void OpEmitter::genFolderDecls()`
entitled "Fold away reduction over 0 dimensions."

PiperOrigin-RevId: 273880337


  Commit: 5e7959a3531c8019052bae3a84a42a67c5857bc9
      https://github.com/llvm/llvm-project/commit/5e7959a3531c8019052bae3a84a42a67c5857bc9
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2019-10-10 (Thu, 10 Oct 2019)

  Changed paths:
    M mlir/examples/Linalg/Linalg3/lib/ConvertToLLVMDialect.cpp
    M mlir/examples/toy/Ch5/mlir/LateLowering.cpp
    M mlir/g3doc/ConversionToLLVMDialect.md
    M mlir/g3doc/Dialects/LLVM.md
    M mlir/include/mlir/Conversion/GPUToCUDA/GPUToCUDAPass.h
    M mlir/include/mlir/Conversion/StandardToLLVM/ConvertStandardToLLVM.h
    M mlir/include/mlir/Dialect/GPU/GPUDialect.h
    M mlir/include/mlir/Dialect/LLVMIR/LLVMDialect.h
    M mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
    M mlir/include/mlir/Target/LLVMIR/ModuleTranslation.h
    M mlir/lib/Conversion/GPUToCUDA/ConvertLaunchFuncToCudaCalls.cpp
    M mlir/lib/Conversion/GPUToNVVM/LowerGpuOpsToNVVMOps.cpp
    M mlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp
    M mlir/lib/Dialect/GPU/CMakeLists.txt
    M mlir/lib/Dialect/GPU/IR/GPUDialect.cpp
    M mlir/lib/Dialect/Linalg/Transforms/LowerToLLVMDialect.cpp
    M mlir/lib/Support/JitRunner.cpp
    M mlir/lib/Target/CMakeLists.txt
    M mlir/lib/Target/LLVMIR/ConvertToNVVMIR.cpp
    M mlir/lib/Target/LLVMIR/ConvertToROCDLIR.cpp
    M mlir/lib/Target/LLVMIR/ModuleTranslation.cpp
    M mlir/test/Conversion/GPUToCUDA/lower-launch-func-to-cuda.mlir
    M mlir/test/Conversion/GPUToCUDA/lower-nvvm-kernel-to-cubin.mlir
    M mlir/test/Target/llvmir-intrinsics.mlir
    M mlir/test/Target/llvmir.mlir
    M mlir/test/Target/nvvmir.mlir
    M mlir/test/Target/rocdl.mlir
    M mlir/test/mlir-cpu-runner/simple.mlir
    M mlir/test/mlir-cpu-runner/utils.mlir

  Log Message:
  -----------
  Use llvm.func to define functions with wrapped LLVM IR function type

This function-like operation allows one to define functions that have wrapped
LLVM IR function type, in particular variadic functions. The operation was
added in parallel to the existing lowering flow, this commit only switches the
flow to use it.

Using a custom function type makes the LLVM IR dialect type system more
consistent and avoids complex conversion rules for functions that previously
had to use the built-in function type instead of a wrapped LLVM IR dialect type
and perform conversions during the analysis.

PiperOrigin-RevId: 273910855


  Commit: cc145706aa57d882b0c863fab29f7e777c1839a0
      https://github.com/llvm/llvm-project/commit/cc145706aa57d882b0c863fab29f7e777c1839a0
  Author: Geoffrey Martin-Noble <gcmn at google.com>
  Date:   2019-10-10 (Thu, 10 Oct 2019)

  Changed paths:
    M mlir/test/IR/traits.mlir
    M mlir/test/lib/TestDialect/TestOps.td
    M mlir/test/mlir-tblgen/types.mlir

  Log Message:
  -----------
  NFC: Cleanup of type checking tests

1. Rename test ops referencing operand to index from 0 consistent with how we index elsewhere.
2. Don't limit type checking that functions for all shaped types to only tensors.
3. Don't limit (element) type checking functions and add tests for scalars.
4. Remove SSA values that don't do anything.

PiperOrigin-RevId: 273917608


  Commit: 82dc6c449211c48473e23883e43395ebbff63b14
      https://github.com/llvm/llvm-project/commit/82dc6c449211c48473e23883e43395ebbff63b14
  Author: Christian Sigg <csigg at google.com>
  Date:   2019-10-10 (Thu, 10 Oct 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/GPU/GPUDialect.h
    M mlir/lib/Conversion/GPUToNVVM/LowerGpuOpsToNVVMOps.cpp

  Log Message:
  -----------
  Mark GPU dialect as illegal when lowering to NVVM.

PiperOrigin-RevId: 273948293


  Commit: ea34c2a7a4eba46a1ab7d81ed6c6159b852510da
      https://github.com/llvm/llvm-project/commit/ea34c2a7a4eba46a1ab7d81ed6c6159b852510da
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2019-10-10 (Thu, 10 Oct 2019)

  Changed paths:
    M mlir/bindings/python/pybind.cpp
    M mlir/bindings/python/test/test_py2and3.py

  Log Message:
  -----------
  Python bindings: export index_cast

We are now properly enforcing the absence of index elements in memrefs and
tensors. Instead, users are expected to store sized integers and cast them to
index type if necessary. Expose the respective operation to Python bindings.

PiperOrigin-RevId: 273985856


  Commit: 438dc176b14dca318fb6c69250b1ec12666501d2
      https://github.com/llvm/llvm-project/commit/438dc176b14dca318fb6c69250b1ec12666501d2
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-10-10 (Thu, 10 Oct 2019)

  Changed paths:
    M mlir/lib/Dialect/Linalg/Transforms/LowerToLLVMDialect.cpp
    M mlir/lib/Transforms/DialectConversion.cpp
    M mlir/test/Transforms/test-legalizer-full.mlir
    M mlir/test/Transforms/test-legalizer.mlir

  Log Message:
  -----------
  Remove the need to convert operations in regions of operations that have been replaced.

When an operation with regions gets replaced, we currently require that all of the remaining nested operations are still converted even though they are going to be replaced when the rewrite is finished. This cl adds a tracking for a minimal set of operations that are known to be "dead". This allows for ignoring the legalization of operations that are won't survive after conversion.

PiperOrigin-RevId: 274009003


  Commit: 6b1cc3c6eac0f76c6a771cb8dbde4d8b58c34f21
      https://github.com/llvm/llvm-project/commit/6b1cc3c6eac0f76c6a771cb8dbde4d8b58c34f21
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-10-10 (Thu, 10 Oct 2019)

  Changed paths:
    M mlir/include/mlir/Analysis/CallGraph.h
    M mlir/include/mlir/IR/PatternMatch.h
    M mlir/lib/Analysis/CallGraph.cpp
    M mlir/lib/Transforms/Inliner.cpp
    M mlir/lib/Transforms/Utils/GreedyPatternRewriteDriver.cpp
    M mlir/test/AffineOps/inlining.mlir
    M mlir/test/Transforms/inlining.mlir

  Log Message:
  -----------
  Add support for canonicalizing callable regions during inlining.

This will allow for inlining newly devirtualized calls, as well as give a more accurate cost model(when we have one). Currently canonicalization will only run for nodes that have no child edges, as the child nodes may be erased during canonicalization. We can support this in the future, but it requires more intricate deletion tracking.

PiperOrigin-RevId: 274011386


  Commit: 736f80d0ddd87dcdf165aa39730a4af04a8f71e2
      https://github.com/llvm/llvm-project/commit/736f80d0ddd87dcdf165aa39730a4af04a8f71e2
  Author: Geoffrey Martin-Noble <gcmn at google.com>
  Date:   2019-10-10 (Thu, 10 Oct 2019)

  Changed paths:
    M mlir/include/mlir/IR/OpBase.td
    M mlir/test/lib/TestDialect/TestOps.td
    M mlir/test/mlir-tblgen/types.mlir

  Log Message:
  -----------
  Add trait for specified shapes matching

PiperOrigin-RevId: 274046434


  Commit: 28d7f9c052c8cb524e016827e54314946cf0d037
      https://github.com/llvm/llvm-project/commit/28d7f9c052c8cb524e016827e54314946cf0d037
  Author: Mahesh Ravishankar <ravishankarm at google.com>
  Date:   2019-10-10 (Thu, 10 Oct 2019)

  Changed paths:
    M mlir/lib/Conversion/StandardToSPIRV/ConvertStandardToSPIRV.cpp
    M mlir/lib/Conversion/StandardToSPIRV/StandardToSPIRV.td
    A mlir/test/Conversion/StandardToSPIRV/op_conversion.mlir
    R mlir/test/Dialect/SPIRV/standard_ops_to_spirv.mlir

  Log Message:
  -----------
  Add lowering of constant ops to SPIR-V.

The lowering is specified as a pattern and is done only if the result
is a SPIR-V scalar type or vector type.
Handling ConstantOp with index return type needs special handling
since SPIR-V dialect does not have index types. Based on the bitwidth
of the attribute value, either i32 or i64 is chosen.
Other constant lowerings are left as a TODO.

PiperOrigin-RevId: 274056805


  Commit: 4dde19f02473fdec8e047de2488b6b770523077a
      https://github.com/llvm/llvm-project/commit/4dde19f02473fdec8e047de2488b6b770523077a
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2019-10-10 (Thu, 10 Oct 2019)

  Changed paths:
    M mlir/include/mlir/Target/LLVMIR/ModuleTranslation.h
    M mlir/lib/Target/LLVMIR/ModuleTranslation.cpp

  Log Message:
  -----------
  Translation to LLVM: check the validity of module-level Ops

Translation to LLVM expects the entry module to have only specific types of ops
that correspond to LLVM IR entities allowed in a module. Currently those are
restricted to functions and globals. Introduce an additional check at the
module level. Inside individual functions, the check for supported Ops is
already performed, but it accepts all LLVM dialect Ops and wouldn't be
immediately applicable at the module level.

PiperOrigin-RevId: 274058651


  Commit: 08a2ce8a14077b5f39ac196525e16cad513a578b
      https://github.com/llvm/llvm-project/commit/08a2ce8a14077b5f39ac196525e16cad513a578b
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2019-10-10 (Thu, 10 Oct 2019)

  Changed paths:
    M mlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp
    M mlir/test/Conversion/StandardToLLVM/standard-to-llvm.mlir

  Log Message:
  -----------
  Standard-to-LLVM conversion: check that operands have LLVM types

In Standard to LLVM dialect conversion, the binary op conversion pattern
implicitly assumed some operands were of LLVM IR dialect type. This is not
necessarily true, for example if the Ops that produce those operands did not
match the existing convresion patterns. Check if all operands are of LLVM IR
dialect type and if not, fail to patch the binary op pattern.

Closes tensorflow/mlir#168

PiperOrigin-RevId: 274063207


  Commit: b245e9519c3870b3ecaac100b429381aeb5382ca
      https://github.com/llvm/llvm-project/commit/b245e9519c3870b3ecaac100b429381aeb5382ca
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-10-10 (Thu, 10 Oct 2019)

  Changed paths:
    M mlir/lib/Pass/PassManagerOptions.cpp

  Log Message:
  -----------
  NFC: Initialize pass manager option fields inline instead of the class constructor.
PiperOrigin-RevId: 274087577


  Commit: 7a7dcc171da1472dcb2ab80cec3de218088796a5
      https://github.com/llvm/llvm-project/commit/7a7dcc171da1472dcb2ab80cec3de218088796a5
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-10-10 (Thu, 10 Oct 2019)

  Changed paths:
    M mlir/g3doc/WritingAPass.md
    M mlir/include/mlir/Pass/PassManager.h
    M mlir/lib/Pass/Pass.cpp
    M mlir/lib/Pass/PassManagerOptions.cpp
    A mlir/test/Pass/crash-recovery.mlir
    M mlir/test/lib/Pass/TestPassManager.cpp

  Log Message:
  -----------
  Add support for generating reproducers on pass crash and failure.

This cl adds support for generating a .mlir file containing a reproducer for crashes and failures that happen during pass execution. The reproducer contains a comment detailing the configuration of the pass manager(e.g. the textual description of the pass pipeline that the pass manager was executing), along with the original input module.

Example Output:

// configuration: -pass-pipeline='func(cse, canonicalize), inline'
// note: verifyPasses=false

module {
  ...
}

PiperOrigin-RevId: 274088134


  Commit: 978b209d3820f4939ef8178bc968288303018b24
      https://github.com/llvm/llvm-project/commit/978b209d3820f4939ef8178bc968288303018b24
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-10-10 (Thu, 10 Oct 2019)

  Changed paths:
    M mlir/lib/Pass/IRPrinting.cpp

  Log Message:
  -----------
  NFC: Print the generic op form after pass failure.

On failure, the IR is likely to be in an invalid state, meaning the custom printer for some operations may now crash. Using the generic op form prevents this from happening.

PiperOrigin-RevId: 274104146


  Commit: 304e44a6b0eab92114761a50d36bbe6cc371ec10
      https://github.com/llvm/llvm-project/commit/304e44a6b0eab92114761a50d36bbe6cc371ec10
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2019-10-11 (Fri, 11 Oct 2019)

  Changed paths:
    M mlir/test/Conversion/StandardToLLVM/convert-funcs.mlir

  Log Message:
  -----------
  LLVM conversion: harden a test to check for LLVM funcs rather than any funcs

This test was not updated in the original commit that switched to using LLVM
functions since it wasn't broken by that change. FileCheck was able to match
the `func` part of `llvm.func` to the expected pattern and continue as usual.
Make sure the `llvm.` dialect prefix is included in the expected output.

PiperOrigin-RevId: 274127281


  Commit: 00d2a37e32067a6b41d16d605dfeb8637cc4cfbb
      https://github.com/llvm/llvm-project/commit/00d2a37e32067a6b41d16d605dfeb8637cc4cfbb
  Author: Alexander Belyaev <pifon at google.com>
  Date:   2019-10-11 (Fri, 11 Oct 2019)

  Changed paths:
    M mlir/g3doc/Dialects/Standard.md
    M mlir/include/mlir/Dialect/StandardOps/Ops.td
    M mlir/include/mlir/IR/OpDefinition.h
    M mlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp
    M mlir/lib/Dialect/StandardOps/Ops.cpp
    M mlir/test/Conversion/StandardToLLVM/convert-to-llvmir.mlir
    M mlir/test/IR/core-ops.mlir

  Log Message:
  -----------
  Add unary ops and ExpOp to Standard Dialect.

PiperOrigin-RevId: 274152154


  Commit: 7301ac72bc45e0dd9a4fab507d53826e159139b0
      https://github.com/llvm/llvm-project/commit/7301ac72bc45e0dd9a4fab507d53826e159139b0
  Author: Alexander Belyaev <pifon at google.com>
  Date:   2019-10-11 (Fri, 11 Oct 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
    M mlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp
    M mlir/lib/Conversion/VectorToLLVM/VectorToLLVM.cpp

  Log Message:
  -----------
  Rename LLVM::exp and LLVM::fmuladd to LLVM::ExpOP and LLVM::FMulAddOp.

PiperOrigin-RevId: 274154655


  Commit: 47596f534555477ac5cee3b55095af97ca7d7cdb
      https://github.com/llvm/llvm-project/commit/47596f534555477ac5cee3b55095af97ca7d7cdb
  Author: Uday Bondhugula <udayb at iisc.ac.in>
  Date:   2019-10-11 (Fri, 11 Oct 2019)

  Changed paths:
    M mlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp

  Log Message:
  -----------
  Drop obsolete code from std to llvm memref lowering

- dropping what looks like outdated code post some of the previous
  updates

Signed-off-by: Uday Bondhugula <uday at polymagelabs.com>

Closes tensorflow/mlir#179

COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/179 from bondhugula:llfix 2a72ea441fe1b3924802273ffbe9870afeb90f91
PiperOrigin-RevId: 274158273


  Commit: 71b82bcbf653fff62bf350991eb23fccd8796531
      https://github.com/llvm/llvm-project/commit/71b82bcbf653fff62bf350991eb23fccd8796531
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2019-10-11 (Fri, 11 Oct 2019)

  Changed paths:
    M mlir/g3doc/Dialects/LLVM.md
    M mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
    M mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
    M mlir/test/Dialect/LLVMIR/invalid.mlir
    M mlir/test/Dialect/LLVMIR/roundtrip.mlir
    M mlir/test/Target/llvmir.mlir

  Log Message:
  -----------
  LLVM Dialect: introduce llvm.mlir.null operation

Similarly to `llvm.mlir.undef`, this auxiliary operation creates an SSA value
that corresponds to `null` in LLVM IR.  This operation is necessary to model
sizeof(<...>) behavior when allocating memory.

PiperOrigin-RevId: 274158760


  Commit: 8c2ea320728a381c8b7441990bc9929ff22fae5f
      https://github.com/llvm/llvm-project/commit/8c2ea320728a381c8b7441990bc9929ff22fae5f
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2019-10-11 (Fri, 11 Oct 2019)

  Changed paths:
    M mlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp
    M mlir/test/Conversion/StandardToLLVM/convert-memref-ops.mlir
    M mlir/test/Examples/Toy/Ch5/lowering.toy

  Log Message:
  -----------
  Emit LLVM IR equivalent of sizeof when lowering alloc operations

Originally, the lowering of `alloc` operations has been computing the number of
bytes to allocate when lowering based on the properties of MLIR type. This does
not take into account type legalization that happens when compiling LLVM IR
down to target assembly. This legalization can widen the type, potentially
leading to out-of-bounds accesses to `alloc`ed data due to mismatches between
address computation that takes the widening into account and allocation that
does not. Use the LLVM IR's equivalent of `sizeof` to compute the number of
bytes to be allocated:
  %0 = getelementptr %type* null, %indexType 0
  %1 = ptrtoint %type* %0 to %indexType
adapted from
http://nondot.org/sabre/LLVMNotes/SizeOf-OffsetOf-VariableSizedStructs.txt

PiperOrigin-RevId: 274159900


  Commit: a3d084848da3ee5c58e2fe54b5ecadeec3c22c4c
      https://github.com/llvm/llvm-project/commit/a3d084848da3ee5c58e2fe54b5ecadeec3c22c4c
  Author: Eric Schweitz <eric.schweitz at pgroup.com>
  Date:   2019-10-11 (Fri, 11 Oct 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/LLVMIR/LLVMDialect.h
    M mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
    M mlir/test/Dialect/LLVMIR/roundtrip.mlir

  Log Message:
  -----------
  Add LLVM IR dialect hooks for FP128 and X86_FP80 types

Closes tensorflow/mlir#184

COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/184 from schweitzpgi:more-float-types ca27d00510a86ffc9c79c65fb3a0193b5ea097a0
PiperOrigin-RevId: 274288813


  Commit: c2285b619d47ad3e9efc2dcee026dcb8fd77391d
      https://github.com/llvm/llvm-project/commit/c2285b619d47ad3e9efc2dcee026dcb8fd77391d
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2019-10-14 (Mon, 14 Oct 2019)

  Changed paths:
    M mlir/lib/Dialect/Linalg/Transforms/LowerToLLVMDialect.cpp
    M mlir/test/Dialect/Linalg/llvm.mlir

  Log Message:
  -----------
  Add lowering of VectorOps dialect to LLVM to the Linalg LLVM lowering pass

This fixes an omission that prevents Linalg to lower generic ops regions operating on ops in the VectorOps dialect.
To achieve this we simply need to `populateVectorToLLVMConversionPatterns` in the conversion.

Relevant tests are added.

PiperOrigin-RevId: 274577325


  Commit: 5c5d83afb469b275866cf92eaaabcc2c9ff1775f
      https://github.com/llvm/llvm-project/commit/5c5d83afb469b275866cf92eaaabcc2c9ff1775f
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2019-10-14 (Mon, 14 Oct 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/Linalg/IR/LinalgOps.td
    M mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
    M mlir/lib/Dialect/Linalg/Transforms/Fusion.cpp
    M mlir/lib/Dialect/Linalg/Transforms/Tiling.cpp
    M mlir/test/Dialect/Linalg/fusion.mlir
    M mlir/test/Dialect/Linalg/tile.mlir

  Log Message:
  -----------
  Fix linalg.subview behavior in (partially) static cases.

When the implementation of the strided memref [RFC](https://groups.google.com/a/tensorflow.org/forum/#!msg/mlir/MaL8m2nXuio/1scRqZa6AQAJ) landed, linalg started using this type instead of the now retired !linalg.view.

As static and partially static cases appear, the stride information needs to be maintained properly. In particular, the result type of the subview op was generally incorrect.

This CL fixes the issue by computing a return type that:
1. always has dynamic sizes, which is generally the only correct way to construct a subview in the absence of data padding and/or code versioning.
2. has the same strides as the base strided memref.

Point 1. above can be further refined but will needs further analysis and canonicalization to optimize the particular case where:
1. The base memref has static size along a given dimension.
2. The subview size can be statically derived (e.g. after canonicalization).
3. *And* the subview size is an even divisor of the base memref.

This 3rd constraint is well-known in the case of tiled layouts that don't assume implicit padding: the boundary tile may be only partial and has size given by `problem_size % tile_size`.

Tests are updated as appropriate.

PiperOrigin-RevId: 274578624


  Commit: 24c392f21c6ea9d2e1dbe39728e8a2fddb25e740
      https://github.com/llvm/llvm-project/commit/24c392f21c6ea9d2e1dbe39728e8a2fddb25e740
  Author: Mehdi Amini <aminim at google.com>
  Date:   2019-10-14 (Mon, 14 Oct 2019)

  Changed paths:
    M mlir/test/lit.site.cfg.py.in

  Log Message:
  -----------
  Use single quotes to wrap '@HOST_LDFLAGS@' in LIT config file

ldflags can contain double-quoted paths, so must use single quotes here.

PiperOrigin-RevId: 274581983


  Commit: 96de7091bcac2086fb3be55169ec4e826145c574
      https://github.com/llvm/llvm-project/commit/96de7091bcac2086fb3be55169ec4e826145c574
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-10-14 (Mon, 14 Oct 2019)

  Changed paths:
    M mlir/lib/Transforms/DialectConversion.cpp
    M mlir/test/Transforms/test-legalizer-full.mlir
    M mlir/test/lib/TestDialect/TestOps.td
    M mlir/test/lib/TestDialect/TestPatterns.cpp

  Log Message:
  -----------
  Allowing replacing non-root operations in DialectConversion.

When dealing with regions, or other patterns that need to generate temporary operations, it is useful to be able to replace other operations than the root op being matched. Before this PR, these operations would still be considered for legalization meaning that the conversion would either fail, erroneously need to mark these ops as legal, or add unnecessary patterns.

PiperOrigin-RevId: 274598513


  Commit: f29731d17f469722c73e33b6d503be0ab39cf907
      https://github.com/llvm/llvm-project/commit/f29731d17f469722c73e33b6d503be0ab39cf907
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-10-14 (Mon, 14 Oct 2019)

  Changed paths:
    M mlir/lib/IR/AsmPrinter.cpp
    M mlir/lib/IR/Value.cpp

  Log Message:
  -----------
  NFC: Replace usages of Value::getKind with explicit isa/casts.

It is more idiomatic to use the llvm::cast infrastructure for checking the type of a value.

PiperOrigin-RevId: 274684945


  Commit: 300112e135f82b1f6faf8aa2ef266a27f07234de
      https://github.com/llvm/llvm-project/commit/300112e135f82b1f6faf8aa2ef266a27f07234de
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-10-14 (Mon, 14 Oct 2019)

  Changed paths:
    M mlir/examples/toy/Ch2/CMakeLists.txt
    A mlir/examples/toy/Ch2/include/toy/Dialect.h
    A mlir/examples/toy/Ch2/include/toy/Ops.td
    A mlir/examples/toy/Ch2/mlir/Dialect.cpp
    M mlir/examples/toy/Ch2/mlir/MLIRGen.cpp
    M mlir/examples/toy/Ch2/toyc.cpp
    M mlir/g3doc/Tutorials/Toy/Ch-2.md
    M mlir/include/mlir/IR/OpBase.td
    M mlir/test/Examples/Toy/Ch2/invalid.mlir
    A mlir/test/Examples/Toy/Ch2/scalar.toy

  Log Message:
  -----------
  Merge Ch3 of the Toy tutorial into chapter 2.

This effectively rewrites Ch.2 to introduce dialects, operations, and registration instead of deferring to Ch.3. This allows for introducing the best practices up front(using ODS, registering operations, etc.), and limits the opaque API to the chapter document instead of the code.

PiperOrigin-RevId: 274724289


  Commit: 98815cfdd935a21e4b7358485aefca6c8a8d77b8
      https://github.com/llvm/llvm-project/commit/98815cfdd935a21e4b7358485aefca6c8a8d77b8
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2019-10-15 (Tue, 15 Oct 2019)

  Changed paths:
    M mlir/lib/IR/AsmPrinter.cpp

  Log Message:
  -----------
  AsmPrinter: avoid unused-variable warning

The value defined in a loop was not being used and the function producing it
re-evaluated instead. Use the value to avoid both the warning and the
re-evaluation.

PiperOrigin-RevId: 274794459


  Commit: c50e53c109e24e7926c29633f21e6b01cbd83604
      https://github.com/llvm/llvm-project/commit/c50e53c109e24e7926c29633f21e6b01cbd83604
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2019-10-15 (Tue, 15 Oct 2019)

  Changed paths:
    M mlir/bindings/python/pybind.cpp
    M mlir/bindings/python/test/test_py2and3.py
    M mlir/include/mlir-c/Core.h
    M mlir/lib/EDSC/CMakeLists.txt
    M mlir/lib/EDSC/CoreAPIs.cpp

  Log Message:
  -----------
  Expose mlir::parseType to bindings

Python bindings currently currently provide a makeScalarType function that
constructs one of the predefined types. It was implemented in the bindings
directly to circumvent the absence of standalone type parsing function. Now
that mlir::parseType has been made available, rely on the core parsing
procedure to construct types from strings in the bindings.

This changes includes a library reshuffling that splits out "CoreAPIs"
implementing the binding helper APIs into a separate library and makes that
dependent on the Parser library.

PiperOrigin-RevId: 274794516


  Commit: abf5c60af9d35284263b05f7a00c3974d553d467
      https://github.com/llvm/llvm-project/commit/abf5c60af9d35284263b05f7a00c3974d553d467
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2019-10-15 (Tue, 15 Oct 2019)

  Changed paths:
    M mlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp
    M mlir/test/mlir-cpu-runner/include/mlir_runner_utils.h
    M mlir/test/mlir-cpu-runner/mlir_runner_utils.cpp
    M mlir/test/mlir-cpu-runner/utils.mlir

  Log Message:
  -----------
  Add conversion for splat of vectors of 2+D

This CL adds a missing lowering for splat of multi-dimensional vectors.
Additional support is also added to the runtime utils library to allow printing memrefs with such vectors.

PiperOrigin-RevId: 274794723


  Commit: 31c5a41a30a7d4dc6874a684c6c6c21f1d36ba63
      https://github.com/llvm/llvm-project/commit/31c5a41a30a7d4dc6874a684c6c6c21f1d36ba63
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2019-10-15 (Tue, 15 Oct 2019)

  Changed paths:
    M mlir/test/mlir-cpu-runner/mlir_runner_utils.cpp

  Log Message:
  -----------
  Consistent use of int in mlir_runner_utils.cpp

This should fix the OSS build by only using int in template types.

PiperOrigin-RevId: 274843584


  Commit: 4e85dafeddc14b5ddca8e819f04dbdeeac57bbfc
      https://github.com/llvm/llvm-project/commit/4e85dafeddc14b5ddca8e819f04dbdeeac57bbfc
  Author: Jacques Pienaar <jpienaar at google.com>
  Date:   2019-10-15 (Tue, 15 Oct 2019)

  Changed paths:
    M mlir/g3doc/LangRef.md
    M mlir/g3doc/OpDefinitions.md

  Log Message:
  -----------
  Fix typos in LangRef and OpDefinitions

PiperOrigin-RevId: 274848361


  Commit: cd45b0c8d9f0eac7e76a892a2f2e993b340e90b5
      https://github.com/llvm/llvm-project/commit/cd45b0c8d9f0eac7e76a892a2f2e993b340e90b5
  Author: Sana Damani <sdamani at gatech.edu>
  Date:   2019-10-15 (Tue, 15 Oct 2019)

  Changed paths:
    M mlir/examples/toy/Ch3/CMakeLists.txt
    M mlir/examples/toy/Ch3/include/toy/AST.h
    M mlir/examples/toy/Ch3/include/toy/Dialect.h
    M mlir/examples/toy/Ch3/include/toy/Lexer.h
    A mlir/examples/toy/Ch3/include/toy/Ops.td
    A mlir/examples/toy/Ch3/mlir/Dialect.cpp
    M mlir/examples/toy/Ch3/mlir/MLIRGen.cpp
    A mlir/examples/toy/Ch3/mlir/ToyCombine.cpp
    A mlir/examples/toy/Ch3/mlir/ToyCombine.td
    R mlir/examples/toy/Ch3/mlir/ToyDialect.cpp
    M mlir/examples/toy/Ch3/parser/AST.cpp
    M mlir/examples/toy/Ch3/toyc.cpp
    M mlir/g3doc/Tutorials/Toy/Ch-3.md
    M mlir/test/Examples/Toy/Ch3/codegen.toy
    M mlir/test/Examples/Toy/Ch3/invalid.mlir
    M mlir/test/Examples/Toy/Ch3/scalar.toy

  Log Message:
  -----------
  Update Chapter 3 to demonstrate pattern match and rewrite optimizations

This is using Table-driven Declarative Rewrite Rules (DRR), the previous
version of the tutorial only showed the C++ patterns.

Closes tensorflow/mlir#187

PiperOrigin-RevId: 274852321


  Commit: f16e89f841c122f0c7df16bfcbd1751878fed3dc
      https://github.com/llvm/llvm-project/commit/f16e89f841c122f0c7df16bfcbd1751878fed3dc
  Author: Jacques Pienaar <jpienaar at google.com>
  Date:   2019-10-15 (Tue, 15 Oct 2019)

  Changed paths:
    M mlir/include/mlir/Analysis/InferTypeOpInterface.td

  Log Message:
  -----------
  Fix typos in InferTypeOpInterface.

PiperOrigin-RevId: 274866986


  Commit: 2903594635584076cda84df337c0ace06e78e991
      https://github.com/llvm/llvm-project/commit/2903594635584076cda84df337c0ace06e78e991
  Author: MLIR Team <no-reply at google.com>
  Date:   2019-10-15 (Tue, 15 Oct 2019)

  Changed paths:
    M mlir/g3doc/Tutorials/Toy/Ch-1.md

  Log Message:
  -----------
  Fix minor typos

PiperOrigin-RevId: 274892763


  Commit: e03e1519833439e57f2834b2717b35eba501a73e
      https://github.com/llvm/llvm-project/commit/e03e1519833439e57f2834b2717b35eba501a73e
  Author: Lei Zhang <antiagainst at google.com>
  Date:   2019-10-15 (Tue, 15 Oct 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/SPIRV/SPIRVStructureOps.td
    M mlir/lib/Dialect/SPIRV/SPIRVOps.cpp
    M mlir/lib/Dialect/SPIRV/Serialization/Deserializer.cpp
    M mlir/lib/Dialect/SPIRV/Serialization/Serializer.cpp
    M mlir/test/Dialect/SPIRV/Serialization/spec-constant.mlir
    M mlir/test/Dialect/SPIRV/structure-ops.mlir

  Log Message:
  -----------
  [spirv] Add support for SpecId decoration on spv.specConstant

The SpecId decoration is the handle for providing external specialization.
Similar to descriptor set and binding on global variables, we directly
bake it into assembly parsing and printing.

PiperOrigin-RevId: 274893879


  Commit: 1f83316a6be64e60b42b9032f490b26a9151e7e1
      https://github.com/llvm/llvm-project/commit/1f83316a6be64e60b42b9032f490b26a9151e7e1
  Author: MLIR Team <no-reply at google.com>
  Date:   2019-10-15 (Tue, 15 Oct 2019)

  Changed paths:
    M mlir/g3doc/Tutorials/Toy/Ch-2.md

  Log Message:
  -----------
  Fix typo

PiperOrigin-RevId: 274894550


  Commit: 050241ed3d1d941744d5bf4f9aeb7afee338c852
      https://github.com/llvm/llvm-project/commit/050241ed3d1d941744d5bf4f9aeb7afee338c852
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-10-15 (Tue, 15 Oct 2019)

  Changed paths:
    M mlir/examples/toy/Ch2/CMakeLists.txt
    A mlir/examples/toy/Ch2/include/CMakeLists.txt
    A mlir/examples/toy/Ch2/include/toy/CMakeLists.txt
    M mlir/examples/toy/Ch3/CMakeLists.txt
    A mlir/examples/toy/Ch3/include/CMakeLists.txt
    A mlir/examples/toy/Ch3/include/toy/CMakeLists.txt

  Log Message:
  -----------
  NFC: Split out ToyOpsIncGen into a separate CMakeLists.txt.

This fixes an issue with make where it fails to properly handle the dependency ordering.

PiperOrigin-RevId: 274897702


  Commit: c0b11f5cf4374ff846d0de41be35a83a07f391ec
      https://github.com/llvm/llvm-project/commit/c0b11f5cf4374ff846d0de41be35a83a07f391ec
  Author: MLIR Team <no-reply at google.com>
  Date:   2019-10-15 (Tue, 15 Oct 2019)

  Changed paths:
    M mlir/g3doc/Tutorials/Toy/Ch-3.md

  Log Message:
  -----------
  Fix typos

PiperOrigin-RevId: 274902838


  Commit: 2fc29f1eabc4ea58407cfed47e4288ca7e27e004
      https://github.com/llvm/llvm-project/commit/2fc29f1eabc4ea58407cfed47e4288ca7e27e004
  Author: MLIR Team <no-reply at google.com>
  Date:   2019-10-15 (Tue, 15 Oct 2019)

  Changed paths:
    M mlir/g3doc/Tutorials/Toy/Ch-3.md

  Log Message:
  -----------
  Fix typo

PiperOrigin-RevId: 274905193


  Commit: 950979745aea77f75015d5cd629ac8a3621a50fa
      https://github.com/llvm/llvm-project/commit/950979745aea77f75015d5cd629ac8a3621a50fa
  Author: Hanhan Wang <hanchung at google.com>
  Date:   2019-10-15 (Tue, 15 Oct 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/SPIRV/SPIRVBase.td
    A mlir/include/mlir/Dialect/SPIRV/SPIRVBitOps.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVOps.td
    A mlir/test/Dialect/SPIRV/bit-ops.mlir

  Log Message:
  -----------
  Add support for OpBitwiseOr, OpBitwiseXor, and OpBitwiseAnd in SPIR-V dialect.

PiperOrigin-RevId: 274935374


  Commit: a08482c1ad67002be80fefd2d0f8116941f37d02
      https://github.com/llvm/llvm-project/commit/a08482c1ad67002be80fefd2d0f8116941f37d02
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-10-16 (Wed, 16 Oct 2019)

  Changed paths:
    M mlir/examples/toy/Ch3/mlir/ToyCombine.cpp
    M mlir/examples/toy/Ch3/mlir/ToyCombine.td
    M mlir/examples/toy/Ch3/toyc.cpp

  Log Message:
  -----------
  NFC: Various code cleanups for Ch3.

This change refactors the toyc driver to be much cleaner and easier to extend. It also cleans up a few comments in the combiner.

PiperOrigin-RevId: 274973808


  Commit: 98f64b4da1afb7ca2c96de75d5c9cbe628ce3976
      https://github.com/llvm/llvm-project/commit/98f64b4da1afb7ca2c96de75d5c9cbe628ce3976
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-10-16 (Wed, 16 Oct 2019)

  Changed paths:
    M mlir/examples/toy/Ch2/include/toy/Ops.td

  Log Message:
  -----------
  NFC: Remove NoSideEffect traits from all ops except for ConstantOp.

These traits are added in chapter 3 when we begin discussion optimization on the toy operations.

PiperOrigin-RevId: 274974010


  Commit: b843cc5d5af10e35081751866d4fc216a0b5e5e4
      https://github.com/llvm/llvm-project/commit/b843cc5d5af10e35081751866d4fc216a0b5e5e4
  Author: Stephan Herhut <herhut at google.com>
  Date:   2019-10-16 (Wed, 16 Oct 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/AffineOps/AffineOps.h
    M mlir/include/mlir/Dialect/AffineOps/AffineOps.td
    M mlir/include/mlir/Dialect/LoopOps/LoopOps.h
    M mlir/include/mlir/Dialect/LoopOps/LoopOps.td
    M mlir/include/mlir/IR/Block.h
    A mlir/include/mlir/Transforms/LoopLikeInterface.h
    A mlir/include/mlir/Transforms/LoopLikeInterface.td
    M mlir/include/mlir/Transforms/Passes.h
    A mlir/include/mlir/Transforms/SideEffectsInterface.h
    M mlir/lib/Dialect/AffineOps/AffineOps.cpp
    M mlir/lib/Dialect/LoopOps/LoopOps.cpp
    A mlir/lib/Transforms/AffineLoopInvariantCodeMotion.cpp
    M mlir/lib/Transforms/LoopInvariantCodeMotion.cpp
    A mlir/test/Transforms/affine-loop-invariant-code-motion.mlir
    M mlir/test/Transforms/loop-invariant-code-motion.mlir

  Log Message:
  -----------
  Implement simple loop-invariant-code-motion based on dialect interfaces.

PiperOrigin-RevId: 275004258


  Commit: 2c533e29c23cea23dc4d38c60f5e207d1848b1c9
      https://github.com/llvm/llvm-project/commit/2c533e29c23cea23dc4d38c60f5e207d1848b1c9
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2019-10-16 (Wed, 16 Oct 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/VectorOps/VectorOps.td

  Log Message:
  -----------
  Fix typo in VectorOps.td

PiperOrigin-RevId: 275025323


  Commit: f1f9e3b8d18f305fd5eea2f209e323772f3ba76d
      https://github.com/llvm/llvm-project/commit/f1f9e3b8d18f305fd5eea2f209e323772f3ba76d
  Author: Mehdi Amini <aminim at google.com>
  Date:   2019-10-16 (Wed, 16 Oct 2019)

  Changed paths:
    M mlir/include/mlir/CMakeLists.txt
    A mlir/include/mlir/Transforms/CMakeLists.txt
    M mlir/lib/Dialect/AffineOps/CMakeLists.txt
    M mlir/lib/Dialect/LoopOps/CMakeLists.txt
    M mlir/lib/Transforms/CMakeLists.txt

  Log Message:
  -----------
  Fix CMake configuration after introduction of LICM and LoopLikeInterface

b843cc5d5a introduced a new op LICM transformation and a LoopLike interface,
but missed the CMake aspects of it. This should fix the build.

PiperOrigin-RevId: 275038533


  Commit: dfe09cc621ec11f36ec2e36f4fd01fce8ceec87f
      https://github.com/llvm/llvm-project/commit/dfe09cc621ec11f36ec2e36f4fd01fce8ceec87f
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-10-16 (Wed, 16 Oct 2019)

  Changed paths:
    M mlir/include/mlir/IR/PatternMatch.h
    M mlir/include/mlir/Transforms/DialectConversion.h
    M mlir/lib/Conversion/LoopToStandard/ConvertLoopToStandard.cpp
    M mlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp
    M mlir/lib/Dialect/Linalg/Transforms/LowerToLLVMDialect.cpp
    M mlir/lib/Dialect/Linalg/Transforms/LowerToLoops.cpp
    M mlir/lib/Dialect/StandardOps/Ops.cpp
    M mlir/lib/IR/PatternMatch.cpp
    M mlir/lib/Transforms/DialectConversion.cpp
    M mlir/lib/Transforms/LowerAffine.cpp
    M mlir/lib/Transforms/LowerVectorTransfers.cpp
    M mlir/test/lib/TestDialect/TestDialect.cpp
    M mlir/test/lib/TestDialect/TestPatterns.cpp

  Log Message:
  -----------
  Add support for PatternRewriter::eraseOp.

This hook is useful when an operation is known to be dead, and no replacement values make sense.

PiperOrigin-RevId: 275052756


  Commit: e7b49eef1d6ac06d49ef7bdd7187541afcea40a8
      https://github.com/llvm/llvm-project/commit/e7b49eef1d6ac06d49ef7bdd7187541afcea40a8
  Author: Mahesh Ravishankar <ravishankarm at google.com>
  Date:   2019-10-16 (Wed, 16 Oct 2019)

  Changed paths:
    M mlir/g3doc/DialectConversion.md
    M mlir/include/mlir/Transforms/DialectConversion.h
    M mlir/lib/Conversion/StandardToSPIRV/ConvertStandardToSPIRV.cpp
    M mlir/lib/Transforms/DialectConversion.cpp

  Log Message:
  -----------
  Allow for remapping argument to a Value in SignatureConversion.

The current SignatureConversion framework (part of DialectConversion)
allows remapping input arguments to a function from 1->0, 1->1 or
1->many arguments during conversion. Another case is where the
argument itself is dropped, but it's use are remapped to another
Value*.

An example of this is: The Vulkan/SPIR-V spec requires entry functions
to be of type void(void). The GPU -> SPIR-V conversion implemented
this without having the DialectConversion framework track the
remapping that lead to some undefined behavior. The changes here
addresses that.

PiperOrigin-RevId: 275059656


  Commit: d2f0f847af31009203215b158a5363f70c0b4d8d
      https://github.com/llvm/llvm-project/commit/d2f0f847af31009203215b158a5363f70c0b4d8d
  Author: Christian Sigg <csigg at google.com>
  Date:   2019-10-16 (Wed, 16 Oct 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/GPU/GPUOps.td
    M mlir/lib/Conversion/GPUToNVVM/LowerGpuOpsToNVVMOps.cpp
    M mlir/lib/Dialect/GPU/IR/GPUDialect.cpp
    M mlir/test/Conversion/GPUToNVVM/gpu-to-nvvm.mlir
    M mlir/test/Dialect/GPU/invalid.mlir
    M mlir/test/Dialect/GPU/ops.mlir
    A mlir/test/mlir-cuda-runner/all-reduce-op.mlir
    A mlir/test/mlir-cuda-runner/all-reduce-region.mlir
    R mlir/test/mlir-cuda-runner/all-reduce.mlir

  Log Message:
  -----------
  Support custom accumulator provided as region to gpu.all_reduce.

In addition to specifying the type of accumulation through the 'op' attribute, the accumulation can now also be specified as arbitrary code region.

Adds a gpu.yield op to specify the result of the accumulation.

Also support more types (integers) and accumulations (mul).

PiperOrigin-RevId: 275065447


  Commit: 54a847347040ab50a6c17881998f1cb3e899f1e0
      https://github.com/llvm/llvm-project/commit/54a847347040ab50a6c17881998f1cb3e899f1e0
  Author: Mahesh Ravishankar <ravishankarm at google.com>
  Date:   2019-10-16 (Wed, 16 Oct 2019)

  Changed paths:
    A mlir/include/mlir/Dialect/SPIRV/LayoutUtils.h
    M mlir/lib/Conversion/GPUToSPIRV/GPUToSPIRV.cpp
    M mlir/lib/Conversion/StandardToSPIRV/ConvertStandardToSPIRV.cpp
    M mlir/lib/Dialect/SPIRV/CMakeLists.txt
    A mlir/lib/Dialect/SPIRV/LayoutUtils.cpp
    M mlir/lib/Dialect/SPIRV/Transforms/DecorateSPIRVCompositeTypeLayoutPass.cpp
    M mlir/test/Conversion/GPUToSPIRV/load_store.mlir
    M mlir/test/Conversion/GPUToSPIRV/simple.mlir

  Log Message:
  -----------
  Makes spv.module generated by GPU->SPIRV conversion spec compliant

Makes the spv.module generated by the GPU to SPIR-V conversion SPIR-V
spec compliant (validated using spirv-val from Vulkan tools).

1) Separate out the VulkanLayoutUtils from
DecorateSPIRVCompositeTypeLayoutPass to make it reusable within the
Type converter in SPIR-V lowering infrastructure. This is used to
compute the layout of the !spv.struct used in global variable type
description.
2) Set the capabilities of the spv.module to Shader (needed for use of
Logical Memory Model, and the extensions to
SPV_KHR_storage_buffer_storage_class for use of Storage Buffer)

PiperOrigin-RevId: 275081486


  Commit: a3726a13f73040063786ced52ea6ba9c6c54f859
      https://github.com/llvm/llvm-project/commit/a3726a13f73040063786ced52ea6ba9c6c54f859
  Author: Geoffrey Martin-Noble <gcmn at google.com>
  Date:   2019-10-16 (Wed, 16 Oct 2019)

  Changed paths:
    M mlir/lib/IR/TypeDetail.h

  Log Message:
  -----------
  NFC: Update VectorOrTensor -> Shaped

This was missed when the type was renamed.

PiperOrigin-RevId: 275082588


  Commit: e88dbc8c955a9c17d5ef444c716633752ced338c
      https://github.com/llvm/llvm-project/commit/e88dbc8c955a9c17d5ef444c716633752ced338c
  Author: Jacques Pienaar <jpienaar at google.com>
  Date:   2019-10-16 (Wed, 16 Oct 2019)

  Changed paths:
    M mlir/test/Examples/Toy/Ch1/ast.toy
    M mlir/test/Examples/Toy/Ch2/ast.toy
    M mlir/test/Examples/Toy/Ch3/ast.toy

  Log Message:
  -----------
  Update comments in ast.toy

PiperOrigin-RevId: 275084969


  Commit: 3940b90d84d7239f2bc849068df97f1d248554fe
      https://github.com/llvm/llvm-project/commit/3940b90d84d7239f2bc849068df97f1d248554fe
  Author: Sana Damani <sdamani at gatech.edu>
  Date:   2019-10-16 (Wed, 16 Oct 2019)

  Changed paths:
    M mlir/examples/toy/Ch4/CMakeLists.txt
    A mlir/examples/toy/Ch4/include/CMakeLists.txt
    M mlir/examples/toy/Ch4/include/toy/AST.h
    A mlir/examples/toy/Ch4/include/toy/CMakeLists.txt
    M mlir/examples/toy/Ch4/include/toy/Dialect.h
    M mlir/examples/toy/Ch4/include/toy/Lexer.h
    A mlir/examples/toy/Ch4/include/toy/Ops.td
    M mlir/examples/toy/Ch4/include/toy/Passes.h
    A mlir/examples/toy/Ch4/include/toy/ShapeInferenceInterface.td
    A mlir/examples/toy/Ch4/mlir/DeadFunctionEliminationPass.cpp
    A mlir/examples/toy/Ch4/mlir/Dialect.cpp
    M mlir/examples/toy/Ch4/mlir/MLIRGen.cpp
    M mlir/examples/toy/Ch4/mlir/ShapeInferencePass.cpp
    M mlir/examples/toy/Ch4/mlir/ToyCombine.cpp
    A mlir/examples/toy/Ch4/mlir/ToyCombine.td
    R mlir/examples/toy/Ch4/mlir/ToyDialect.cpp
    M mlir/examples/toy/Ch4/toyc.cpp
    M mlir/g3doc/Tutorials/Toy/Ch-4.md
    M mlir/include/mlir/Transforms/Passes.h
    M mlir/lib/Transforms/Inliner.cpp
    M mlir/test/Examples/Toy/Ch4/ast.toy
    M mlir/test/Examples/Toy/Ch4/codegen.toy
    M mlir/test/Examples/Toy/Ch4/invalid.mlir
    M mlir/test/Examples/Toy/Ch4/scalar.toy
    R mlir/test/Examples/Toy/Ch4/transpose_transpose.toy
    R mlir/test/Examples/Toy/Ch4/trivialReshape.toy

  Log Message:
  -----------
  Update Chapter 4 of the Toy tutorial

This Chapter now introduces and makes use of the Interface concept
in MLIR to demonstrate ShapeInference.
END_PUBLIC

Closes tensorflow/mlir#191

PiperOrigin-RevId: 275085151


  Commit: ab79c25d646ed7ef214b19042d49f15425c49818
      https://github.com/llvm/llvm-project/commit/ab79c25d646ed7ef214b19042d49f15425c49818
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-10-16 (Wed, 16 Oct 2019)

  Changed paths:
    M mlir/examples/toy/Ch4/include/toy/Dialect.h
    M mlir/examples/toy/Ch4/include/toy/Ops.td
    A mlir/examples/toy/Ch4/include/toy/ShapeInferenceInterface.h
    M mlir/examples/toy/Ch4/include/toy/ShapeInferenceInterface.td
    M mlir/examples/toy/Ch4/mlir/DeadFunctionEliminationPass.cpp
    M mlir/examples/toy/Ch4/mlir/Dialect.cpp
    M mlir/examples/toy/Ch4/mlir/ShapeInferencePass.cpp

  Log Message:
  -----------
  Code cleanups on Ch.4

This change performs general cleanups of the implementation of ch.4 and fixes some bugs. For example, the operations currently don't inherit from the shape inference interface.

PiperOrigin-RevId: 275089914


  Commit: a245023c1ceff40aa565104e27c2a9cc23b5ef46
      https://github.com/llvm/llvm-project/commit/a245023c1ceff40aa565104e27c2a9cc23b5ef46
  Author: Rob Suderman <suderman at google.com>
  Date:   2019-10-16 (Wed, 16 Oct 2019)

  Changed paths:
    M mlir/g3doc/LangRef.md
    M mlir/include/mlir/IR/OpBase.td
    M mlir/include/mlir/IR/StandardTypes.h
    M mlir/test/lib/TestDialect/TestOps.td
    M mlir/test/mlir-tblgen/types.mlir

  Log Message:
  -----------
  Add ComplexType to TableGen with Tensor support

Create a ComplexType for table gen references. Include an AnyComplex type
to check whether the resulting tensor can be complex. Expand tensors to
allow complex types.

PiperOrigin-RevId: 275144804


  Commit: 7053a30f4b304f7f779c11eb3aa9a50bdc231ce9
      https://github.com/llvm/llvm-project/commit/7053a30f4b304f7f779c11eb3aa9a50bdc231ce9
  Author: reinerp <reinerp at google.com>
  Date:   2019-10-16 (Wed, 16 Oct 2019)

  Changed paths:
    M mlir/examples/toy/Ch3/mlir/ToyCombine.td
    M mlir/examples/toy/Ch4/mlir/ToyCombine.td
    M mlir/g3doc/Tutorials/Toy/Ch-3.md

  Log Message:
  -----------
  Fix typo in tutorial.

PiperOrigin-RevId: 275147795


  Commit: 7045471913e7211fc75b8f073cc0ed4a90e902e2
      https://github.com/llvm/llvm-project/commit/7045471913e7211fc75b8f073cc0ed4a90e902e2
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-10-16 (Wed, 16 Oct 2019)

  Changed paths:
    M mlir/examples/toy/Ch4/CMakeLists.txt
    M mlir/examples/toy/Ch4/include/toy/Ops.td
    M mlir/examples/toy/Ch4/mlir/Dialect.cpp
    M mlir/examples/toy/Ch4/mlir/ShapeInferencePass.cpp
    M mlir/examples/toy/Ch4/mlir/ToyCombine.cpp
    M mlir/examples/toy/Ch4/toyc.cpp
    A mlir/test/Examples/Toy/Ch4/shape_inference.mlir

  Log Message:
  -----------
  Add support for inlining toy call operations.

The GenericCallOp needed to have the CallOpInterface to be picked up by the inliner. This also adds a CastOp to perform shape casts that are generated during inlining. The casts generated by the inliner will be folded away after shape inference.

PiperOrigin-RevId: 275150438


  Commit: 1ba9bb05078aee74420bc64394a20c782f13a125
      https://github.com/llvm/llvm-project/commit/1ba9bb05078aee74420bc64394a20c782f13a125
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-10-16 (Wed, 16 Oct 2019)

  Changed paths:
    M mlir/examples/toy/Ch3/mlir/Dialect.cpp
    M mlir/examples/toy/Ch4/mlir/Dialect.cpp
    M mlir/examples/toy/Ch4/mlir/MLIRGen.cpp
    M mlir/examples/toy/Ch5/CMakeLists.txt
    A mlir/examples/toy/Ch5/include/CMakeLists.txt
    M mlir/examples/toy/Ch5/include/toy/AST.h
    A mlir/examples/toy/Ch5/include/toy/CMakeLists.txt
    M mlir/examples/toy/Ch5/include/toy/Dialect.h
    M mlir/examples/toy/Ch5/include/toy/Lexer.h
    R mlir/examples/toy/Ch5/include/toy/Lowering.h
    A mlir/examples/toy/Ch5/include/toy/Ops.td
    M mlir/examples/toy/Ch5/include/toy/Passes.h
    A mlir/examples/toy/Ch5/include/toy/ShapeInferenceInterface.h
    A mlir/examples/toy/Ch5/include/toy/ShapeInferenceInterface.td
    A mlir/examples/toy/Ch5/mlir/DeadFunctionEliminationPass.cpp
    A mlir/examples/toy/Ch5/mlir/Dialect.cpp
    R mlir/examples/toy/Ch5/mlir/EarlyLowering.cpp
    R mlir/examples/toy/Ch5/mlir/LateLowering.cpp
    A mlir/examples/toy/Ch5/mlir/LowerToAffineLoops.cpp
    M mlir/examples/toy/Ch5/mlir/MLIRGen.cpp
    M mlir/examples/toy/Ch5/mlir/ShapeInferencePass.cpp
    M mlir/examples/toy/Ch5/mlir/ToyCombine.cpp
    A mlir/examples/toy/Ch5/mlir/ToyCombine.td
    R mlir/examples/toy/Ch5/mlir/ToyDialect.cpp
    M mlir/examples/toy/Ch5/toyc.cpp
    M mlir/g3doc/Tutorials/Toy/Ch-5.md
    M mlir/test/Examples/Toy/Ch4/ast.toy
    A mlir/test/Examples/Toy/Ch5/affine-lowering.mlir
    M mlir/test/Examples/Toy/Ch5/ast.toy
    M mlir/test/Examples/Toy/Ch5/codegen.toy
    M mlir/test/Examples/Toy/Ch5/invalid.mlir
    R mlir/test/Examples/Toy/Ch5/lowering.toy
    M mlir/test/Examples/Toy/Ch5/scalar.toy
    A mlir/test/Examples/Toy/Ch5/shape_inference.mlir
    R mlir/test/Examples/Toy/Ch5/transpose_transpose.toy
    R mlir/test/Examples/Toy/Ch5/trivialReshape.toy

  Log Message:
  -----------
  Add Ch.5 of the toy tutorial.

This chapter adds a partial lowering of toy operations, all but PrintOp, to a combination of the Affine and Std dialects. This chapter focuses on introducing the conversion framework, the benefits of partial lowering, and how easily dialects may co-exist in the IR.

PiperOrigin-RevId: 275150649


  Commit: 0e3efb32c6fc38de789d766eec05fc698c129c33
      https://github.com/llvm/llvm-project/commit/0e3efb32c6fc38de789d766eec05fc698c129c33
  Author: Lei Zhang <antiagainst at google.com>
  Date:   2019-10-16 (Wed, 16 Oct 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/SPIRV/SPIRVControlFlowOps.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVStructureOps.td
    M mlir/lib/Dialect/SPIRV/SPIRVDialect.cpp
    M mlir/lib/Dialect/SPIRV/SPIRVOps.cpp
    A mlir/test/Dialect/SPIRV/Transforms/inlining.mlir

  Log Message:
  -----------
  [spirv] Implement inliner interface

We just need to implement a few interface hooks to DialectInlinerInterface
and CallOpInterface to gain the benefits of an inliner. :)

Right now only supports some trivial cases:
* Inlining single block with spv.Return/spv.ReturnValue
* Inlining multi block with spv.Return
* Inlining spv.selection/spv.loop without return ops

More advanced cases will require block argument and Phi support.

PiperOrigin-RevId: 275151132


  Commit: bdc250c5a744e95a7d0ddd283c6b19c564c725a5
      https://github.com/llvm/llvm-project/commit/bdc250c5a744e95a7d0ddd283c6b19c564c725a5
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-10-16 (Wed, 16 Oct 2019)

  Changed paths:
    M mlir/examples/toy/Ch2/include/toy/Ops.td
    M mlir/examples/toy/Ch2/mlir/Dialect.cpp
    M mlir/examples/toy/Ch3/include/toy/Ops.td
    M mlir/examples/toy/Ch3/mlir/Dialect.cpp
    M mlir/examples/toy/Ch4/include/toy/Ops.td
    M mlir/examples/toy/Ch4/mlir/Dialect.cpp
    M mlir/examples/toy/Ch5/include/toy/Ops.td
    M mlir/examples/toy/Ch5/mlir/Dialect.cpp
    M mlir/g3doc/Tutorials/Toy/Ch-5.md
    M mlir/test/Examples/Toy/Ch5/affine-lowering.mlir

  Log Message:
  -----------
  Fix invalid transpose in example and add proper verification.

The transpose in the example had the same result type as its input, which is incorrect.

PiperOrigin-RevId: 275186568


  Commit: 1358df19ca73165cdbd64d099cb5c7ccfd23e477
      https://github.com/llvm/llvm-project/commit/1358df19ca73165cdbd64d099cb5c7ccfd23e477
  Author: Lei Zhang <antiagainst at google.com>
  Date:   2019-10-17 (Thu, 17 Oct 2019)

  Changed paths:
    M mlir/include/mlir/TableGen/Pattern.h
    M mlir/lib/TableGen/Pattern.cpp
    M mlir/tools/mlir-tblgen/RewriterGen.cpp

  Log Message:
  -----------
  Add LLVM_DEBUG in RewritersGen.cpp and Pattern.cpp

It's usually hard to understand what went wrong if mlir-tblgen
crashes on some input. This CL adds a few useful LLVM_DEBUG
statements so that we can use mlir-tblegn -debug to figure
out the culprit for a crash.

PiperOrigin-RevId: 275253532


  Commit: 603117b2d62b320e86d3452fa0b9f7b00d125574
      https://github.com/llvm/llvm-project/commit/603117b2d62b320e86d3452fa0b9f7b00d125574
  Author: Lei Zhang <antiagainst at google.com>
  Date:   2019-10-17 (Thu, 17 Oct 2019)

  Changed paths:
    M mlir/test/lib/TestDialect/TestOps.td
    M mlir/test/lib/TestDialect/TestPatterns.cpp
    M mlir/test/mlir-tblgen/pattern.mlir
    M mlir/tools/mlir-tblgen/RewriterGen.cpp

  Log Message:
  -----------
  Fix RewriterGen to support using NativeCodeCall as auxiliary pattern

NativeCodeCall is handled differently than normal op creation in RewriterGen
(because its flexibility). It will only be materialized to output stream if
it is used. But when using it for auxiliary patterns, we still want the side
effect even if it is not replacing matched root op's results.

PiperOrigin-RevId: 275265467


  Commit: 23d21af65c467468743711a08a5719ecd866ee6c
      https://github.com/llvm/llvm-project/commit/23d21af65c467468743711a08a5719ecd866ee6c
  Author: Lei Zhang <antiagainst at google.com>
  Date:   2019-10-17 (Thu, 17 Oct 2019)

  Changed paths:
    M mlir/lib/TableGen/Pattern.cpp
    M mlir/test/lib/TestDialect/TestOps.td
    M mlir/test/lib/TestDialect/TestPatterns.cpp
    M mlir/test/mlir-tblgen/pattern.mlir

  Log Message:
  -----------
  [DRR] Allow capturing and referencing no-result ops

Previously when we bind a symbol to an op in DRR, it means to capture
the op's result(s) and later references will be expanded to result(s).
This means for ops without result, we are replacing the symbol with
nothing. This CL treats non-result op capturing and referencing as a
special case to mean the op itself.

PiperOrigin-RevId: 275269702


  Commit: 6ebc7318b0137961cf5ad30b2c47589bf8d2fbee
      https://github.com/llvm/llvm-project/commit/6ebc7318b0137961cf5ad30b2c47589bf8d2fbee
  Author: Mehdi Amini <joker.eph at gmail.com>
  Date:   2019-10-17 (Thu, 17 Oct 2019)

  Changed paths:
    M mlir/lib/Dialect/GPU/IR/GPUDialect.cpp

  Log Message:
  -----------
  Use a SmallVector instead of an ArrayRef to materialize a temporary local array

This pattern is error prone and unfortunately none of the sanitizer is catching
it at the moment.

Fixes tensorflow/mlir#192

Closes tensorflow/mlir#193

COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/193 from joker-eph:fix_array_ref 8092252e64c426c6a8a790b7638f847bea4818b1
PiperOrigin-RevId: 275280201


  Commit: 10039d04e279d7b63fecf2046a07c6d8bbba2b28
      https://github.com/llvm/llvm-project/commit/10039d04e279d7b63fecf2046a07c6d8bbba2b28
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2019-10-17 (Thu, 17 Oct 2019)

  Changed paths:
    M mlir/bindings/python/pybind.cpp
    M mlir/g3doc/Tutorials/Linalg/DeclarativeBuilders.md
    M mlir/include/mlir/Dialect/Linalg/Utils/Utils.h
    M mlir/include/mlir/EDSC/Builders.h
    M mlir/lib/EDSC/Builders.cpp
    M mlir/lib/Transforms/LowerVectorTransfers.cpp
    M mlir/test/EDSC/builder-api-test.cpp
    M mlir/test/mlir-tblgen/reference-impl.td

  Log Message:
  -----------
  Rename LoopNestBuilder to AffineLoopNestBuilder - NFC

PiperOrigin-RevId: 275310747


  Commit: 057dc41bf6e91f5962060505ad53f72c0f6b96f7
      https://github.com/llvm/llvm-project/commit/057dc41bf6e91f5962060505ad53f72c0f6b96f7
  Author: Lei Zhang <antiagainst at google.com>
  Date:   2019-10-17 (Thu, 17 Oct 2019)

  Changed paths:
    M mlir/g3doc/LangRef.md
    M mlir/lib/IR/AsmPrinter.cpp
    M mlir/test/Dialect/LLVMIR/roundtrip.mlir
    M mlir/test/IR/parser.mlir

  Log Message:
  -----------
  Allow '_' when pretty printing dialect symbols

'_' is used frequently enough as the separator of words in symbols.
We should allow it in dialect symbols when considering pretty printing.

Also updated LangRef.md regarding pretty form.

PiperOrigin-RevId: 275312494


  Commit: a560505d1adf751edfffc1cfc3c5d5e5beaf9331
      https://github.com/llvm/llvm-project/commit/a560505d1adf751edfffc1cfc3c5d5e5beaf9331
  Author: Denis Khalikov <khalikov.denis at huawei.com>
  Date:   2019-10-17 (Thu, 17 Oct 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/SPIRV/SPIRVControlFlowOps.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVOps.td
    M mlir/lib/Dialect/SPIRV/SPIRVOps.cpp
    M mlir/test/Dialect/SPIRV/canonicalize.mlir

  Log Message:
  -----------
  [spirv] Add a canonicalization pattern for spv.selection.

Add a canonicalization pattern for spv.selection operation.
Convert spv.selection operation to spv.Select based on
simple pattern.

Closes tensorflow/mlir#183

COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/183 from denis0x0D:sandbox/canon_select 43d04d923272dd60b9da39f70bdbc51a5168db62
PiperOrigin-RevId: 275312748


  Commit: 5b03e692f6716ff4fcc4ae0887d1792562456f4b
      https://github.com/llvm/llvm-project/commit/5b03e692f6716ff4fcc4ae0887d1792562456f4b
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2019-10-17 (Thu, 17 Oct 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/Linalg/Passes.h
    M mlir/include/mlir/Dialect/Linalg/Utils/Utils.h
    M mlir/lib/Dialect/Linalg/CMakeLists.txt
    A mlir/lib/Dialect/Linalg/Transforms/Promotion.cpp
    M mlir/lib/Dialect/Linalg/Transforms/Tiling.cpp
    M mlir/test/Dialect/Linalg/promote.mlir
    M mlir/test/mlir-cpu-runner/linalg_integration_test.mlir

  Log Message:
  -----------
  Decouple Linalg promotion from Linalg tiling - NFC

This CL creates a new Linalg promotion pass that operates on SubViewOp and decouples it from Linalg tiling. This is mostly moving code around.

PiperOrigin-RevId: 275329213


  Commit: 0372eb413f1cf917106562be35c633ae428f2973
      https://github.com/llvm/llvm-project/commit/0372eb413f1cf917106562be35c633ae428f2973
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-10-17 (Thu, 17 Oct 2019)

  Changed paths:
    M mlir/examples/toy/CMakeLists.txt
    A mlir/examples/toy/Ch6/CMakeLists.txt
    A mlir/examples/toy/Ch6/include/CMakeLists.txt
    A mlir/examples/toy/Ch6/include/toy/AST.h
    A mlir/examples/toy/Ch6/include/toy/CMakeLists.txt
    A mlir/examples/toy/Ch6/include/toy/Dialect.h
    A mlir/examples/toy/Ch6/include/toy/Lexer.h
    A mlir/examples/toy/Ch6/include/toy/MLIRGen.h
    A mlir/examples/toy/Ch6/include/toy/Ops.td
    A mlir/examples/toy/Ch6/include/toy/Parser.h
    A mlir/examples/toy/Ch6/include/toy/Passes.h
    A mlir/examples/toy/Ch6/include/toy/ShapeInferenceInterface.h
    A mlir/examples/toy/Ch6/include/toy/ShapeInferenceInterface.td
    A mlir/examples/toy/Ch6/mlir/DeadFunctionEliminationPass.cpp
    A mlir/examples/toy/Ch6/mlir/Dialect.cpp
    A mlir/examples/toy/Ch6/mlir/LowerToAffineLoops.cpp
    A mlir/examples/toy/Ch6/mlir/LowerToLLVM.cpp
    A mlir/examples/toy/Ch6/mlir/MLIRGen.cpp
    A mlir/examples/toy/Ch6/mlir/ShapeInferencePass.cpp
    A mlir/examples/toy/Ch6/mlir/ToyCombine.cpp
    A mlir/examples/toy/Ch6/mlir/ToyCombine.td
    A mlir/examples/toy/Ch6/parser/AST.cpp
    A mlir/examples/toy/Ch6/toyc.cpp
    A mlir/g3doc/Tutorials/Toy/Ch-6.md
    M mlir/include/mlir/Dialect/StandardOps/Ops.td
    M mlir/test/CMakeLists.txt
    A mlir/test/Examples/Toy/Ch6/affine-lowering.mlir
    A mlir/test/Examples/Toy/Ch6/ast.toy
    A mlir/test/Examples/Toy/Ch6/codegen.toy
    A mlir/test/Examples/Toy/Ch6/invalid.mlir
    A mlir/test/Examples/Toy/Ch6/llvm-lowering.mlir
    A mlir/test/Examples/Toy/Ch6/scalar.toy
    A mlir/test/Examples/Toy/Ch6/shape_inference.mlir

  Log Message:
  -----------
  Add Ch.6 of the Toy tutorial.

This chapters introduces the notion of a full conversion, and adds support for lowering down to the LLVM dialect, LLVM IR, and thus code generation.

PiperOrigin-RevId: 275337786


  Commit: dae0ae6879122b72e8e46fd6146928f94b3162e9
      https://github.com/llvm/llvm-project/commit/dae0ae6879122b72e8e46fd6146928f94b3162e9
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-10-17 (Thu, 17 Oct 2019)

  Changed paths:
    M mlir/examples/CMakeLists.txt
    R mlir/examples/Linalg/CMakeLists.txt
    R mlir/examples/Linalg/Linalg1/CMakeLists.txt
    R mlir/examples/Linalg/Linalg1/TestHarness.h
    R mlir/examples/Linalg/Linalg1/include/linalg1/Analysis.h
    R mlir/examples/Linalg/Linalg1/include/linalg1/Common.h
    R mlir/examples/Linalg/Linalg1/include/linalg1/ConvertToLLVMDialect.h
    R mlir/examples/Linalg/Linalg1/include/linalg1/Dialect.h
    R mlir/examples/Linalg/Linalg1/include/linalg1/Intrinsics.h
    R mlir/examples/Linalg/Linalg1/include/linalg1/LLVMIntrinsics.h
    R mlir/examples/Linalg/Linalg1/include/linalg1/Ops.h
    R mlir/examples/Linalg/Linalg1/include/linalg1/Passes.h
    R mlir/examples/Linalg/Linalg1/include/linalg1/RangeOp.h
    R mlir/examples/Linalg/Linalg1/include/linalg1/RangeType.h
    R mlir/examples/Linalg/Linalg1/include/linalg1/SliceOp.h
    R mlir/examples/Linalg/Linalg1/include/linalg1/Types.h
    R mlir/examples/Linalg/Linalg1/include/linalg1/Utils.h
    R mlir/examples/Linalg/Linalg1/include/linalg1/ViewOp.h
    R mlir/examples/Linalg/Linalg1/include/linalg1/ViewType.h
    R mlir/examples/Linalg/Linalg1/lib/Analysis.cpp
    R mlir/examples/Linalg/Linalg1/lib/CMakeLists.txt
    R mlir/examples/Linalg/Linalg1/lib/Common.cpp
    R mlir/examples/Linalg/Linalg1/lib/ConvertToLLVMDialect.cpp
    R mlir/examples/Linalg/Linalg1/lib/Dialect.cpp
    R mlir/examples/Linalg/Linalg1/lib/DialectConstruction.cpp
    R mlir/examples/Linalg/Linalg1/lib/DialectRegistration.cpp
    R mlir/examples/Linalg/Linalg1/lib/RangeOp.cpp
    R mlir/examples/Linalg/Linalg1/lib/SliceOp.cpp
    R mlir/examples/Linalg/Linalg1/lib/Utils.cpp
    R mlir/examples/Linalg/Linalg1/lib/ViewOp.cpp
    R mlir/examples/Linalg/Linalg1/lib/ViewType.cpp
    R mlir/examples/Linalg/Linalg2/CMakeLists.txt
    R mlir/examples/Linalg/Linalg2/Example.cpp
    R mlir/examples/Linalg/Linalg2/include/linalg2/Analysis.h
    R mlir/examples/Linalg/Linalg2/include/linalg2/Intrinsics.h
    R mlir/examples/Linalg/Linalg2/include/linalg2/Ops.h
    R mlir/examples/Linalg/Linalg2/include/linalg2/TensorOps-inl.h
    R mlir/examples/Linalg/Linalg2/include/linalg2/TensorOps.h
    R mlir/examples/Linalg/Linalg2/include/linalg2/Transforms.h
    R mlir/examples/Linalg/Linalg2/lib/CMakeLists.txt
    R mlir/examples/Linalg/Linalg2/lib/DialectConstruction.cpp
    R mlir/examples/Linalg/Linalg2/lib/TensorOps.cpp
    R mlir/examples/Linalg/Linalg2/lib/Transforms.cpp
    R mlir/examples/Linalg/Linalg3/CMakeLists.txt
    R mlir/examples/Linalg/Linalg3/Conversion.cpp
    R mlir/examples/Linalg/Linalg3/Example.cpp
    R mlir/examples/Linalg/Linalg3/Execution.cpp
    R mlir/examples/Linalg/Linalg3/include/linalg3/Analysis.h
    R mlir/examples/Linalg/Linalg3/include/linalg3/ConvertToLLVMDialect.h
    R mlir/examples/Linalg/Linalg3/include/linalg3/Intrinsics.h
    R mlir/examples/Linalg/Linalg3/include/linalg3/LoadStoreOps.h
    R mlir/examples/Linalg/Linalg3/include/linalg3/Ops.h
    R mlir/examples/Linalg/Linalg3/include/linalg3/TensorOps-inl.h
    R mlir/examples/Linalg/Linalg3/include/linalg3/TensorOps.h
    R mlir/examples/Linalg/Linalg3/include/linalg3/Transforms.h
    R mlir/examples/Linalg/Linalg3/lib/Analysis.cpp
    R mlir/examples/Linalg/Linalg3/lib/CMakeLists.txt
    R mlir/examples/Linalg/Linalg3/lib/ConvertToLLVMDialect.cpp
    R mlir/examples/Linalg/Linalg3/lib/DialectConstruction.cpp
    R mlir/examples/Linalg/Linalg3/lib/LoadStoreOps.cpp
    R mlir/examples/Linalg/Linalg3/lib/TensorOps.cpp
    R mlir/examples/Linalg/Linalg3/lib/Transforms.cpp
    R mlir/examples/Linalg/Linalg4/CMakeLists.txt
    R mlir/examples/Linalg/Linalg4/Example.cpp
    R mlir/examples/Linalg/Linalg4/include/linalg4/Transforms.h
    R mlir/examples/Linalg/Linalg4/lib/CMakeLists.txt
    R mlir/examples/Linalg/Linalg4/lib/Transforms.cpp
    A mlir/g3doc/EDSC.md
    R mlir/g3doc/Tutorials/Linalg/Ch-1.md
    R mlir/g3doc/Tutorials/Linalg/Ch-2.md
    R mlir/g3doc/Tutorials/Linalg/DeclarativeBuilders.md
    R mlir/g3doc/Tutorials/Linalg/LLVMConversion.md
    M mlir/test/CMakeLists.txt
    R mlir/test/Examples/Linalg/Linalg1.mlir

  Log Message:
  -----------
  NFC: Delete the Linalg tutorial.

This part of the tutorial is now covered by a new flow in Toy. This also removes a point of confusion as there is also a proper Linalg dialect.

PiperOrigin-RevId: 275338933


  Commit: b65c8bb5d6ab418bb3fcd0302aee19d3615d90f1
      https://github.com/llvm/llvm-project/commit/b65c8bb5d6ab418bb3fcd0302aee19d3615d90f1
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2019-10-17 (Thu, 17 Oct 2019)

  Changed paths:
    M mlir/bindings/python/pybind.cpp
    M mlir/g3doc/EDSC.md
    M mlir/include/mlir/EDSC/Builders.h
    M mlir/lib/EDSC/Builders.cpp
    M mlir/lib/EDSC/CMakeLists.txt
    M mlir/test/EDSC/builder-api-test.cpp

  Log Message:
  -----------
  Add EDSC support for loop.for operations

This CL adds support for loop.for operations in EDSC and adds a test.
This will be used in a followup commit to implement lowering of vector_transfer ops so that it works more generally and is not subject to affine constraints.

PiperOrigin-RevId: 275349796


  Commit: 6090643877fde4d7f00c25e0d78e1f7eec4f3cdb
      https://github.com/llvm/llvm-project/commit/6090643877fde4d7f00c25e0d78e1f7eec4f3cdb
  Author: Geoffrey Martin-Noble <gcmn at google.com>
  Date:   2019-10-17 (Thu, 17 Oct 2019)

  Changed paths:
    M mlir/include/mlir/Transforms/DialectConversion.h
    M mlir/lib/Transforms/DialectConversion.cpp

  Log Message:
  -----------
  Introduce a wrapper around ConversionPattern that operates on the derived class

Analogous to OpRewritePattern, this makes writing conversion patterns more convenient.

PiperOrigin-RevId: 275349854


  Commit: 575405f4d6762830c1c4520569de4e4ed3c8eed5
      https://github.com/llvm/llvm-project/commit/575405f4d6762830c1c4520569de4e4ed3c8eed5
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-10-17 (Thu, 17 Oct 2019)

  Changed paths:
    M mlir/bindings/python/pybind.cpp
    M mlir/g3doc/EDSC.md
    M mlir/include/mlir/EDSC/Builders.h
    M mlir/lib/EDSC/Builders.cpp
    M mlir/lib/EDSC/CMakeLists.txt
    M mlir/test/EDSC/builder-api-test.cpp

  Log Message:
  -----------
  Automated rollback of commit b65c8bb5d6ab418bb3fcd0302aee19d3615d90f1

PiperOrigin-RevId: 275370861


  Commit: 2acc220f17bacbf933d024a68385a909b44352fd
      https://github.com/llvm/llvm-project/commit/2acc220f17bacbf933d024a68385a909b44352fd
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-10-17 (Thu, 17 Oct 2019)

  Changed paths:
    M mlir/examples/toy/Ch2/mlir/Dialect.cpp
    M mlir/examples/toy/Ch2/mlir/MLIRGen.cpp
    M mlir/examples/toy/Ch3/mlir/Dialect.cpp
    M mlir/examples/toy/Ch3/mlir/MLIRGen.cpp
    M mlir/examples/toy/Ch4/mlir/Dialect.cpp
    M mlir/examples/toy/Ch4/mlir/MLIRGen.cpp
    M mlir/examples/toy/Ch5/mlir/Dialect.cpp
    M mlir/examples/toy/Ch5/mlir/MLIRGen.cpp
    M mlir/examples/toy/Ch6/mlir/Dialect.cpp
    M mlir/examples/toy/Ch6/mlir/MLIRGen.cpp
    M mlir/include/mlir/Conversion/StandardToSPIRV/ConvertStandardToSPIRV.h
    M mlir/include/mlir/Dialect/AffineOps/AffineOpsBase.td
    M mlir/include/mlir/Dialect/StandardOps/Ops.td
    M mlir/include/mlir/IR/Builders.h
    M mlir/include/mlir/IR/OpBase.td
    M mlir/lib/Analysis/LoopAnalysis.cpp
    M mlir/lib/Conversion/StandardToSPIRV/ConvertStandardToSPIRV.cpp
    M mlir/lib/Dialect/AffineOps/AffineOps.cpp
    M mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
    M mlir/lib/Dialect/SPIRV/SPIRVOps.cpp
    M mlir/lib/Dialect/SPIRV/Serialization/Deserializer.cpp
    M mlir/lib/Dialect/SPIRV/Transforms/DecorateSPIRVCompositeTypeLayoutPass.cpp
    M mlir/lib/Dialect/StandardOps/Ops.cpp
    M mlir/lib/Dialect/VectorOps/VectorOps.cpp
    M mlir/lib/IR/Builders.cpp
    M mlir/lib/IR/Function.cpp
    M mlir/lib/IR/FunctionSupport.cpp
    M mlir/lib/Parser/Parser.cpp
    M mlir/lib/Quantizer/Transforms/AddDefaultStatsTestPass.cpp
    M mlir/lib/Transforms/LoopFusion.cpp
    M mlir/lib/Transforms/LoopTiling.cpp
    M mlir/lib/Transforms/LoopUnrollAndJam.cpp
    M mlir/lib/Transforms/PipelineDataTransfer.cpp
    M mlir/lib/Transforms/Utils/LoopUtils.cpp
    M mlir/lib/Transforms/Utils/Utils.cpp
    M mlir/lib/Transforms/Vectorize.cpp
    M mlir/test/EDSC/builder-api-test.cpp
    M mlir/unittests/Dialect/SPIRV/SerializationTest.cpp

  Log Message:
  -----------
  NFC: Remove trivial builder get methods.

These don't add any value, and some are even more restrictive than the respective static 'get' method.

PiperOrigin-RevId: 275391240


  Commit: fe0ee32da537f94602275635a637e0b5ac4ef7cd
      https://github.com/llvm/llvm-project/commit/fe0ee32da537f94602275635a637e0b5ac4ef7cd
  Author: Christian Sigg <csigg at google.com>
  Date:   2019-10-18 (Fri, 18 Oct 2019)

  Changed paths:
    M mlir/g3doc/Dialects/GPU.md
    M mlir/include/mlir/Dialect/GPU/GPUOps.td
    M mlir/lib/Conversion/GPUToNVVM/CMakeLists.txt
    A mlir/lib/Conversion/GPUToNVVM/GPUToNVVM.td
    M mlir/lib/Conversion/GPUToNVVM/LowerGpuOpsToNVVMOps.cpp
    M mlir/test/Conversion/GPUToNVVM/gpu-to-nvvm.mlir
    M mlir/test/Dialect/GPU/ops.mlir

  Log Message:
  -----------
  Add gpu.barrier op to synchronize invocations of a local workgroup.

Adding gen table for rewrite patterns from GPU to NVVM dialect.

Copy missing op documentation from GPUOps.td to GPU.md.

PiperOrigin-RevId: 275419588


  Commit: 234b8e85ba324a8dfb67ba9e29f8f71975c0c2c0
      https://github.com/llvm/llvm-project/commit/234b8e85ba324a8dfb67ba9e29f8f71975c0c2c0
  Author: Geoffrey Martin-Noble <gcmn at google.com>
  Date:   2019-10-18 (Fri, 18 Oct 2019)

  Changed paths:
    M mlir/g3doc/DialectConversion.md

  Log Message:
  -----------
  Add documentation on restrictions to dialect conversion rewrites

PiperOrigin-RevId: 275435593


  Commit: 3622e1833fa682faf890f8258923ab2f1030c953
      https://github.com/llvm/llvm-project/commit/3622e1833fa682faf890f8258923ab2f1030c953
  Author: Stephan Herhut <herhut at google.com>
  Date:   2019-10-18 (Fri, 18 Oct 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/GPU/GPUOps.td
    M mlir/lib/Dialect/GPU/IR/GPUDialect.cpp
    M mlir/test/Dialect/GPU/invalid.mlir

  Log Message:
  -----------
  Use StrEnumAttr for gpu.allreduce op instead of StringAttr to better encode constraints.

PiperOrigin-RevId: 275448372


  Commit: 3e3ab380219985e08b6bd1106b26f779fcf3e38d
      https://github.com/llvm/llvm-project/commit/3e3ab380219985e08b6bd1106b26f779fcf3e38d
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2019-10-18 (Fri, 18 Oct 2019)

  Changed paths:
    M mlir/lib/Conversion/GPUToNVVM/CMakeLists.txt

  Log Message:
  -----------
  Fix OSS target name GPUtoNVVMTransforms -> MLIRGPUtoNVVMTransforms

This unbreaks the `cmake -G Ninja ../llvm -DLLVM_BUILD_EXAMPLES=ON -DLLVM_TARGETS_TO_BUILD="host"`
 in my local OSS build

PiperOrigin-RevId: 275452330


  Commit: 151e7e61e85d2af19f283bdc5de51dfecffa39e5
      https://github.com/llvm/llvm-project/commit/151e7e61e85d2af19f283bdc5de51dfecffa39e5
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2019-10-18 (Fri, 18 Oct 2019)

  Changed paths:
    M mlir/bindings/python/pybind.cpp
    M mlir/g3doc/EDSC.md
    M mlir/include/mlir/EDSC/Builders.h
    M mlir/lib/EDSC/Builders.cpp
    M mlir/lib/EDSC/CMakeLists.txt
    M mlir/test/EDSC/CMakeLists.txt
    M mlir/test/EDSC/builder-api-test.cpp

  Log Message:
  -----------
  Automated rollback of commit 575405f4d6762830c1c4520569de4e4ed3c8eed5

PiperOrigin-RevId: 275461067


  Commit: 3aae473658d62f5352a0e8b2fa77ebabcbf6a50a
      https://github.com/llvm/llvm-project/commit/3aae473658d62f5352a0e8b2fa77ebabcbf6a50a
  Author: Lei Zhang <antiagainst at google.com>
  Date:   2019-10-18 (Fri, 18 Oct 2019)

  Changed paths:
    M mlir/tools/mlir-tblgen/RewriterGen.cpp

  Log Message:
  -----------
  [DRR] Use eraseOp() to replace no-result ops

PiperOrigin-RevId: 275475229


  Commit: 02b3ea6038b0959d5f0d62ca5ee44fbce9e3c7aa
      https://github.com/llvm/llvm-project/commit/02b3ea6038b0959d5f0d62ca5ee44fbce9e3c7aa
  Author: reinerp <reinerp at google.com>
  Date:   2019-10-18 (Fri, 18 Oct 2019)

  Changed paths:
    M mlir/g3doc/Dialects/Affine.md

  Log Message:
  -----------
  Slightly rephrase a difficult-to-parse sentence.

PiperOrigin-RevId: 275499524


  Commit: 2823b685804b3419c29f3fd8480f4d1ad4fb5c17
      https://github.com/llvm/llvm-project/commit/2823b685804b3419c29f3fd8480f4d1ad4fb5c17
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2019-10-18 (Fri, 18 Oct 2019)

  Changed paths:
    M mlir/include/mlir/Conversion/StandardToLLVM/ConvertStandardToLLVM.h
    M mlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp
    M mlir/lib/Conversion/VectorToLLVM/VectorToLLVM.cpp
    M mlir/test/Conversion/VectorToLLVM/vector-to-llvm.mlir

  Log Message:
  -----------
  Implement lowering of VectorTypeCastOp to LLVM

A VectorTypeCastOp can only be used to lower between statically sized contiguous memrefs of scalar and matching vector type. The sizes and strides are thus fully static and easy to determine.

A relevant test is added.

This is a step towards solving tensorflow/mlir#189.

PiperOrigin-RevId: 275538981


  Commit: 9e7e297da33be70ec41335800c05b554f5de065b
      https://github.com/llvm/llvm-project/commit/9e7e297da33be70ec41335800c05b554f5de065b
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2019-10-18 (Fri, 18 Oct 2019)

  Changed paths:
    M mlir/lib/Dialect/Linalg/Transforms/LowerToLLVMDialect.cpp
    M mlir/lib/EDSC/Builders.cpp
    M mlir/lib/EDSC/Helpers.cpp
    M mlir/lib/Transforms/LowerVectorTransfers.cpp
    M mlir/test/Dialect/Linalg/llvm.mlir
    M mlir/test/Dialect/Linalg/loops.mlir
    M mlir/test/Dialect/Linalg/roundtrip.mlir
    M mlir/test/Transforms/Vectorize/lower_vector_transfers.mlir
    M mlir/test/mlir-cpu-runner/linalg_integration_test.mlir
    M mlir/test/mlir-cpu-runner/utils.mlir

  Log Message:
  -----------
  Lower vector transfer ops to loop.for operations.

This allows mixing linalg operations with vector transfer operations (with additional modifications to affine ops) and is a step towards solving tensorflow/mlir#189.

PiperOrigin-RevId: 275543361


  Commit: 9c9a7e9268bdd4fe3433ea4499eebbd74e015919
      https://github.com/llvm/llvm-project/commit/9c9a7e9268bdd4fe3433ea4499eebbd74e015919
  Author: Sean Silva <silvasean at google.com>
  Date:   2019-10-18 (Fri, 18 Oct 2019)

  Changed paths:
    M mlir/g3doc/LangRef.md
    M mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
    M mlir/include/mlir/IR/Dialect.h
    M mlir/include/mlir/IR/Function.h
    M mlir/include/mlir/IR/FunctionSupport.h
    M mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
    M mlir/lib/IR/Dialect.cpp
    M mlir/lib/IR/FunctionSupport.cpp
    M mlir/test/IR/invalid-func-op.mlir
    M mlir/test/IR/invalid.mlir
    M mlir/test/IR/parser.mlir
    M mlir/test/lib/TestDialect/TestDialect.cpp
    M mlir/test/lib/TestDialect/TestDialect.h

  Log Message:
  -----------
  Add support for function result attributes.

This allows dialect-specific attributes to be attached to func results. (or more specifically, FunctionLike ops).

For example:

```
func @f() -> (i32 {my_dialect.some_attr = 3})
```

This attaches my_dialect.some_attr with value 3 to the first result of func @f.

Another more complex example:

```
func @g() -> (i32, f32 {my_dialect.some_attr = "foo", other_dialect.some_other_attr = [1,2,3]}, i1)
```

Here, the second result has two attributes attached.

PiperOrigin-RevId: 275564165


  Commit: c5b9fefddc725b274ba6b9cad51fc066f9c827e5
      https://github.com/llvm/llvm-project/commit/c5b9fefddc725b274ba6b9cad51fc066f9c827e5
  Author: Lei Zhang <antiagainst at google.com>
  Date:   2019-10-18 (Fri, 18 Oct 2019)

  Changed paths:
    M mlir/lib/Dialect/SPIRV/Serialization/Serializer.cpp
    M mlir/tools/mlir-tblgen/SPIRVUtilsGen.cpp

  Log Message:
  -----------
  NFC: Rename SPIR-V serializer find*ID() to get*ID() to be consistent

We use get*() in deserizer and other places across the codebase.

PiperOrigin-RevId: 275582390


  Commit: d9db842e687da426c627e207234dd3eff1ad139b
      https://github.com/llvm/llvm-project/commit/d9db842e687da426c627e207234dd3eff1ad139b
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-10-18 (Fri, 18 Oct 2019)

  Changed paths:
    M mlir/include/mlir/TableGen/Format.h

  Log Message:
  -----------
  NFC: Add missing include for StringMap.
PiperOrigin-RevId: 275588019


  Commit: 5f6bdd144af44ff0840e2dd0d66a21dec3624299
      https://github.com/llvm/llvm-project/commit/5f6bdd144af44ff0840e2dd0d66a21dec3624299
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-10-18 (Fri, 18 Oct 2019)

  Changed paths:
    M mlir/include/mlir/Support/STLExtras.h
    M mlir/lib/IR/SymbolTable.cpp

  Log Message:
  -----------
  NFC: Cleanup the implementation of walkSymbolUses.

Refactor the implementation to be much cleaner by adding a `make_second_range` utility to walk the `second` value of a range of pairs.

PiperOrigin-RevId: 275598985


  Commit: c3e56cd12cf6d4ab3223d402370dc9236acd0f1b
      https://github.com/llvm/llvm-project/commit/c3e56cd12cf6d4ab3223d402370dc9236acd0f1b
  Author: Christian Sigg <csigg at google.com>
  Date:   2019-10-19 (Sat, 19 Oct 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/LLVMIR/LLVMDialect.h
    M mlir/include/mlir/Dialect/LLVMIR/NVVMOps.td
    M mlir/lib/Conversion/GPUToNVVM/LowerGpuOpsToNVVMOps.cpp
    M mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
    M mlir/lib/Dialect/LLVMIR/IR/NVVMDialect.cpp
    M mlir/lib/Target/LLVMIR/ConvertToNVVMIR.cpp
    M mlir/test/Dialect/LLVMIR/invalid.mlir
    M mlir/test/Dialect/LLVMIR/nvvm.mlir
    M mlir/test/Target/nvvmir.mlir

  Log Message:
  -----------
  Get active source lane predicate from shuffle instruction.

nvvm.shfl.sync.bfly optionally returns a predicate whether source lane was active. Support for this was added to clang in https://reviews.llvm.org/D68892.

Add an optional 'pred' unit attribute to the instruction to return this predicate. Specify this attribute in the partial warp reduction so we don't need to manually compute the predicate.

PiperOrigin-RevId: 275616564


  Commit: bc577eaf441f06c879ae8cc2edb5b1fc2e05676c
      https://github.com/llvm/llvm-project/commit/bc577eaf441f06c879ae8cc2edb5b1fc2e05676c
  Author: Geoffrey Martin-Noble <gcmn at google.com>
  Date:   2019-10-19 (Sat, 19 Oct 2019)

  Changed paths:
    M mlir/examples/toy/Ch6/mlir/LowerToLLVM.cpp
    M mlir/lib/Conversion/LoopToStandard/ConvertLoopToStandard.cpp
    M mlir/lib/Dialect/AffineOps/AffineOps.cpp
    M mlir/lib/Dialect/SPIRV/SPIRVOps.cpp

  Log Message:
  -----------
  Use new eraseOp instead of replaceOp with empty values

PiperOrigin-RevId: 275631166


  Commit: f9462da5695705a1cd73b8d8dddc4539878792fa
      https://github.com/llvm/llvm-project/commit/f9462da5695705a1cd73b8d8dddc4539878792fa
  Author: Jacques Pienaar <jpienaar at google.com>
  Date:   2019-10-19 (Sat, 19 Oct 2019)

  Changed paths:
    M mlir/g3doc/Tutorials/Toy/Ch-2.md

  Log Message:
  -----------
  Slight rewording in toy ch2 to make persistence of name clearer

PiperOrigin-RevId: 275650756


  Commit: 5b1345ff7631ec9c1efd2f6198a49da98793f398
      https://github.com/llvm/llvm-project/commit/5b1345ff7631ec9c1efd2f6198a49da98793f398
  Author: Mehdi Amini <aminim at google.com>
  Date:   2019-10-19 (Sat, 19 Oct 2019)

  Changed paths:
    M mlir/include/mlir/Support/StorageUniquer.h
    M mlir/lib/Support/StorageUniquer.cpp

  Log Message:
  -----------
  Add missing include to llvm Allocator.h

This header is not self-contained otherwise.

PiperOrigin-RevId: 275651582


  Commit: 305dafd3b1b05d88fe783b54f96bd01da0c87c78
      https://github.com/llvm/llvm-project/commit/305dafd3b1b05d88fe783b54f96bd01da0c87c78
  Author: Jacques Pienaar <jpienaar at google.com>
  Date:   2019-10-19 (Sat, 19 Oct 2019)

  Changed paths:
    M mlir/include/mlir/Transforms/DialectConversion.h
    M mlir/lib/Analysis/Verifier.cpp

  Log Message:
  -----------
  Add missing include to StringMap in Verifier and DialectConversion.

PiperOrigin-RevId: 275656416


  Commit: 8317bd85e5cccc8048cd1be1b3b17c19c953764d
      https://github.com/llvm/llvm-project/commit/8317bd85e5cccc8048cd1be1b3b17c19c953764d
  Author: Jacques Pienaar <jpienaar at google.com>
  Date:   2019-10-19 (Sat, 19 Oct 2019)

  Changed paths:
    M mlir/examples/toy/Ch3/toyc.cpp
    M mlir/examples/toy/Ch4/toyc.cpp
    M mlir/examples/toy/Ch5/toyc.cpp

  Log Message:
  -----------
  Add SourceMgrDiagnosticHandler to toy

PiperOrigin-RevId: 275659433


  Commit: 8bfedb3ca599ccf3c507e721f4bf5e6a3b026f8c
      https://github.com/llvm/llvm-project/commit/8bfedb3ca599ccf3c507e721f4bf5e6a3b026f8c
  Author: Kazuaki Ishizaki <kiszk at users.noreply.github.com>
  Date:   2019-10-20 (Sun, 20 Oct 2019)

  Changed paths:
    M mlir/lib/Analysis/AffineAnalysis.cpp
    M mlir/lib/Analysis/AffineStructures.cpp
    M mlir/lib/Analysis/MemRefBoundCheck.cpp
    M mlir/lib/Analysis/NestedMatcher.cpp
    M mlir/lib/Analysis/TestMemRefDependenceCheck.cpp
    M mlir/lib/Analysis/Utils.cpp
    M mlir/lib/Analysis/VectorAnalysis.cpp
    M mlir/lib/Conversion/GPUToCUDA/ConvertKernelFuncToCubin.cpp
    M mlir/lib/Conversion/StandardToSPIRV/ConvertStandardToSPIRV.cpp
    M mlir/lib/Dialect/FxpMathOps/Transforms/LowerUniformRealMath.cpp
    M mlir/lib/Dialect/GPU/Transforms/KernelOutlining.cpp
    M mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
    M mlir/lib/Dialect/Linalg/Transforms/LowerToLLVMDialect.cpp
    M mlir/lib/Dialect/Linalg/Transforms/Tiling.cpp
    M mlir/lib/Dialect/QuantOps/IR/TypeDetail.h
    M mlir/lib/Dialect/QuantOps/Utils/FakeQuantSupport.cpp
    M mlir/lib/Dialect/SDBM/SDBMExpr.cpp
    M mlir/lib/Dialect/SPIRV/SPIRVOps.cpp
    M mlir/lib/Dialect/SPIRV/Serialization/Deserializer.cpp
    M mlir/lib/Dialect/SPIRV/Serialization/Serializer.cpp
    M mlir/lib/ExecutionEngine/OptUtils.cpp
    M mlir/lib/IR/Builders.cpp
    M mlir/lib/IR/Diagnostics.cpp
    M mlir/lib/IR/MLIRContext.cpp
    M mlir/lib/IR/SymbolTable.cpp
    M mlir/lib/Parser/Lexer.cpp
    M mlir/lib/Parser/Parser.cpp
    M mlir/lib/Pass/Pass.cpp
    M mlir/lib/Pass/PassTiming.cpp
    M mlir/lib/Quantizer/Support/UniformSolvers.cpp
    M mlir/lib/TableGen/Pattern.cpp
    M mlir/lib/TableGen/Predicate.cpp
    M mlir/lib/Transforms/LoopFusion.cpp
    M mlir/lib/Transforms/LowerAffine.cpp
    M mlir/lib/Transforms/MemRefDataFlowOpt.cpp
    M mlir/lib/Transforms/Utils/LoopUtils.cpp
    M mlir/lib/Transforms/Vectorize.cpp
    M mlir/test/Dialect/FxpMathOps/lower-uniform-real-math-mulew.mlir

  Log Message:
  -----------
  Fix minor spelling tweaks (NFC)

Closes tensorflow/mlir#177

PiperOrigin-RevId: 275692653


  Commit: f28c5aca1766889cc19b09ee32796df3e7b52cfe
      https://github.com/llvm/llvm-project/commit/f28c5aca1766889cc19b09ee32796df3e7b52cfe
  Author: Kazuaki Ishizaki <kiszk at users.noreply.github.com>
  Date:   2019-10-20 (Sun, 20 Oct 2019)

  Changed paths:
    M mlir/bindings/python/pybind.cpp
    M mlir/examples/toy/Ch1/include/toy/Parser.h
    M mlir/examples/toy/Ch1/parser/AST.cpp
    M mlir/examples/toy/Ch2/include/toy/Parser.h
    M mlir/examples/toy/Ch2/mlir/MLIRGen.cpp
    M mlir/examples/toy/Ch2/parser/AST.cpp
    M mlir/examples/toy/Ch3/include/toy/Parser.h
    M mlir/examples/toy/Ch3/mlir/MLIRGen.cpp
    M mlir/examples/toy/Ch4/include/toy/Parser.h
    M mlir/examples/toy/Ch4/parser/AST.cpp
    M mlir/examples/toy/Ch5/include/toy/Parser.h
    M mlir/examples/toy/Ch5/mlir/MLIRGen.cpp
    M mlir/examples/toy/Ch5/parser/AST.cpp
    M mlir/examples/toy/Ch6/include/toy/Parser.h
    M mlir/examples/toy/Ch6/mlir/MLIRGen.cpp
    M mlir/examples/toy/Ch6/parser/AST.cpp
    M mlir/g3doc/DeclarativeRewrites.md
    M mlir/g3doc/OpDefinitions.md
    M mlir/test/APITest.h
    M mlir/test/Dialect/GPU/invalid.mlir
    M mlir/test/Dialect/LLVMIR/invalid.mlir
    M mlir/test/Dialect/LLVMIR/roundtrip.mlir
    M mlir/test/Dialect/SPIRV/control-flow-ops.mlir
    M mlir/test/Dialect/SPIRV/structure-ops.mlir
    M mlir/test/Dialect/SPIRV/types.mlir
    M mlir/test/IR/affine-map.mlir
    M mlir/test/IR/parser.mlir
    M mlir/test/SDBM/sdbm-api-test.cpp
    M mlir/test/Transforms/loop-fusion.mlir
    M mlir/test/Transforms/parametric-tiling.mlir
    M mlir/test/Transforms/simplify-affine-structures.mlir
    M mlir/test/lib/TestDialect/TestOps.td
    M mlir/test/lib/Transforms/TestLoopFusion.cpp
    M mlir/test/mlir-tblgen/op-result.td
    M mlir/test/mlir-tblgen/pattern.mlir
    M mlir/unittests/Dialect/SPIRV/SerializationTest.cpp
    M mlir/unittests/SDBM/SDBMTest.cpp
    M mlir/unittests/TableGen/structs.td
    M mlir/utils/generate-test-checks.py
    M mlir/utils/spirv/gen_spirv_dialect.py

  Log Message:
  -----------
  Fix minor spelling tweaks (NFC)

Closes tensorflow/mlir#175

PiperOrigin-RevId: 275726876


  Commit: aad15d812e534b97a3ac5489e933f07b27df53b9
      https://github.com/llvm/llvm-project/commit/aad15d812e534b97a3ac5489e933f07b27df53b9
  Author: Lei Zhang <antiagainst at google.com>
  Date:   2019-10-20 (Sun, 20 Oct 2019)

  Changed paths:
    M mlir/tools/mlir-tblgen/RewriterGen.cpp

  Log Message:
  -----------
  [DRR] Address GCC warning by wrapping for statement body with {}

Otherwise, we'll see the following warning when compiling with GCC 8:

warning: this ?for? clause does not guard... [-Wmisleading-indentation]
PiperOrigin-RevId: 275735925


  Commit: 0bebd06f9a5bc580bfce4c66974a5b0d8f2dea12
      https://github.com/llvm/llvm-project/commit/0bebd06f9a5bc580bfce4c66974a5b0d8f2dea12
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-10-20 (Sun, 20 Oct 2019)

  Changed paths:
    M mlir/g3doc/Tutorials/Toy/Ch-1.md

  Log Message:
  -----------
  Update Ch1 to reflect new changes in the tutorial.

The chapter list is out of date, as well as mentions of matrix multiplication(now element-wise multiplication).

PiperOrigin-RevId: 275744911


  Commit: 1bdfc9e74df955b230d22e9252cb9e5f36843057
      https://github.com/llvm/llvm-project/commit/1bdfc9e74df955b230d22e9252cb9e5f36843057
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-10-20 (Sun, 20 Oct 2019)

  Changed paths:
    M mlir/test/Examples/Toy/Ch1/ast.toy
    M mlir/test/Examples/Toy/Ch2/ast.toy
    M mlir/test/Examples/Toy/Ch3/ast.toy
    M mlir/test/Examples/Toy/Ch4/ast.toy
    M mlir/test/Examples/Toy/Ch5/ast.toy
    M mlir/test/Examples/Toy/Ch6/ast.toy

  Log Message:
  -----------
  NFC: Fix typo : Retur -> Return
PiperOrigin-RevId: 275745931


  Commit: 9ac459e8711050114a3b147884d66b32a67ed8a4
      https://github.com/llvm/llvm-project/commit/9ac459e8711050114a3b147884d66b32a67ed8a4
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-10-21 (Mon, 21 Oct 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVStructureOps.td
    M mlir/include/mlir/IR/Function.h
    M mlir/include/mlir/IR/FunctionSupport.h
    M mlir/include/mlir/IR/OpBase.td
    M mlir/include/mlir/IR/SymbolTable.h
    M mlir/lib/IR/FunctionSupport.cpp
    M mlir/lib/IR/SymbolTable.cpp
    M mlir/test/Dialect/LLVMIR/global.mlir
    M mlir/test/lib/IR/TestSymbolUses.cpp

  Log Message:
  -----------
  Add a Symbol trait to simplify defining operations that represent symbols.

This trait provides accessors for the name, symbol use list methods, verification, with more to be added.

PiperOrigin-RevId: 275864554


  Commit: 03d7be2acad6d826d06e27a6200a55513bb5cdb5
      https://github.com/llvm/llvm-project/commit/03d7be2acad6d826d06e27a6200a55513bb5cdb5
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-10-21 (Mon, 21 Oct 2019)

  Changed paths:
    M mlir/lib/IR/AsmPrinter.cpp
    M mlir/test/IR/parser.mlir

  Log Message:
  -----------
  NFC: Elide the value of a UnitAttr within nested attribute dictionaries.

This matches the behavior of the top level attribute dictionary.

PiperOrigin-RevId: 275879828


  Commit: b74af4aa5c314f596ad5ed26c00e4b9033dee78f
      https://github.com/llvm/llvm-project/commit/b74af4aa5c314f596ad5ed26c00e4b9033dee78f
  Author: Christian Sigg <csigg at google.com>
  Date:   2019-10-21 (Mon, 21 Oct 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/GPU/GPUOps.td
    M mlir/lib/Conversion/GPUToNVVM/GPUToNVVM.td
    M mlir/lib/Conversion/GPUToNVVM/LowerGpuOpsToNVVMOps.cpp
    M mlir/lib/Conversion/GPUToROCDL/LowerGpuOpsToROCDLOps.cpp
    M mlir/lib/Conversion/GPUToSPIRV/GPUToSPIRV.cpp
    M mlir/lib/Conversion/LoopsToGPU/LoopsToGPU.cpp
    M mlir/lib/Dialect/GPU/IR/GPUDialect.cpp
    M mlir/lib/Dialect/GPU/Transforms/KernelOutlining.cpp

  Log Message:
  -----------
  Unify GPU op definition names with other dialects.

Rename GPU op names from gpu_Foo to GPU_FooOp.

PiperOrigin-RevId: 275882232


  Commit: 941a1c43320afed13bc964452cef3eeafa93a48c
      https://github.com/llvm/llvm-project/commit/941a1c43320afed13bc964452cef3eeafa93a48c
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-10-21 (Mon, 21 Oct 2019)

  Changed paths:
    M mlir/examples/toy/Ch4/mlir/Dialect.cpp
    M mlir/examples/toy/Ch5/mlir/Dialect.cpp
    M mlir/examples/toy/Ch6/mlir/Dialect.cpp
    M mlir/g3doc/Tutorials/Toy/Ch-1.md
    M mlir/g3doc/Tutorials/Toy/Ch-2.md
    M mlir/test/Examples/Toy/Ch1/ast.toy
    M mlir/test/Examples/Toy/Ch2/ast.toy
    M mlir/test/Examples/Toy/Ch2/codegen.toy
    M mlir/test/Examples/Toy/Ch3/ast.toy
    M mlir/test/Examples/Toy/Ch3/codegen.toy
    M mlir/test/Examples/Toy/Ch4/ast.toy
    M mlir/test/Examples/Toy/Ch4/codegen.toy
    M mlir/test/Examples/Toy/Ch4/shape_inference.mlir
    M mlir/test/Examples/Toy/Ch5/ast.toy
    M mlir/test/Examples/Toy/Ch5/codegen.toy
    M mlir/test/Examples/Toy/Ch5/shape_inference.mlir
    M mlir/test/Examples/Toy/Ch6/ast.toy
    M mlir/test/Examples/Toy/Ch6/codegen.toy
    M mlir/test/Examples/Toy/Ch6/shape_inference.mlir

  Log Message:
  -----------
  NFC: Fix remaining usages of MulOp as matrix multiplication.

MulOp now represents an element-wise multiplication instead of a matrix multiplication.

PiperOrigin-RevId: 275886774


  Commit: 4514cdd5eb4844e10790580ab8df9bce433cbe6e
      https://github.com/llvm/llvm-project/commit/4514cdd5eb4844e10790580ab8df9bce433cbe6e
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-10-21 (Mon, 21 Oct 2019)

  Changed paths:
    M mlir/examples/toy/Ch4/include/toy/ShapeInferenceInterface.td
    M mlir/examples/toy/Ch4/toyc.cpp
    M mlir/examples/toy/Ch5/include/toy/ShapeInferenceInterface.td
    M mlir/examples/toy/Ch5/toyc.cpp
    M mlir/examples/toy/Ch6/include/toy/ShapeInferenceInterface.td
    M mlir/examples/toy/Ch6/toyc.cpp
    M mlir/g3doc/Tutorials/Toy/Ch-4.md
    M mlir/test/Examples/Toy/Ch4/shape_inference.mlir
    M mlir/test/Examples/Toy/Ch5/shape_inference.mlir
    M mlir/test/Examples/Toy/Ch6/shape_inference.mlir

  Log Message:
  -----------
  Cleanup and rewrite Ch-4.md.

This change rewrites Ch-4.md to introduced interfaces in a detailed step-by-step manner, adds examples, and fixes some errors.

PiperOrigin-RevId: 275887017


  Commit: 5f867d26b47c0b1fb0a46306bd3b30e1eea0961a
      https://github.com/llvm/llvm-project/commit/5f867d26b47c0b1fb0a46306bd3b30e1eea0961a
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2019-10-21 (Mon, 21 Oct 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
    M mlir/test/Conversion/GPUToCUDA/lower-launch-func-to-cuda.mlir

  Log Message:
  -----------
  Use LLVM_Type instead of AnyType in the definition of LLVM_CallOp

The type constraint had to be relaxed due to the order of lowering passes in
the examples, that since has been fixed. The relaxed version was still used by
the CUDA lowering for launch sizes of `index` type. This is not necessary since
the GPU dialect does not restrict the type of the launch size operands. Use an
LLVM type instead and restore the check in the LLVM_CallOp definition.

PiperOrigin-RevId: 275920109


  Commit: d9fe892e4228909908cf9b0f6dd80d9b56c060b4
      https://github.com/llvm/llvm-project/commit/d9fe892e4228909908cf9b0f6dd80d9b56c060b4
  Author: Lei Zhang <antiagainst at google.com>
  Date:   2019-10-21 (Mon, 21 Oct 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/SPIRV/SPIRVControlFlowOps.td
    M mlir/lib/Dialect/SPIRV/Serialization/Deserializer.cpp
    M mlir/test/Dialect/SPIRV/Serialization/loop.mlir
    M mlir/test/Dialect/SPIRV/Serialization/selection.mlir
    M mlir/test/Dialect/SPIRV/control-flow-ops.mlir

  Log Message:
  -----------
  [spirv] Allow block arguments on spv.Branch(Conditional)

We will use block arguments as the way to model SPIR-V OpPhi in
the SPIR-V dialect.

This CL also adds a few useful helper methods to both ops to
get the block arguments.

Also added tests for branch weight (de)serialization.

PiperOrigin-RevId: 275960797


  Commit: 020f9eb68c8808c096228e20a40e5a217f4d2aab
      https://github.com/llvm/llvm-project/commit/020f9eb68c8808c096228e20a40e5a217f4d2aab
  Author: Lei Zhang <antiagainst at google.com>
  Date:   2019-10-21 (Mon, 21 Oct 2019)

  Changed paths:
    M mlir/include/mlir/TableGen/Operator.h
    M mlir/lib/TableGen/Operator.cpp
    M mlir/test/lib/TestDialect/TestOps.td
    M mlir/test/mlir-tblgen/pattern.mlir
    M mlir/tools/mlir-tblgen/RewriterGen.cpp

  Log Message:
  -----------
  [DRR] Allow interleaved operands and attributes

Previously DRR assumes attributes to appear after operands. This was the
previous requirements on ODS, but that has changed some time ago. Fix
DRR to also support interleaved operands and attributes.

PiperOrigin-RevId: 275983485


  Commit: 057ee97c73765e931579f3dc23e740a4bab87843
      https://github.com/llvm/llvm-project/commit/057ee97c73765e931579f3dc23e740a4bab87843
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-10-21 (Mon, 21 Oct 2019)

  Changed paths:
    M mlir/include/mlir/Parser.h
    M mlir/lib/Parser/Parser.cpp

  Log Message:
  -----------
  NFC: Add support for parsing attributes programmatically via mlir::parseAttribute.

This matches the behavior of the public mlir::parseType, and even uses the internal implementation.

PiperOrigin-RevId: 275989777


  Commit: 0237e52dde1a0b295d4665a522998e2112f8d3ce
      https://github.com/llvm/llvm-project/commit/0237e52dde1a0b295d4665a522998e2112f8d3ce
  Author: Hanhan Wang <hanchung at google.com>
  Date:   2019-10-21 (Mon, 21 Oct 2019)

  Changed paths:
    M mlir/include/mlir/IR/AffineMap.h

  Log Message:
  -----------
  NFC: Remove a right parenthesis from comment.
PiperOrigin-RevId: 275998781


  Commit: 43de1c43037b352010376b5e1199db0e4e54848e
      https://github.com/llvm/llvm-project/commit/43de1c43037b352010376b5e1199db0e4e54848e
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2019-10-22 (Tue, 22 Oct 2019)

  Changed paths:
    M mlir/bindings/python/pybind.cpp

  Log Message:
  -----------
  Expose optimizations flags in Python bindings

ExecutionEngine currently supports additional parameters that can be used to
run LLVM transformations during JIT compilation. Expose this to Python
bindings. When the ExecutionEngine functionality is moved to LLVM, the
bindings-specific code can be updated to interact with LLVM.

PiperOrigin-RevId: 276060475


  Commit: ad6925f479546f4340e88c2223f285d1006a82e0
      https://github.com/llvm/llvm-project/commit/ad6925f479546f4340e88c2223f285d1006a82e0
  Author: Uday Bondhugula <udayb at iisc.ac.in>
  Date:   2019-10-22 (Tue, 22 Oct 2019)

  Changed paths:
    M mlir/lib/Dialect/LoopOps/LoopOps.cpp
    M mlir/test/Dialect/Loops/invalid.mlir

  Log Message:
  -----------
  Update loop.for verifier message

fix: nonnegative -> positive

Closes tensorflow/mlir#206

COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/206 from bondhugula:bondhugula-patch-1 9a47ca7dfd230180a9df33e9a64b33d02252d30a
PiperOrigin-RevId: 276060885


  Commit: d499976098bb37e2741c02259959c2901de88709
      https://github.com/llvm/llvm-project/commit/d499976098bb37e2741c02259959c2901de88709
  Author: MLIR Team <no-reply at google.com>
  Date:   2019-10-22 (Tue, 22 Oct 2019)

  Changed paths:
    M mlir/g3doc/Tutorials/Toy/Ch-3.md

  Log Message:
  -----------
  Update chapter 3 code snippet to match the actual output of the code

PiperOrigin-RevId: 276117540


  Commit: 0d33703f2a4a457253f60e6661615fed28f48fe6
      https://github.com/llvm/llvm-project/commit/0d33703f2a4a457253f60e6661615fed28f48fe6
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2019-10-23 (Wed, 23 Oct 2019)

  Changed paths:
    R mlir/include/mlir/ExecutionEngine/MemRefUtils.h
    M mlir/lib/ExecutionEngine/CMakeLists.txt
    R mlir/lib/ExecutionEngine/MemRefUtils.cpp
    M mlir/lib/Support/JitRunner.cpp

  Log Message:
  -----------
  Drop MemRefUtils from the ExecutionEngine

The ExecutionEngine was updated recently to only take the LLVM dialect as
input. Memrefs are no longer expected in the signature of the entry point
function by the executor so there is no need to allocate and free them. The
code in MemRefUtils is therefore dead and furthermore out of sync with the
recent evolution of memref type to support strides. Drop it.

PiperOrigin-RevId: 276272302


  Commit: 5ee610a091ccde30ffe8680f132961f7442c7786
      https://github.com/llvm/llvm-project/commit/5ee610a091ccde30ffe8680f132961f7442c7786
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-10-23 (Wed, 23 Oct 2019)

  Changed paths:
    M mlir/examples/toy/Ch2/mlir/MLIRGen.cpp
    M mlir/examples/toy/Ch3/mlir/MLIRGen.cpp
    M mlir/examples/toy/Ch4/mlir/MLIRGen.cpp
    M mlir/examples/toy/Ch5/mlir/MLIRGen.cpp
    M mlir/examples/toy/Ch6/mlir/MLIRGen.cpp
    M mlir/g3doc/Tutorials/Toy/Ch-3.md

  Log Message:
  -----------
  NFC: Remove references to the toy.generic attribute.

This was used for shape inference in the previous tutorial flow.

PiperOrigin-RevId: 276351916


  Commit: edffbbcdaef0adde08a0440c2180074c07ed7742
      https://github.com/llvm/llvm-project/commit/edffbbcdaef0adde08a0440c2180074c07ed7742
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2019-10-23 (Wed, 23 Oct 2019)

  Changed paths:
    M mlir/lib/Transforms/DialectConversion.cpp

  Log Message:
  -----------
  Fix "set-but-unused" warning in DialectConversion

The variable in question is only used in an assertion,
leading to a warning in opt builds.

PiperOrigin-RevId: 276352259


  Commit: 21ee4e987f4f3b4d8a55b284dcc25c5220e894f3
      https://github.com/llvm/llvm-project/commit/21ee4e987f4f3b4d8a55b284dcc25c5220e894f3
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-10-23 (Wed, 23 Oct 2019)

  Changed paths:
    M mlir/g3doc/Diagnostics.md
    M mlir/lib/IR/Diagnostics.cpp
    M mlir/test/IR/invalid-module-op.mlir
    M mlir/test/IR/test-symbol-uses.mlir
    M mlir/test/Transforms/memref-dependence-check.mlir

  Log Message:
  -----------
  Add @below and @above directives to verify-diagnostics.

This simplifies defining expected-* directives when there are multiple that apply to the next or previous line. @below applies the directive to the next non-designator line, i.e. the next line that does not contain an expected-* designator. @above applies to the previous non designator line.

Examples:

// Expect an error on the next line that does not contain a designator.
// expected-remark at below {{remark on function below}}
// expected-remark at below {{another remark on function below}}
func @bar(%a : f32)

// Expect an error on the previous line that does not contain a designator.
func @baz(%a : f32)
// expected-remark at above {{remark on function above}}
// expected-remark at above {{another remark on function above}}

PiperOrigin-RevId: 276369085


  Commit: 9a18ff3d629f3cd13d1a241700014c05757ca61f
      https://github.com/llvm/llvm-project/commit/9a18ff3d629f3cd13d1a241700014c05757ca61f
  Author: Alexander Belyaev <pifon at google.com>
  Date:   2019-10-23 (Wed, 23 Oct 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/StandardOps/Ops.td
    M mlir/lib/Dialect/StandardOps/Ops.cpp

  Log Message:
  -----------
  Wrap ODS to 80 lines and remove const qualifier for local `int` variable (NFC)

This addresses post-submit comments on 00d2a37e32

PiperOrigin-RevId: 276419770


  Commit: d2ce435dba36ca2575073d9d51e34b77ffad2e27
      https://github.com/llvm/llvm-project/commit/d2ce435dba36ca2575073d9d51e34b77ffad2e27
  Author: Alexander Belyaev <pifon at google.com>
  Date:   2019-10-24 (Thu, 24 Oct 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/LLVMIR/LLVMDialect.h
    A mlir/lib/Conversion/GPUCommon/OpToFuncCallLowering.h
    M mlir/lib/Conversion/GPUToNVVM/LowerGpuOpsToNVVMOps.cpp
    M mlir/lib/Conversion/GPUToROCDL/LowerGpuOpsToROCDLOps.cpp

  Log Message:
  -----------
  Add custom lowering of ExpOp for NVVM and ROCM.

PiperOrigin-RevId: 276440911


  Commit: f56d8187fa4bd087c23188036cdc09c5b5c749a8
      https://github.com/llvm/llvm-project/commit/f56d8187fa4bd087c23188036cdc09c5b5c749a8
  Author: Mehdi Amini <aminim at google.com>
  Date:   2019-10-24 (Thu, 24 Oct 2019)

  Changed paths:
    M mlir/lib/EDSC/CMakeLists.txt

  Log Message:
  -----------
  Add missing dependency on MLIRIR on MLIREDSCInterface

MLIRIR includes generated header for interfaces, including these headers require
an extra dependency to ensure these headers are generated before we attempt to
build MLIREDSCInterface.

PiperOrigin-RevId: 276518255


  Commit: ef43b5653830641766997c10699682f90f1c24da
      https://github.com/llvm/llvm-project/commit/ef43b5653830641766997c10699682f90f1c24da
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-10-24 (Thu, 24 Oct 2019)

  Changed paths:
    M mlir/include/mlir/IR/SymbolTable.h
    M mlir/lib/IR/SymbolTable.cpp
    A mlir/test/IR/test-symbol-rauw.mlir
    M mlir/test/lib/IR/TestSymbolUses.cpp

  Log Message:
  -----------
  Add support for replacing all uses of a symbol.

This requires reconstructing the attribute dictionary of each operation containing a use.

PiperOrigin-RevId: 276520544


  Commit: 2b61b7979eb59df579a3a4bf6fe768ddf2a556f4
      https://github.com/llvm/llvm-project/commit/2b61b7979eb59df579a3a4bf6fe768ddf2a556f4
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-10-24 (Thu, 24 Oct 2019)

  Changed paths:
    M mlir/bindings/python/pybind.cpp
    M mlir/examples/toy/Ch3/toyc.cpp
    M mlir/examples/toy/Ch4/toyc.cpp
    M mlir/examples/toy/Ch5/toyc.cpp
    M mlir/examples/toy/Ch6/toyc.cpp
    M mlir/g3doc/Tutorials/Toy/Ch-3.md
    M mlir/include/mlir/Pass/PassManager.h
    M mlir/include/mlir/Transforms/Passes.h
    M mlir/lib/Transforms/CSE.cpp
    M mlir/lib/Transforms/Canonicalizer.cpp
    M mlir/test/AffineOps/canonicalize.mlir
    M mlir/test/Dialect/FxpMathOps/lower-uniform-real-math-addew.mlir
    M mlir/test/Dialect/FxpMathOps/lower-uniform-real-math-mulew.mlir
    M mlir/test/Dialect/GPU/canonicalize.mlir
    M mlir/test/Dialect/LLVMIR/terminator.mlir
    M mlir/test/Dialect/QuantOps/canonicalize.mlir
    M mlir/test/Dialect/SPIRV/canonicalize.mlir
    M mlir/test/Pass/ir-printing.mlir
    M mlir/test/Pass/pass-timing.mlir
    M mlir/test/Pass/pipeline-parsing.mlir
    M mlir/test/Quantizer/matmul.mlir
    M mlir/test/Transforms/canonicalize.mlir
    M mlir/test/Transforms/cse.mlir
    M mlir/test/Transforms/test-canonicalize.mlir
    M mlir/test/lib/Transforms/TestConstantFold.cpp

  Log Message:
  -----------
  Convert the Canonicalize and CSE passes to generic Operation Passes.

This allows for them to be used on other non-function, or even other function-like, operations. The algorithms are already generic, so this is simply changing the derived pass type. The majority of this change is just ensuring that the nesting of these passes remains the same, as the pass manager won't auto-nest them anymore.

PiperOrigin-RevId: 276573038


  Commit: dd2e444325ddf047f224524dfc7d1881aa1051e8
      https://github.com/llvm/llvm-project/commit/dd2e444325ddf047f224524dfc7d1881aa1051e8
  Author: Denis Khalikov <khalikov.denis at huawei.com>
  Date:   2019-10-24 (Thu, 24 Oct 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/SPIRV/SPIRVOps.td
    M mlir/lib/Dialect/SPIRV/SPIRVOps.cpp
    M mlir/test/Dialect/SPIRV/canonicalize.mlir

  Log Message:
  -----------
  [spirv] AccessChainOp canonicalization.

Combine chained `spirv::AccessChainOp` operations into one
`spirv::AccessChainOp` operation.

Closes tensorflow/mlir#198

COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/198 from denis0x0D:sandbox/canon_access_chain 0cb87955a85511071143d62637ff939d0dabc2bd
PiperOrigin-RevId: 276609345


  Commit: b69e8ee049ff1ba1e1ecb90acaa197cf869d9aa3
      https://github.com/llvm/llvm-project/commit/b69e8ee049ff1ba1e1ecb90acaa197cf869d9aa3
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-10-25 (Fri, 25 Oct 2019)

  Changed paths:
    M mlir/lib/Parser/Parser.cpp
    M mlir/test/IR/parser.mlir

  Log Message:
  -----------
  Add support for parsing multiple result name groups.

This allows for parsing things like:

%name_1, %name_2:5, %name_3:2 = "my.op" ...

This is useful for operations that have groups of variadic result values. The
total number of results is expected to match the number of results defined by
the operation.

PiperOrigin-RevId: 276703280


  Commit: cde337cfdeecc495692caf42aa8fdd0bf89e7c50
      https://github.com/llvm/llvm-project/commit/cde337cfdeecc495692caf42aa8fdd0bf89e7c50
  Author: Smit Hinsu <hinsu at google.com>
  Date:   2019-10-25 (Fri, 25 Oct 2019)

  Changed paths:
    M mlir/include/mlir/IR/OpBase.td
    M mlir/test/lib/TestDialect/TestOps.td
    M mlir/test/mlir-tblgen/types.mlir

  Log Message:
  -----------
  Define AnyRankedTensor Type in TableGen

PiperOrigin-RevId: 276714649


  Commit: 780a108d31d798d4cc3c3373dfd26108a613ae0f
      https://github.com/llvm/llvm-project/commit/780a108d31d798d4cc3c3373dfd26108a613ae0f
  Author: Alexander Belyaev <pifon at google.com>
  Date:   2019-10-26 (Sat, 26 Oct 2019)

  Changed paths:
    M mlir/lib/Conversion/GPUCommon/OpToFuncCallLowering.h
    M mlir/test/Conversion/GPUToNVVM/gpu-to-nvvm.mlir
    M mlir/test/Conversion/GPUToROCDL/gpu-to-rocdl.mlir

  Log Message:
  -----------
  Fix include guards and add tests for OpToFuncCallLowering.

PiperOrigin-RevId: 276859463


  Commit: 663f9e0c9fe4d37ad3b899e8e9d25c16dc1fbfe5
      https://github.com/llvm/llvm-project/commit/663f9e0c9fe4d37ad3b899e8e9d25c16dc1fbfe5
  Author: Alexander Belyaev <pifon at google.com>
  Date:   2019-10-28 (Mon, 28 Oct 2019)

  Changed paths:
    M mlir/lib/Conversion/GPUCommon/OpToFuncCallLowering.h

  Log Message:
  -----------
  Lookup function declaration in SymbolTable not ModuleOp.

PiperOrigin-RevId: 277033167


  Commit: e38fe4a7af03f504b1a51b39fba2a3f07aad46f6
      https://github.com/llvm/llvm-project/commit/e38fe4a7af03f504b1a51b39fba2a3f07aad46f6
  Author: Christian Sigg <csigg at google.com>
  Date:   2019-10-28 (Mon, 28 Oct 2019)

  Changed paths:
    M mlir/lib/ExecutionEngine/ExecutionEngine.cpp

  Log Message:
  -----------
  Print reason why dynamic library could not be loaded during execution.

PiperOrigin-RevId: 277037138


  Commit: 2f4d0c085a9849fb48b8b55e10f013ac851e470e
      https://github.com/llvm/llvm-project/commit/2f4d0c085a9849fb48b8b55e10f013ac851e470e
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-10-28 (Mon, 28 Oct 2019)

  Changed paths:
    M mlir/g3doc/DialectConversion.md
    M mlir/include/mlir/Transforms/DialectConversion.h
    M mlir/lib/Transforms/DialectConversion.cpp
    M mlir/test/Transforms/test-legalizer-full.mlir
    M mlir/test/lib/TestDialect/TestPatterns.cpp

  Log Message:
  -----------
  Add support for marking an operation as recursively legal.

In some cases, it may be desirable to mark entire regions of operations as legal. This provides an additional granularity of context to the concept of "legal". The `ConversionTarget` supports marking operations, that were previously added as `Legal` or `Dynamic`, as `recursively` legal. Recursive legality means that if an operation instance is legal, either statically or dynamically, all of the operations nested within are also considered legal. An operation can be marked via `markOpRecursivelyLegal<>`:

```c++
ConversionTarget &target = ...;

/// The operation must first be marked as `Legal` or `Dynamic`.
target.addLegalOp<MyOp>(...);
target.addDynamicallyLegalOp<MySecondOp>(...);

/// Mark the operation as always recursively legal.
target.markOpRecursivelyLegal<MyOp>();
/// Mark optionally with a callback to allow selective marking.
target.markOpRecursivelyLegal<MyOp, MySecondOp>([](Operation *op) { ... });
/// Mark optionally with a callback to allow selective marking.
target.markOpRecursivelyLegal<MyOp>([](MyOp op) { ... });
```

PiperOrigin-RevId: 277086382


  Commit: 98226e62ecf4d64323e4531daff39183691800cf
      https://github.com/llvm/llvm-project/commit/98226e62ecf4d64323e4531daff39183691800cf
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2019-10-28 (Mon, 28 Oct 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/Linalg/Utils/Utils.h
    M mlir/include/mlir/EDSC/Builders.h
    M mlir/lib/Dialect/Linalg/Transforms/Fusion.cpp
    M mlir/lib/Dialect/Linalg/Transforms/LowerToLoops.cpp
    M mlir/lib/Dialect/Linalg/Transforms/Promotion.cpp
    M mlir/lib/Dialect/Linalg/Transforms/Tiling.cpp
    M mlir/lib/Dialect/Linalg/Utils/Utils.cpp

  Log Message:
  -----------
  Standardize Linalg transformations to take an OpBuilder and an OperationFolder - NFC

This will be used to specify declarative Linalg transformations in a followup CL. In particular, the PatternRewrite mechanism does not allow folding and has its own way of tracking erasure.

PiperOrigin-RevId: 277149158


  Commit: 66ec24d83310dd623d79619840313f98e9a72644
      https://github.com/llvm/llvm-project/commit/66ec24d83310dd623d79619840313f98e9a72644
  Author: Sean Silva <silvasean at google.com>
  Date:   2019-10-28 (Mon, 28 Oct 2019)

  Changed paths:
    M mlir/lib/Parser/Parser.cpp
    M mlir/test/IR/wrapping_op.mlir
    M mlir/test/lib/TestDialect/TestDialect.cpp

  Log Message:
  -----------
  Parse locations in parseGenericOperation

For ops that recursively re-enter the parser to parse an operation (such as
ops with a "wraps" pretty form), this ensures that the wrapped op will parse
its location, which can then be used for the locations of the wrapping op
and any other implicit ops.

PiperOrigin-RevId: 277152636


  Commit: ca2538e9a749deeedb6c790d85d811133e88ad91
      https://github.com/llvm/llvm-project/commit/ca2538e9a749deeedb6c790d85d811133e88ad91
  Author: Lei Zhang <antiagainst at google.com>
  Date:   2019-10-28 (Mon, 28 Oct 2019)

  Changed paths:
    M mlir/g3doc/Dialects/SPIR-V.md
    M mlir/include/mlir/Dialect/SPIRV/SPIRVBase.td
    M mlir/lib/Dialect/SPIRV/Serialization/Deserializer.cpp
    M mlir/lib/Dialect/SPIRV/Serialization/Serializer.cpp
    A mlir/test/Dialect/SPIRV/Serialization/phi.mlir

  Log Message:
  -----------
  [spirv] Support OpPhi using block arguments

This CL adds another control flow instruction in SPIR-V: OpPhi.
It is modelled as block arguments to be idiomatic with MLIR.
See the rationale.md doc for "Block Arguments vs PHI nodes".
Serialization and deserialization is updated to convert between
block arguments and SPIR-V OpPhi instructions.

PiperOrigin-RevId: 277161545


  Commit: 61225d678e5db64ba2109261596492700c5475e0
      https://github.com/llvm/llvm-project/commit/61225d678e5db64ba2109261596492700c5475e0
  Author: Mahesh Ravishankar <ravishankarm at google.com>
  Date:   2019-10-28 (Mon, 28 Oct 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/SPIRV/SPIRVLogicalOps.td
    M mlir/lib/Dialect/SPIRV/SPIRVOps.cpp

  Log Message:
  -----------
  Add a convenient operation build method for spirv::SelectOp

The SelectOp always has the same result type as its true/false
value. Add a builder method that uses the operand type to get the
result type.

PiperOrigin-RevId: 277217978


  Commit: 8656af1e8216d521ef38a6d78f2a5c701871058a
      https://github.com/llvm/llvm-project/commit/8656af1e8216d521ef38a6d78f2a5c701871058a
  Author: Lei Zhang <antiagainst at google.com>
  Date:   2019-10-29 (Tue, 29 Oct 2019)

  Changed paths:
    M mlir/lib/Dialect/SPIRV/Serialization/Serializer.cpp

  Log Message:
  -----------
  [spirv] Use LLVM graph traversal utility for PrettyBlockOrderVisitor

This removes a bunch of special tailored DFS code in favor of the common
LLVM utility. Besides, we avoid recursion with system stack given that
llvm::depth_first_ext is iterator based and maintains its own stack.
PiperOrigin-RevId: 277272961


  Commit: c87c7f57324233dd9871fe82a00d036ff10a3674
      https://github.com/llvm/llvm-project/commit/c87c7f57324233dd9871fe82a00d036ff10a3674
  Author: Diego Caballero <diego.caballero at intel.com>
  Date:   2019-10-29 (Tue, 29 Oct 2019)

  Changed paths:
    M mlir/lib/Transforms/Utils/GreedyPatternRewriteDriver.cpp

  Log Message:
  -----------
  Bugfix: Keep worklistMap in sync with worklist in GreedyPatternRewriter

When we removed a pattern, we removed it from worklist but not from
worklistMap. Then, when we tried to add a new pattern on the same Operation
again, the pattern wasn't added since it already existed in the
worklistMap (but not in the worklist).

Closes tensorflow/mlir#211

PiperOrigin-RevId: 277319669


  Commit: 5e932afd5bbbba988d1dfae1c075e86657dd71bc
      https://github.com/llvm/llvm-project/commit/5e932afd5bbbba988d1dfae1c075e86657dd71bc
  Author: MLIR Team <no-reply at google.com>
  Date:   2019-10-29 (Tue, 29 Oct 2019)

  Changed paths:
    M mlir/tools/mlir-tblgen/OpDocGen.cpp

  Log Message:
  -----------
  Add "[TOC]" to generated documentation

PiperOrigin-RevId: 277354482


  Commit: f3efb60ccc1942796a006434bf5935659bb5e3fc
      https://github.com/llvm/llvm-project/commit/f3efb60ccc1942796a006434bf5935659bb5e3fc
  Author: Lei Zhang <antiagainst at google.com>
  Date:   2019-10-29 (Tue, 29 Oct 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/SPIRV/SPIRVControlFlowOps.td

  Log Message:
  -----------
  [spirv] Mark control flow ops as InFunctionScope

PiperOrigin-RevId: 277373473


  Commit: 80213ba5f0d72f4c50ec641d40eed171bba464ad
      https://github.com/llvm/llvm-project/commit/80213ba5f0d72f4c50ec641d40eed171bba464ad
  Author: Lei Zhang <antiagainst at google.com>
  Date:   2019-10-30 (Wed, 30 Oct 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/SPIRV/SPIRVBase.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVControlFlowOps.td
    M mlir/lib/Dialect/SPIRV/SPIRVOps.cpp
    M mlir/test/Dialect/SPIRV/Serialization/terminator.mlir
    M mlir/test/Dialect/SPIRV/control-flow-ops.mlir
    M mlir/utils/spirv/gen_spirv_dialect.py

  Log Message:
  -----------
  [spirv] Fix gen_spirv_dialect.py and add spv.Unreachable

This CL fixed gen_spirv_dialect.py to support nested delimiters when
chunking existing ODS entries in .td files and to allow ops without
correspondence in the spec. This is needed to pull in the definition
of OpUnreachable.

PiperOrigin-RevId: 277486465


  Commit: 05a5a4141648218db2440b4e3a355398ef822111
      https://github.com/llvm/llvm-project/commit/05a5a4141648218db2440b4e3a355398ef822111
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2019-10-30 (Wed, 30 Oct 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/Linalg/CMakeLists.txt
    M mlir/include/mlir/Dialect/Linalg/IR/LinalgLibraryOps.td
    M mlir/include/mlir/Dialect/Linalg/IR/LinalgOps.td
    M mlir/include/mlir/Dialect/Linalg/Passes.h
    A mlir/include/mlir/Dialect/Linalg/Transforms/CMakeLists.txt
    A mlir/include/mlir/Dialect/Linalg/Transforms/LinalgTransformPatterns.td
    M mlir/lib/Dialect/Linalg/CMakeLists.txt
    A mlir/lib/Dialect/Linalg/Transforms/LinalgTransforms.cpp
    A mlir/test/Dialect/Linalg/transform-patterns.mlir

  Log Message:
  -----------
  Add basic support for declarative Linalg transformations

Linalg ops provide a good anchor for pattern matching/rewriting transformations.
This CL adds a simple example of how multi-level tiling may be specified by attaching a simple StringAttr to ops as they are transformed so we can easily specify partial lowering to control transformation application.

This is a first stab at taking advantage of higher-level information contained in Linalg ops and will evolve in the future.

PiperOrigin-RevId: 277497958


  Commit: cb40e36d3bb93e876ec6d05f128a23f26b952604
      https://github.com/llvm/llvm-project/commit/cb40e36d3bb93e876ec6d05f128a23f26b952604
  Author: Lei Zhang <antiagainst at google.com>
  Date:   2019-10-30 (Wed, 30 Oct 2019)

  Changed paths:
    M mlir/lib/TableGen/Pattern.cpp
    A mlir/test/mlir-tblgen/expect-symbol.td

  Log Message:
  -----------
  Fix segfault when no symbol is given to an constraint operand

This fixed the segfault when we see the following pattern:
  Pat<(...), (...), [(... 1, 2, 3), ...]>

PiperOrigin-RevId: 277544300


  Commit: 0568e952b6d1dc53f44c8eb5af167fc9d2e0bb34
      https://github.com/llvm/llvm-project/commit/0568e952b6d1dc53f44c8eb5af167fc9d2e0bb34
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-10-30 (Wed, 30 Oct 2019)

  Changed paths:
    M mlir/include/mlir/Support/STLExtras.h
    M mlir/lib/Dialect/AffineOps/AffineOps.cpp
    M mlir/lib/Dialect/SPIRV/SPIRVOps.cpp
    M mlir/lib/IR/Module.cpp

  Log Message:
  -----------
  Add a utility accessor 'has_single_element' for ranges.

This provides an easy way to check if a range has a single element.

PiperOrigin-RevId: 277544647


  Commit: a32f0dcb5d963d2281bc08902468693ea2911342
      https://github.com/llvm/llvm-project/commit/a32f0dcb5d963d2281bc08902468693ea2911342
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-10-30 (Wed, 30 Oct 2019)

  Changed paths:
    M mlir/lib/Transforms/Utils/GreedyPatternRewriteDriver.cpp
    M mlir/test/Transforms/canonicalize.mlir

  Log Message:
  -----------
  Add support to GreedyPatternRewriter for erasing unreachable blocks.

Rewrite patterns may make modifications to the CFG, including dropping edges between blocks. This change adds a simple unreachable block elimination run at the end of each iteration to ensure that the CFG remains valid.

PiperOrigin-RevId: 277545805


  Commit: 736ad2061c491199938cd6b0f31e8dfaac060974
      https://github.com/llvm/llvm-project/commit/736ad2061c491199938cd6b0f31e8dfaac060974
  Author: Jing Pu <jingpu at google.com>
  Date:   2019-10-30 (Wed, 30 Oct 2019)

  Changed paths:
    M mlir/lib/Transforms/ViewOpGraph.cpp

  Log Message:
  -----------
  Dump op location in createPrintOpGraphPass for easier debugging.

PiperOrigin-RevId: 277546527


  Commit: d024b68e6b34ae464bd15e58db21cf6661dc8c02
      https://github.com/llvm/llvm-project/commit/d024b68e6b34ae464bd15e58db21cf6661dc8c02
  Author: Lei Zhang <antiagainst at google.com>
  Date:   2019-10-30 (Wed, 30 Oct 2019)

  Changed paths:
    M mlir/test/mlir-tblgen/expect-symbol.td

  Log Message:
  -----------
  Use `not` to invert return code in expected to fail tests

Windows does not like the RUN command of `(... || true) | ...`.

PiperOrigin-RevId: 277587031


  Commit: d423d4a3387a90a5b6634f087bdef838566008d3
      https://github.com/llvm/llvm-project/commit/d423d4a3387a90a5b6634f087bdef838566008d3
  Author: Denis Khalikov <khalikov.denis at huawei.com>
  Date:   2019-10-30 (Wed, 30 Oct 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/SPIRV/SPIRVBase.td
    A mlir/include/mlir/Dialect/SPIRV/SPIRVCastOps.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVOps.td
    M mlir/lib/Dialect/SPIRV/SPIRVOps.cpp
    M mlir/test/Dialect/SPIRV/Serialization/cast-ops.mlir
    M mlir/test/Dialect/SPIRV/ops.mlir
    M mlir/utils/spirv/define_inst.sh

  Log Message:
  -----------
  [spirv] Add cast operations

This CL added op definitions for a few cast operations:

* OpConvertFToU
* OpConvertFToS
* OpConvertSToF
* OpConvertUToF
* OpUConvert
* OpSConvert
* OpFConvert

Also moved the definition of spv.Bitcast to the new file.

Closes tensorflow/mlir#208 and tensorflow/mlir#174

COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/208 from denis0x0D:sandbox/cast_ops 79bc9b37398aafddee6cf6beb301807988fe67f9
PiperOrigin-RevId: 277587891


  Commit: e55bd90bc7c849128cd14f4bc7a7706c54db4fea
      https://github.com/llvm/llvm-project/commit/e55bd90bc7c849128cd14f4bc7a7706c54db4fea
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-10-30 (Wed, 30 Oct 2019)

  Changed paths:
    M mlir/include/mlir/IR/SymbolTable.h

  Log Message:
  -----------
  NFC: Simplify UseRange::iterator to just be a std::vector::const_iterator.

At some point the implementation of UseRange was more complex, but now it is just a simple wrapper around a std::vector<SymbolUse>.

PiperOrigin-RevId: 277597294


  Commit: f9a4d3bdb024a918fd5eab7d59176dbc2ab08e80
      https://github.com/llvm/llvm-project/commit/f9a4d3bdb024a918fd5eab7d59176dbc2ab08e80
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2019-10-31 (Thu, 31 Oct 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/Linalg/Analysis/DependenceAnalysis.h
    M mlir/include/mlir/Dialect/Linalg/Utils/Utils.h
    M mlir/lib/Dialect/Linalg/Analysis/DependenceAnalysis.cpp
    M mlir/lib/Dialect/Linalg/Transforms/Fusion.cpp

  Log Message:
  -----------
  LinalgDependenceGraph: add const modifiers to accessors

MLIR const-correctness policy is to avoid having `const` on IR objects.
LinalgDependenceGraph is not an IR object but an auxiliary data structure.
Furthermore, it is not updated once constructed unlike IR objects. Add const
qualifiers to get* and find* methods of LinalgDependenceGraph since they are
not modifying the graph. This allows transformation functions that require the
dependence graph to take it by const-reference, clearly indicating that they
are not modifying it (and that the graph may have to be recomputed after the
transformation).

PiperOrigin-RevId: 277731608


  Commit: 07b4ce7409c12d35c1d707c07c942dd977026d71
      https://github.com/llvm/llvm-project/commit/07b4ce7409c12d35c1d707c07c942dd977026d71
  Author: Mehdi Amini <aminim at google.com>
  Date:   2019-10-31 (Thu, 31 Oct 2019)

  Changed paths:
    M mlir/include/mlir/IR/OpBase.td
    M mlir/test/IR/traits.mlir
    M mlir/test/lib/TestDialect/TestDialect.h
    M mlir/test/lib/TestDialect/TestOps.td

  Log Message:
  -----------
  Add a test.symbol_scope operation that has the SymbolTable Traits to the Test dialect

PiperOrigin-RevId: 277741687


  Commit: ce9477934a5a7a266dda989f76c25b7a4cf60b09
      https://github.com/llvm/llvm-project/commit/ce9477934a5a7a266dda989f76c25b7a4cf60b09
  Author: Mehdi Amini <aminim at google.com>
  Date:   2019-10-31 (Thu, 31 Oct 2019)

  Changed paths:
    M mlir/test/Conversion/GPUToNVVM/gpu-to-nvvm.mlir
    M mlir/test/Conversion/GPUToROCDL/gpu-to-rocdl.mlir

  Log Message:
  -----------
  Add a test for lowering GPU ops that cover cases where the symbol table isn't held by a ModuleOp (NFC)

PiperOrigin-RevId: 277752004


  Commit: 7432234f3c5ca2da83f152f9f0508244a3b01a18
      https://github.com/llvm/llvm-project/commit/7432234f3c5ca2da83f152f9f0508244a3b01a18
  Author: Lei Zhang <antiagainst at google.com>
  Date:   2019-10-31 (Thu, 31 Oct 2019)

  Changed paths:
    M mlir/examples/toy/Ch2/include/toy/Ops.td
    M mlir/examples/toy/Ch3/include/toy/Ops.td
    M mlir/examples/toy/Ch4/include/toy/Ops.td
    M mlir/examples/toy/Ch4/include/toy/ShapeInferenceInterface.td
    M mlir/examples/toy/Ch5/include/toy/Ops.td
    M mlir/examples/toy/Ch5/include/toy/ShapeInferenceInterface.td
    M mlir/examples/toy/Ch6/include/toy/Ops.td
    M mlir/examples/toy/Ch6/include/toy/ShapeInferenceInterface.td
    M mlir/include/mlir/Analysis/CallInterfaces.td
    M mlir/include/mlir/Analysis/InferTypeOpInterface.td
    M mlir/include/mlir/Dialect/AffineOps/AffineOps.td
    M mlir/include/mlir/Dialect/AffineOps/AffineOpsBase.td
    M mlir/include/mlir/Dialect/FxpMathOps/FxpMathOps.td
    M mlir/include/mlir/Dialect/GPU/GPUOps.td
    M mlir/include/mlir/Dialect/LLVMIR/LLVMOpBase.td
    M mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
    M mlir/include/mlir/Dialect/LLVMIR/NVVMOps.td
    M mlir/include/mlir/Dialect/LLVMIR/ROCDLOps.td
    M mlir/include/mlir/Dialect/Linalg/IR/LinalgBase.td
    M mlir/include/mlir/Dialect/Linalg/IR/LinalgLibraryOps.td
    M mlir/include/mlir/Dialect/Linalg/IR/LinalgOps.td
    M mlir/include/mlir/Dialect/Linalg/Transforms/LinalgTransformPatterns.td
    M mlir/include/mlir/Dialect/LoopOps/LoopOps.td
    M mlir/include/mlir/Dialect/QuantOps/QuantOps.td
    M mlir/include/mlir/Dialect/QuantOps/QuantPredicates.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVArithmeticOps.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVBase.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVBitOps.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVCastOps.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVControlFlowOps.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVGLSLOps.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVLogicalOps.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVOps.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVStructureOps.td
    M mlir/include/mlir/Dialect/StandardOps/Ops.td
    M mlir/include/mlir/Dialect/VectorOps/VectorOps.td
    M mlir/include/mlir/IR/OpBase.td
    M mlir/include/mlir/Transforms/LoopLikeInterface.td
    M mlir/lib/Conversion/GPUToNVVM/GPUToNVVM.td
    M mlir/lib/Conversion/StandardToSPIRV/StandardToSPIRV.td
    M mlir/test/lib/TestDialect/TestOps.td
    M mlir/test/mlir-tblgen/reference-impl.td

  Log Message:
  -----------
  NFC: Use #ifndef in various .td files instead of #ifdef and #else

Upstream LLVM gained support for #ifndef with https://reviews.llvm.org/D61888

This is changed mechanically via the following command:

find . -name "*.td" -exec sed -i -e ':a' -e 'N' -e '$!ba' -e 's/#ifdef \([A-Z_]*\)\n#else/#ifndef \1/g' {} \;

PiperOrigin-RevId: 277789427


  Commit: 96531e2f871d74f6bc224446c40b37425d58a5b4
      https://github.com/llvm/llvm-project/commit/96531e2f871d74f6bc224446c40b37425d58a5b4
  Author: James Molloy <jmolloy at google.com>
  Date:   2019-11-01 (Fri, 01 Nov 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
    M mlir/test/Dialect/LLVMIR/roundtrip.mlir
    M mlir/test/Target/llvmir.mlir

  Log Message:
  -----------
  [mlir][llvm] Add missing cast ops

Also adds a builder method for fcmp, identical to that for icmp.

PiperOrigin-RevId: 277923158


  Commit: bd94a10c02a641e59c5ccfec143f728e13b516c2
      https://github.com/llvm/llvm-project/commit/bd94a10c02a641e59c5ccfec143f728e13b516c2
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2019-11-01 (Fri, 01 Nov 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/Linalg/Analysis/DependenceAnalysis.h
    M mlir/include/mlir/Dialect/Linalg/Passes.h
    M mlir/include/mlir/Dialect/Linalg/Transforms/LinalgTransformPatterns.td
    M mlir/include/mlir/Dialect/Linalg/Utils/Utils.h
    M mlir/lib/Dialect/Linalg/Analysis/DependenceAnalysis.cpp
    M mlir/lib/Dialect/Linalg/Transforms/Fusion.cpp
    M mlir/lib/Dialect/Linalg/Transforms/LinalgTransforms.cpp
    A mlir/test/Dialect/Linalg/foo.mlir
    M mlir/test/Dialect/Linalg/transform-patterns.mlir

  Log Message:
  -----------
  Add Linalg pattern for producer-consumer fusion

This CL adds a simple pattern for specifying producer-consumer fusion on Linalg operations.

Implementing such an extension reveals some interesting properties.
Since Linalg operates on a buffer abstraction, the output buffers are specified as in/out parameters to the ops. As a consequence, there are no SSA use-def chains and one cannot specify complex dag input patterns with the current infrastructure.

Instead this CL uses constraints based on the existing linalg dependence analysis to focus the pattern and refine patterns based on the type of op that last wrote in a buffer.

This is a very local property and is less powerful than the generic dag specification based on SSA use-def chains.

This will be generalized in the future.

PiperOrigin-RevId: 277931503


  Commit: 9cbbd8f4dfa47d84bd7531b255f065762b981fba
      https://github.com/llvm/llvm-project/commit/9cbbd8f4dfa47d84bd7531b255f065762b981fba
  Author: Mahesh Ravishankar <ravishankarm at google.com>
  Date:   2019-11-01 (Fri, 01 Nov 2019)

  Changed paths:
    M mlir/include/mlir/Conversion/LoopsToGPU/LoopsToGPU.h
    M mlir/include/mlir/Conversion/LoopsToGPU/LoopsToGPUPass.h
    M mlir/include/mlir/Transforms/LoopUtils.h
    M mlir/lib/Conversion/LoopsToGPU/LoopsToGPU.cpp
    M mlir/lib/Conversion/LoopsToGPU/LoopsToGPUPass.cpp
    M mlir/lib/Transforms/Utils/LoopUtils.cpp
    A mlir/test/Conversion/LoopsToGPU/imperfect_2D.mlir
    A mlir/test/Conversion/LoopsToGPU/imperfect_3D.mlir
    A mlir/test/Conversion/LoopsToGPU/imperfect_4D.mlir
    A mlir/test/Conversion/LoopsToGPU/imperfect_linalg.mlir
    A mlir/test/Conversion/LoopsToGPU/perfect_1D_setlaunch.mlir
    M mlir/test/Transforms/parametric-mapping.mlir

  Log Message:
  -----------
  Support lowering of imperfectly nested loops into GPU dialect.

The current lowering of loops to GPU only supports lowering of loop
nests where the loops mapped to workgroups and workitems are perfectly
nested. Here a new lowering is added to handle lowering of imperfectly
nested loop body with the following properties
1) The loops partitioned to workgroups are perfectly nested.
2) The loop body of the inner most loop partitioned to workgroups can
contain one or more loop nests that are to be partitioned across
workitems. Each individual loops nests partitioned to workitems should
also be perfectly nested.
3) The number of workgroups and workitems are not deduced from the
loop bounds but are passed in by the caller of the lowering as values.
4) For statements within the perfectly nested loop nest partitioned
across workgroups that are not loops, it is valid to have all threads
execute that statement. This is NOT verified.

PiperOrigin-RevId: 277958868


  Commit: 2fa865719b1fdbb2319b9e38ea36f747642c4c83
      https://github.com/llvm/llvm-project/commit/2fa865719b1fdbb2319b9e38ea36f747642c4c83
  Author: Lei Zhang <antiagainst at google.com>
  Date:   2019-11-01 (Fri, 01 Nov 2019)

  Changed paths:
    M mlir/g3doc/OpDefinitions.md
    M mlir/include/mlir/Dialect/SPIRV/CMakeLists.txt
    M mlir/include/mlir/Dialect/SPIRV/SPIRVBase.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVTypes.h
    M mlir/include/mlir/IR/OpBase.td
    M mlir/include/mlir/TableGen/Attribute.h
    M mlir/lib/Dialect/SPIRV/CMakeLists.txt
    M mlir/lib/Dialect/SPIRV/SPIRVTypes.cpp
    M mlir/lib/TableGen/Attribute.cpp
    M mlir/tools/mlir-tblgen/EnumsGen.cpp
    R mlir/tools/mlir-tblgen/EnumsGen.h
    M mlir/tools/mlir-tblgen/SPIRVUtilsGen.cpp
    M mlir/unittests/TableGen/EnumsGenTest.cpp
    M mlir/unittests/TableGen/enums.td

  Log Message:
  -----------
  Move BitEnumAttr from SPIRVBase.td to OpBase.td

BitEnumAttr is a mechanism for modelling attributes whose value is
a bitfield. It should not be scoped to the SPIR-V dialect and can
be used by other dialects too.

This CL is mostly shuffling code around and adding tests and docs.
Functionality changes are:

* Fixed to use `getZExtValue()` instead of `getSExtValue()` when
  getting the value from the underlying IntegerAttr for a case.
* Changed to auto-detect whether there is a case whose value is
  all bits unset (i.e., zero). If so handle it specially in all
  helper methods.

PiperOrigin-RevId: 277964926


  Commit: e20a2aa9f2b889029e1aa395e2045659a5b4915b
      https://github.com/llvm/llvm-project/commit/e20a2aa9f2b889029e1aa395e2045659a5b4915b
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2019-11-01 (Fri, 01 Nov 2019)

  Changed paths:
    R mlir/test/Dialect/Linalg/foo.mlir

  Log Message:
  -----------
  Delete spurious file

PiperOrigin-RevId: 277967079


  Commit: f143fbfa77ffd6a7da030be6009d2ef662d1e3e0
      https://github.com/llvm/llvm-project/commit/f143fbfa77ffd6a7da030be6009d2ef662d1e3e0
  Author: Lei Zhang <antiagainst at google.com>
  Date:   2019-11-01 (Fri, 01 Nov 2019)

  Changed paths:
    M mlir/include/mlir/IR/OpBase.td
    M mlir/include/mlir/IR/SymbolTable.h
    M mlir/test/IR/attribute.mlir
    M mlir/test/lib/TestDialect/TestDialect.cpp
    M mlir/test/lib/TestDialect/TestOps.td

  Log Message:
  -----------
  Add ReferToOp attribute constraint for SymbolRefAttr

This constraint can be used to limit a SymbolRefAttr to point
to a specific kind of op in the closest parent with a symbol table.

PiperOrigin-RevId: 278001364


  Commit: 445cc3f6dd74e86575153a95ecfb8754d6d5b726
      https://github.com/llvm/llvm-project/commit/445cc3f6dd74e86575153a95ecfb8754d6d5b726
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-11-01 (Fri, 01 Nov 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/LLVMIR/LLVMDialect.h
    M mlir/include/mlir/Dialect/Linalg/IR/LinalgTypes.h
    M mlir/include/mlir/Dialect/QuantOps/QuantOps.h
    M mlir/include/mlir/Dialect/SPIRV/SPIRVDialect.h
    M mlir/include/mlir/IR/Dialect.h
    A mlir/include/mlir/IR/DialectImplementation.h
    M mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
    M mlir/lib/Dialect/Linalg/IR/LinalgTypes.cpp
    M mlir/lib/Dialect/QuantOps/IR/TypeParser.cpp
    M mlir/lib/Dialect/SPIRV/SPIRVDialect.cpp
    M mlir/lib/IR/AsmPrinter.cpp
    M mlir/lib/IR/Dialect.cpp
    M mlir/lib/Parser/Parser.cpp

  Log Message:
  -----------
  Add DialectAsmParser/Printer classes to simplify dialect attribute and type parsing.

These classes are functionally similar to the OpAsmParser/Printer classes and provide hooks for parsing attributes/tokens/types/etc. This change merely sets up the base infrastructure and updates the parser hooks, followups will add hooks as needed to simplify existing handrolled dialect parsers.

This has various different benefits:
*) Attribute/Type parsing is much simpler to define.
*) Dialect attributes/types that contain other attributes/types can now use aliases.
*) It provides a 'spec' with which we may use in the future to auto-generate parsers/printers.
*) Error messages emitted by attribute/type parsers can provide character exact locations rather than "beginning of the string"

PiperOrigin-RevId: 278005322


  Commit: 2ba4d802e030b51e78b7d29238ccc552ea19d1c4
      https://github.com/llvm/llvm-project/commit/2ba4d802e030b51e78b7d29238ccc552ea19d1c4
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-11-01 (Fri, 01 Nov 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/LLVMIR/LLVMDialect.h
    M mlir/include/mlir/Dialect/Linalg/IR/LinalgTypes.h
    M mlir/include/mlir/Dialect/QuantOps/QuantOps.h
    M mlir/include/mlir/Dialect/SPIRV/SPIRVDialect.h
    M mlir/include/mlir/IR/Diagnostics.h
    M mlir/include/mlir/IR/Dialect.h
    M mlir/include/mlir/IR/DialectImplementation.h
    M mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
    M mlir/lib/Dialect/Linalg/IR/LinalgTypes.cpp
    M mlir/lib/Dialect/QuantOps/IR/TypeParser.cpp
    M mlir/lib/Dialect/SPIRV/SPIRVDialect.cpp
    M mlir/lib/IR/Dialect.cpp
    M mlir/lib/Parser/Lexer.h
    M mlir/lib/Parser/Parser.cpp

  Log Message:
  -----------
  Remove the need for passing a location to parseAttribute/parseType.

Now that a proper parser is passed to these methods, there isn't a need to explicitly pass a source location. The source location can be recovered from the parser as necessary. This removes the need to explicitly decode an SMLoc in the case where we don't need to, which can be expensive.

This requires adding some basic nesting support to the parser for supporting nested parsers to allow for remapping source locations of the nested parsers to the top level parser for accurate diagnostics. This is due to the fact that the attribute and type parsers use different source buffers than the top level parser, as they may be represented in string form.

PiperOrigin-RevId: 278014858


  Commit: e94a8bfca8f9dadda5d8a548c210ae39d97a45c1
      https://github.com/llvm/llvm-project/commit/e94a8bfca8f9dadda5d8a548c210ae39d97a45c1
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-11-01 (Fri, 01 Nov 2019)

  Changed paths:
    M mlir/include/mlir/IR/DialectImplementation.h
    M mlir/lib/Dialect/QuantOps/IR/TypeParser.cpp
    M mlir/lib/Parser/Parser.cpp
    M mlir/test/Dialect/QuantOps/parse-any-invalid.mlir
    M mlir/test/Dialect/QuantOps/parse-uniform-invalid.mlir

  Log Message:
  -----------
  Refactor QuantOps TypeParser to use the DialectAsmParser methods directly.

This greatly simplifies the implementation and removes custom parser functionality. The necessary methods are added to the DialectAsmParser.

PiperOrigin-RevId: 278015983


  Commit: 68cfc89a0da4777caf78654d5a75444971175a92
      https://github.com/llvm/llvm-project/commit/68cfc89a0da4777caf78654d5a75444971175a92
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-11-01 (Fri, 01 Nov 2019)

  Changed paths:
    M mlir/include/mlir/IR/DialectImplementation.h
    M mlir/lib/Dialect/Linalg/IR/LinalgTypes.cpp
    M mlir/lib/Parser/Parser.cpp
    M mlir/test/Dialect/Linalg/invalid.mlir

  Log Message:
  -----------
  Refactor LinalgDialect::parseType to use the DialectAsmParser methods directly.

This simplifies the implementation, and removes the need to do explicit string manipulation. A utility method 'parseDimensionList' is added to the DialectAsmParser to simplify defining types and attributes that contain shapes.

PiperOrigin-RevId: 278020604


  Commit: 9fc1772776e5d07d026cf27cbde98632560553c6
      https://github.com/llvm/llvm-project/commit/9fc1772776e5d07d026cf27cbde98632560553c6
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2019-11-01 (Fri, 01 Nov 2019)

  Changed paths:
    M mlir/lib/Dialect/Linalg/Transforms/LinalgTransforms.cpp

  Log Message:
  -----------
  Drop spurious debug spew.

PiperOrigin-RevId: 278023371


  Commit: e4a912eb5a688dcb39036f8a809fc37977beaf1d
      https://github.com/llvm/llvm-project/commit/e4a912eb5a688dcb39036f8a809fc37977beaf1d
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-11-01 (Fri, 01 Nov 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/SPIRV/SPIRVBase.td
    M mlir/include/mlir/IR/DialectImplementation.h
    M mlir/include/mlir/IR/OpDefinition.h
    M mlir/lib/Dialect/SPIRV/SPIRVDialect.cpp
    M mlir/lib/Parser/Parser.cpp
    M mlir/test/Dialect/SPIRV/types.mlir
    M mlir/test/IR/invalid.mlir

  Log Message:
  -----------
  Update the SPV dialect type parser to use the methods on DialectAsmParser directly.

This simplifies the implementation quite a bit, and removes the need for explicit string munging. One change is made to some of the enum elements of SPV_DimAttr to ensure that they are proper identifiers; The string form is now prefixed with 'Dim'.

PiperOrigin-RevId: 278027132


  Commit: 1f43d0d000312c1f004cd76302a8be1636fba413
      https://github.com/llvm/llvm-project/commit/1f43d0d000312c1f004cd76302a8be1636fba413
  Author: MLIR Team <no-reply at google.com>
  Date:   2019-11-04 (Mon, 04 Nov 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/LLVMIR/NVVMOps.td
    M mlir/include/mlir/Target/LLVMIR/ModuleTranslation.h
    M mlir/lib/Dialect/LLVMIR/IR/NVVMDialect.cpp
    M mlir/test/Dialect/LLVMIR/invalid.mlir
    M mlir/test/Dialect/LLVMIR/nvvm.mlir
    M mlir/test/Target/nvvmir.mlir

  Log Message:
  -----------
  [NVVM] Add mma.sync operation.

PiperOrigin-RevId: 278440547


  Commit: 9297a129b163f8f88013e28042fc40ded9dec19a
      https://github.com/llvm/llvm-project/commit/9297a129b163f8f88013e28042fc40ded9dec19a
  Author: Sean Silva <silvasean at google.com>
  Date:   2019-11-05 (Tue, 05 Nov 2019)

  Changed paths:
    M mlir/include/mlir/IR/FunctionSupport.h
    M mlir/include/mlir/IR/Region.h

  Log Message:
  -----------
  Rename Region::RegionType to Region::BlockListType

Region::RegionType doesn't make much sense when reading it. It's just a
list of blocks. So call it that.
PiperOrigin-RevId: 278632500


  Commit: 6d2432561c7822235091d5c58df3b8abb8732610
      https://github.com/llvm/llvm-project/commit/6d2432561c7822235091d5c58df3b8abb8732610
  Author: Lei Zhang <antiagainst at google.com>
  Date:   2019-11-05 (Tue, 05 Nov 2019)

  Changed paths:
    M mlir/tools/mlir-tblgen/OpDocGen.cpp

  Log Message:
  -----------
  Emit empty lines after headers when generating op docs

This makes the generated doc easier to read and it is also
more friendly to certain markdown parsers like kramdown.

Fixes tensorflow/mlir#221

PiperOrigin-RevId: 278643469


  Commit: 2366561a39d80c3c6f0f5b1257760b5a9ed2f7bd
      https://github.com/llvm/llvm-project/commit/2366561a39d80c3c6f0f5b1257760b5a9ed2f7bd
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-11-05 (Tue, 05 Nov 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/StandardOps/Ops.td
    M mlir/include/mlir/IR/PatternMatch.h
    M mlir/include/mlir/Transforms/DialectConversion.h
    M mlir/lib/Dialect/StandardOps/Ops.cpp
    M mlir/lib/IR/PatternMatch.cpp
    M mlir/lib/Transforms/DialectConversion.cpp
    M mlir/test/Transforms/canonicalize.mlir

  Log Message:
  -----------
  Add a PatternRewriter hook to merge blocks, and use it to support for folding branches.

A pattern rewriter hook, mergeBlock, is added that allows for merging the operations of one block into the end of another. This is used to support a canonicalization pattern for branch operations that folds the branch when the successor has a single predecessor(the branch block).

Example:
  ^bb0:
    %c0_i32 = constant 0 : i32
    br ^bb1(%c0_i32 : i32)
  ^bb1(%x : i32):
    return %x : i32

becomes:
  ^bb0:
    %c0_i32 = constant 0 : i32
    return %c0_i32 : i32
PiperOrigin-RevId: 278677825


  Commit: 8fa9d826066f1bd50e183942594138b489fefbf2
      https://github.com/llvm/llvm-project/commit/8fa9d826066f1bd50e183942594138b489fefbf2
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-11-05 (Tue, 05 Nov 2019)

  Changed paths:
    M mlir/include/mlir/IR/OpImplementation.h
    M mlir/lib/Dialect/AffineOps/AffineOps.cpp
    M mlir/lib/Dialect/GPU/IR/GPUDialect.cpp
    M mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
    M mlir/lib/Dialect/LLVMIR/IR/NVVMDialect.cpp
    M mlir/lib/Dialect/LLVMIR/IR/ROCDLDialect.cpp
    M mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
    M mlir/lib/Dialect/LoopOps/LoopOps.cpp
    M mlir/lib/Dialect/SPIRV/SPIRVOps.cpp
    M mlir/lib/Dialect/StandardOps/Ops.cpp
    M mlir/lib/Dialect/VectorOps/VectorOps.cpp
    M mlir/lib/IR/FunctionSupport.cpp
    M mlir/lib/IR/Module.cpp
    M mlir/lib/IR/Operation.cpp
    M mlir/lib/Parser/Parser.cpp

  Log Message:
  -----------
  NFC: Rename parseOptionalAttributeDict -> parseOptionalAttrDict to match the name of the print method.
PiperOrigin-RevId: 278696668


  Commit: 6b534ecbcb2450e3b93bb38c738f0847e3077a39
      https://github.com/llvm/llvm-project/commit/6b534ecbcb2450e3b93bb38c738f0847e3077a39
  Author: James Molloy <jmolloy at google.com>
  Date:   2019-11-05 (Tue, 05 Nov 2019)

  Changed paths:
    M mlir/include/mlir/Target/LLVMIR.h
    M mlir/lib/Target/CMakeLists.txt
    A mlir/lib/Target/LLVMIR/ConvertFromLLVMIR.cpp
    A mlir/test/Target/import.ll
    M mlir/test/lit.cfg.py

  Log Message:
  -----------
  [llvm] Add initial import of LLVM modules to mlir-translate

This adds an importer from LLVM IR or bitcode to the LLVM dialect. The importer is registered with mlir-translate.

Known issues exposed by this patch but not yet fixed:
  * Globals' initializers are attributes, which makes it impossible to represent a ConstantExpr. This will be fixed in a followup.
  * icmp returns i32 rather than i1.
  * select and a couple of other instructions aren't implemented.
  * llvm.cond_br takes its successors in a weird order.

The testing here is known to be non-exhaustive.

I'd appreciate feedback on where this functionality should live. It looks like the translator *from MLIR to LLVM* lives in Target/, but the SPIR-V deserializer lives in Dialect/ which is why I've put this here too.

PiperOrigin-RevId: 278711683


  Commit: 250a11ae0f9b27d3c31c51b5c47a38288fccd39b
      https://github.com/llvm/llvm-project/commit/250a11ae0f9b27d3c31c51b5c47a38288fccd39b
  Author: James Molloy <jmolloy at google.com>
  Date:   2019-11-05 (Tue, 05 Nov 2019)

  Changed paths:
    M mlir/g3doc/Dialects/LLVM.md
    M mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
    M mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
    M mlir/lib/Target/LLVMIR/ConvertFromLLVMIR.cpp
    M mlir/lib/Target/LLVMIR/ModuleTranslation.cpp
    M mlir/test/Dialect/LLVMIR/global.mlir
    M mlir/test/Target/import.ll
    M mlir/test/Target/llvmir.mlir

  Log Message:
  -----------
  [llvm] Allow GlobalOp to take a region for complex initializers

This allows GlobalOp to either take a value attribute (for simple constants) or a region that can
contain IR instructions (that must be constant-foldable) to create a ConstantExpr initializer.

Example:
  // A complex initializer is constructed with an initializer region.
  llvm.mlir.global constant @int_gep() : !llvm<"i32*"> {
    %0 = llvm.mlir.addressof @g2 : !llvm<"i32*">
    %1 = llvm.mlir.constant(2 : i32) : !llvm.i32
    %2 = llvm.getelementptr %0[%1] : (!llvm<"i32*">, !llvm.i32) -> !llvm<"i32*">
    llvm.return %2 : !llvm<"i32*">
  }
PiperOrigin-RevId: 278717836


  Commit: 500e858e6522c3b55c3f23e95689f146e09db43e
      https://github.com/llvm/llvm-project/commit/500e858e6522c3b55c3f23e95689f146e09db43e
  Author: Roberto Rosmaninho <robertogomes at dcc.ufmg.br>
  Date:   2019-11-05 (Tue, 05 Nov 2019)

  Changed paths:
    M mlir/g3doc/Dialects/Standard.md

  Log Message:
  -----------
  Fix typos in the Standard Dialect documentation

"sgt" and "ult" used twice
the second "slt" should be "sge" for signed greater than or equal
the second "ult" should be "ule" unsigned less than or equal

Closes tensorflow/mlir#223

PiperOrigin-RevId: 278745410


  Commit: 8e0f4860cdc07b4c681c434792cede24f16961e3
      https://github.com/llvm/llvm-project/commit/8e0f4860cdc07b4c681c434792cede24f16961e3
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-11-05 (Tue, 05 Nov 2019)

  Changed paths:
    M mlir/include/mlir/IR/OpImplementation.h
    M mlir/lib/Dialect/SPIRV/SPIRVOps.cpp
    M mlir/lib/IR/AsmPrinter.cpp
    M mlir/lib/IR/FunctionSupport.cpp
    M mlir/lib/IR/Module.cpp
    M mlir/lib/Parser/Parser.cpp

  Log Message:
  -----------
  Add (parse|print)OptionalAttrDictWithKeyword hooks to simplify parsing attribute dictionaries with regions.

Many operations with regions add an additional 'attributes' prefix when printing the attribute dictionary to differentiate it from the region body. This leads to duplicated logic for detecting when to actually print the attribute dictionary.

PiperOrigin-RevId: 278747681


  Commit: 146f7de50d6364489ce2a5acc88604f9357c484b
      https://github.com/llvm/llvm-project/commit/146f7de50d6364489ce2a5acc88604f9357c484b
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-11-05 (Tue, 05 Nov 2019)

  Changed paths:
    M mlir/lib/IR/AsmPrinter.cpp

  Log Message:
  -----------
  NFC: Remove an extra space when printing the 'attributes' prefix before a dictionary.
PiperOrigin-RevId: 278795313


  Commit: 0d545921ead96a025541dda145ce502a1c4adc06
      https://github.com/llvm/llvm-project/commit/0d545921ead96a025541dda145ce502a1c4adc06
  Author: Eric Schweitz <eric.schweitz at pgroup.com>
  Date:   2019-11-06 (Wed, 06 Nov 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
    M mlir/test/Dialect/LLVMIR/roundtrip.mlir
    M mlir/test/Target/llvmir.mlir

  Log Message:
  -----------
  Add support for the LLVM FNeg instruction

Closes tensorflow/mlir#216

COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/216 from schweitzpgi:llvmir-fneg-op f9b5f185845d671b745ab6fc213d5d9aff044b34
PiperOrigin-RevId: 278795325


  Commit: c38dca7f4b697f9876b165acc9a6704f756d1173
      https://github.com/llvm/llvm-project/commit/c38dca7f4b697f9876b165acc9a6704f756d1173
  Author: Andy Davis <andydavis at google.com>
  Date:   2019-11-06 (Wed, 06 Nov 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/StandardOps/Ops.td
    M mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
    M mlir/lib/Dialect/Linalg/Transforms/LowerToLLVMDialect.cpp
    M mlir/lib/Dialect/StandardOps/Ops.cpp
    M mlir/test/IR/core-ops.mlir
    M mlir/test/IR/invalid-ops.mlir

  Log Message:
  -----------
  Add ViewOp to the StandardOps dialect, which casts a 1D/i8 element type memref type to an N-D memref type.

Proposed in RFC: https://groups.google.com/a/tensorflow.org/forum/#!searchin/mlir/std.view%7Csort:date/mlir/-wKHANzDNTg/4K6nUAp8AAAJ

Supports creating the N-D memref type with dynamic sizes and at a dynamic offset within the 1D base memref.
This change contains op definition/parsing/printing and tests. Follow up changes will handle constant shape/layout map folding and llvm lowering.

PiperOrigin-RevId: 278869990


  Commit: 5967f91770af670278ae9e668760e8d5be6bbb48
      https://github.com/llvm/llvm-project/commit/5967f91770af670278ae9e668760e8d5be6bbb48
  Author: Lei Zhang <antiagainst at google.com>
  Date:   2019-11-06 (Wed, 06 Nov 2019)

  Changed paths:
    M mlir/g3doc/DeclarativeRewrites.md

  Log Message:
  -----------
  [DRR] List some limitations clearly in the doc

PiperOrigin-RevId: 278882517


  Commit: b5654d1311ffb2dc1f7f9803d36e4e503bfcc9dd
      https://github.com/llvm/llvm-project/commit/b5654d1311ffb2dc1f7f9803d36e4e503bfcc9dd
  Author: Andy Davis <andydavis at google.com>
  Date:   2019-11-06 (Wed, 06 Nov 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/StandardOps/Ops.td
    M mlir/lib/Dialect/StandardOps/Ops.cpp
    M mlir/test/IR/core-ops.mlir
    M mlir/test/IR/invalid-ops.mlir

  Log Message:
  -----------
  Add ViewOp verification for dynamic strides, and address some comments from previous change.

PiperOrigin-RevId: 278903187


  Commit: 68bd355505463431c9c29a09d94ae866763c3522
      https://github.com/llvm/llvm-project/commit/68bd355505463431c9c29a09d94ae866763c3522
  Author: Ben Vanik <benvanik at google.com>
  Date:   2019-11-06 (Wed, 06 Nov 2019)

  Changed paths:
    M mlir/include/mlir/IR/Matchers.h
    M mlir/lib/Dialect/StandardOps/Ops.cpp

  Log Message:
  -----------
  Adding an m_NonZero constant integer matcher.

This is useful for making matching cases where a non-zero value is required more readable, such as the results of a constant comparison that are expected to be equal.

PiperOrigin-RevId: 278932874


  Commit: 1efc5119d9297e208f479cdac3b81dae865f0e86
      https://github.com/llvm/llvm-project/commit/1efc5119d9297e208f479cdac3b81dae865f0e86
  Author: Andy Davis <andydavis at google.com>
  Date:   2019-11-06 (Wed, 06 Nov 2019)

  Changed paths:
    M mlir/g3doc/Dialects/Affine.md

  Log Message:
  -----------
  Add affine load/store/dma_start/dma_wait to dialect doc.

PiperOrigin-RevId: 278941483


  Commit: 7f6c6084b53653aad4ede0620725fddf5bd30beb
      https://github.com/llvm/llvm-project/commit/7f6c6084b53653aad4ede0620725fddf5bd30beb
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2019-11-06 (Wed, 06 Nov 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/StandardOps/Ops.td
    M mlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp
    M mlir/test/Conversion/StandardToLLVM/convert-to-llvmir.mlir
    A mlir/test/Conversion/StandardToLLVM/foo.mlir

  Log Message:
  -----------
  Add lowering of std.view to LLVM

This CL ports the lowering of linalg.view to the newly introduced std.view.
Differences in implementation relate to std.view having slightly different semantics:
1. a static or dynamic offset can be specified.
2. the size of the (contiguous) shape is passed instead of a range.
3. static size and stride information is extracted from the memref type rather than the range.

Besides these differences, lowering behaves the same.
A future CL will update Linalg to use this unified infrastructure.

PiperOrigin-RevId: 278948853


  Commit: ffebc8ce1d876837c706a17d2ccb7a597d93dd74
      https://github.com/llvm/llvm-project/commit/ffebc8ce1d876837c706a17d2ccb7a597d93dd74
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2019-11-06 (Wed, 06 Nov 2019)

  Changed paths:
    R mlir/test/Conversion/StandardToLLVM/foo.mlir

  Log Message:
  -----------
  Drop spurious test file

PiperOrigin-RevId: 278959717


  Commit: f6188b5b07418dda04743a51f0ddcbca30c7a196
      https://github.com/llvm/llvm-project/commit/f6188b5b07418dda04743a51f0ddcbca30c7a196
  Author: Sean Silva <silvasean at google.com>
  Date:   2019-11-06 (Wed, 06 Nov 2019)

  Changed paths:
    M mlir/include/mlir/IR/Block.h
    M mlir/include/mlir/IR/Operation.h
    M mlir/lib/Analysis/AffineAnalysis.cpp
    M mlir/lib/Analysis/Dominance.cpp
    M mlir/lib/Analysis/LoopAnalysis.cpp
    M mlir/lib/IR/Block.cpp
    M mlir/lib/IR/Operation.cpp
    M mlir/lib/IR/Region.cpp
    M mlir/lib/Transforms/PipelineDataTransfer.cpp

  Log Message:
  -----------
  Replace some remnant uses of "inst" with "op".

PiperOrigin-RevId: 278961676


  Commit: 22cfff7043daa10ca3e00afd49ff80b882bbb107
      https://github.com/llvm/llvm-project/commit/22cfff7043daa10ca3e00afd49ff80b882bbb107
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-11-06 (Wed, 06 Nov 2019)

  Changed paths:
    M mlir/examples/toy/Ch1/CMakeLists.txt
    M mlir/examples/toy/Ch1/include/toy/AST.h
    M mlir/examples/toy/Ch1/include/toy/Lexer.h
    M mlir/examples/toy/Ch1/include/toy/Parser.h
    M mlir/examples/toy/Ch1/parser/AST.cpp
    M mlir/examples/toy/Ch1/toyc.cpp
    M mlir/examples/toy/Ch2/include/toy/AST.h
    M mlir/examples/toy/Ch2/include/toy/Lexer.h
    M mlir/examples/toy/Ch2/include/toy/Parser.h
    M mlir/examples/toy/Ch2/mlir/MLIRGen.cpp
    M mlir/examples/toy/Ch2/parser/AST.cpp
    M mlir/examples/toy/Ch2/toyc.cpp
    M mlir/examples/toy/Ch3/include/toy/AST.h
    M mlir/examples/toy/Ch3/include/toy/Lexer.h
    M mlir/examples/toy/Ch3/include/toy/Parser.h
    M mlir/examples/toy/Ch3/mlir/MLIRGen.cpp
    M mlir/examples/toy/Ch3/parser/AST.cpp
    M mlir/examples/toy/Ch3/toyc.cpp
    M mlir/examples/toy/Ch4/include/toy/AST.h
    M mlir/examples/toy/Ch4/include/toy/Lexer.h
    M mlir/examples/toy/Ch4/include/toy/Parser.h
    M mlir/examples/toy/Ch4/mlir/MLIRGen.cpp
    M mlir/examples/toy/Ch4/parser/AST.cpp
    M mlir/examples/toy/Ch4/toyc.cpp
    M mlir/examples/toy/Ch5/include/toy/AST.h
    M mlir/examples/toy/Ch5/include/toy/Lexer.h
    M mlir/examples/toy/Ch5/include/toy/Parser.h
    M mlir/examples/toy/Ch5/mlir/MLIRGen.cpp
    M mlir/examples/toy/Ch5/parser/AST.cpp
    M mlir/examples/toy/Ch5/toyc.cpp
    M mlir/examples/toy/Ch6/include/toy/AST.h
    M mlir/examples/toy/Ch6/include/toy/Lexer.h
    M mlir/examples/toy/Ch6/include/toy/Parser.h
    M mlir/examples/toy/Ch6/mlir/MLIRGen.cpp
    M mlir/examples/toy/Ch6/parser/AST.cpp
    M mlir/examples/toy/Ch6/toyc.cpp

  Log Message:
  -----------
  NFC: Uniformize parser naming scheme in Toy tutorial to camelCase and tidy a bit of the implementation.
PiperOrigin-RevId: 278982817


  Commit: 2fddfcfb14f87775fe75e43a6caa7dc39281c4ad
      https://github.com/llvm/llvm-project/commit/2fddfcfb14f87775fe75e43a6caa7dc39281c4ad
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-11-06 (Wed, 06 Nov 2019)

  Changed paths:
    M mlir/examples/toy/Ch2/include/toy/Ops.td
    M mlir/examples/toy/Ch2/mlir/Dialect.cpp
    M mlir/examples/toy/Ch3/include/toy/Ops.td
    M mlir/examples/toy/Ch3/mlir/Dialect.cpp
    M mlir/examples/toy/Ch4/include/toy/Ops.td
    M mlir/examples/toy/Ch4/mlir/Dialect.cpp
    M mlir/examples/toy/Ch5/include/toy/Ops.td
    M mlir/examples/toy/Ch5/mlir/Dialect.cpp
    M mlir/examples/toy/Ch6/include/toy/Ops.td
    M mlir/examples/toy/Ch6/mlir/Dialect.cpp
    M mlir/g3doc/Tutorials/Toy/Ch-2.md

  Log Message:
  -----------
  NFC: Tidy up the implementation of operations in the Toy tutorial

Use header blocks to separate operation implementations, and switch the build methods to be out-of-line when possible.

PiperOrigin-RevId: 278982913


  Commit: eee9cbdeb738f869bd92ae33616c69a63525f9b6
      https://github.com/llvm/llvm-project/commit/eee9cbdeb738f869bd92ae33616c69a63525f9b6
  Author: Alexander Belyaev <pifon at google.com>
  Date:   2019-11-06 (Wed, 06 Nov 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/Linalg/IR/LinalgLibraryOps.td
    M mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
    M mlir/lib/Dialect/Linalg/Transforms/LowerToLoops.cpp
    M mlir/test/Dialect/Linalg/invalid.mlir
    M mlir/test/Dialect/Linalg/roundtrip.mlir

  Log Message:
  -----------
  Add IndexedGenericOp to Linalg.

PiperOrigin-RevId: 279013404


  Commit: 72040bf7c8f24d8fb66d77bdae289a3040943555
      https://github.com/llvm/llvm-project/commit/72040bf7c8f24d8fb66d77bdae289a3040943555
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2019-11-07 (Thu, 07 Nov 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/Linalg/IR/LinalgOps.td
    M mlir/include/mlir/Dialect/Linalg/Passes.h
    M mlir/include/mlir/Dialect/Linalg/Utils/Intrinsics.h
    M mlir/include/mlir/Dialect/Linalg/Utils/Utils.h
    M mlir/include/mlir/EDSC/Intrinsics.h
    M mlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp
    M mlir/lib/Dialect/Linalg/Analysis/DependenceAnalysis.cpp
    M mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
    M mlir/lib/Dialect/Linalg/Transforms/LowerToLLVMDialect.cpp
    M mlir/lib/Dialect/Linalg/Transforms/Promotion.cpp
    M mlir/lib/Dialect/StandardOps/Ops.cpp
    M mlir/test/Dialect/Linalg/invalid.mlir
    M mlir/test/Dialect/Linalg/llvm.mlir
    M mlir/test/Dialect/Linalg/loops.mlir
    M mlir/test/Dialect/Linalg/promote.mlir
    M mlir/test/Dialect/Linalg/roundtrip.mlir
    M mlir/test/mlir-cpu-runner/linalg_integration_test.mlir

  Log Message:
  -----------
  Update Linalg to use std.view

Now that a view op has graduated to the std dialect, we can update Linalg to use it and remove ops that have become obsolete. As a byproduct, the linalg buffer and associated ops can also disappear.

PiperOrigin-RevId: 279073591


  Commit: 7af61f6bcd4f3255df83b3d3d5d9bb3b2424cf5e
      https://github.com/llvm/llvm-project/commit/7af61f6bcd4f3255df83b3d3d5d9bb3b2424cf5e
  Author: Jacques Pienaar <jpienaar at google.com>
  Date:   2019-11-07 (Thu, 07 Nov 2019)

  Changed paths:
    M mlir/include/mlir/Analysis/InferTypeOpInterface.h
    M mlir/include/mlir/Analysis/InferTypeOpInterface.td
    M mlir/test/lib/TestDialect/TestDialect.cpp
    M mlir/test/lib/TestDialect/TestOps.td
    M mlir/test/lib/TestDialect/TestPatterns.cpp
    M mlir/test/mlir-tblgen/return-types.mlir

  Log Message:
  -----------
  Add compatible query method to infer type interface

A return type that differs from the inferred return type need not indicate that an operation is invalid (e.g., tensor<*xf32> vs tensor<10xf32>) but they should be compatible for the operation to be considered valid. Add method to query if inferred type is compatible with return type.

Also add InferTypeOpIntefaceDefault trait that considers equality and compatibility as the same. Currently an op has to opt in to using it explicitly.

PiperOrigin-RevId: 279085639


  Commit: a10d836c6de913445105274a0d92b0265da3bd2f
      https://github.com/llvm/llvm-project/commit/a10d836c6de913445105274a0d92b0265da3bd2f
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2019-11-07 (Thu, 07 Nov 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/Linalg/Utils/Utils.h

  Log Message:
  -----------
  Fix parameter name and document option in linalg::promoteSubViews

PiperOrigin-RevId: 279086352


  Commit: 5fbdb67b0aa7f01b17dcca62e08e3db38d021fce
      https://github.com/llvm/llvm-project/commit/5fbdb67b0aa7f01b17dcca62e08e3db38d021fce
  Author: Andy Davis <andydavis at google.com>
  Date:   2019-11-07 (Thu, 07 Nov 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/StandardOps/Ops.td
    M mlir/lib/Dialect/StandardOps/Ops.cpp
    M mlir/test/Transforms/canonicalize.mlir

  Log Message:
  -----------
  Add canonicalizer for ViewOp which folds constants into the ViewOp memref shape and layout map strides and offset.

PiperOrigin-RevId: 279088023


  Commit: 6b4e30b7c80782a2e1616c739b8a598ed72b725d
      https://github.com/llvm/llvm-project/commit/6b4e30b7c80782a2e1616c739b8a598ed72b725d
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-11-07 (Thu, 07 Nov 2019)

  Changed paths:
    M mlir/examples/toy/CMakeLists.txt
    A mlir/examples/toy/Ch7/CMakeLists.txt
    A mlir/examples/toy/Ch7/include/CMakeLists.txt
    A mlir/examples/toy/Ch7/include/toy/AST.h
    A mlir/examples/toy/Ch7/include/toy/CMakeLists.txt
    A mlir/examples/toy/Ch7/include/toy/Dialect.h
    A mlir/examples/toy/Ch7/include/toy/Lexer.h
    A mlir/examples/toy/Ch7/include/toy/MLIRGen.h
    A mlir/examples/toy/Ch7/include/toy/Ops.td
    A mlir/examples/toy/Ch7/include/toy/Parser.h
    A mlir/examples/toy/Ch7/include/toy/Passes.h
    A mlir/examples/toy/Ch7/include/toy/ShapeInferenceInterface.h
    A mlir/examples/toy/Ch7/include/toy/ShapeInferenceInterface.td
    A mlir/examples/toy/Ch7/mlir/DeadFunctionEliminationPass.cpp
    A mlir/examples/toy/Ch7/mlir/Dialect.cpp
    A mlir/examples/toy/Ch7/mlir/LowerToAffineLoops.cpp
    A mlir/examples/toy/Ch7/mlir/LowerToLLVM.cpp
    A mlir/examples/toy/Ch7/mlir/MLIRGen.cpp
    A mlir/examples/toy/Ch7/mlir/ShapeInferencePass.cpp
    A mlir/examples/toy/Ch7/mlir/ToyCombine.cpp
    A mlir/examples/toy/Ch7/mlir/ToyCombine.td
    A mlir/examples/toy/Ch7/parser/AST.cpp
    A mlir/examples/toy/Ch7/toyc.cpp
    M mlir/g3doc/Tutorials/Toy/Ch-1.md
    A mlir/g3doc/Tutorials/Toy/Ch-7.md
    M mlir/test/CMakeLists.txt
    A mlir/test/Examples/Toy/Ch7/affine-lowering.mlir
    A mlir/test/Examples/Toy/Ch7/ast.toy
    A mlir/test/Examples/Toy/Ch7/codegen.toy
    A mlir/test/Examples/Toy/Ch7/invalid.mlir
    A mlir/test/Examples/Toy/Ch7/llvm-lowering.mlir
    A mlir/test/Examples/Toy/Ch7/scalar.toy
    A mlir/test/Examples/Toy/Ch7/shape_inference.mlir
    A mlir/test/Examples/Toy/Ch7/struct-ast.toy
    A mlir/test/Examples/Toy/Ch7/struct-codegen.toy
    A mlir/test/Examples/Toy/Ch7/struct-opt.mlir

  Log Message:
  -----------
  Add Ch-7 of the toy tutorial detailing how to define new types.

This chapter adds a new composite type to Toy, and shows the process of adding a new type to the IR, adding and updating operations to use it, and constant folding operations producing it.

PiperOrigin-RevId: 279107885


  Commit: 8f00b4494d0434eedd8c80917d17d33d395ea65d
      https://github.com/llvm/llvm-project/commit/8f00b4494d0434eedd8c80917d17d33d395ea65d
  Author: Andy Davis <andydavis at google.com>
  Date:   2019-11-07 (Thu, 07 Nov 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/StandardOps/Ops.td
    M mlir/lib/Dialect/StandardOps/Ops.cpp
    M mlir/test/Dialect/Linalg/promote.mlir
    M mlir/test/IR/core-ops.mlir
    M mlir/test/IR/invalid-ops.mlir
    M mlir/test/Transforms/canonicalize.mlir

  Log Message:
  -----------
  Swap operand order in std.view operation so that offset appears before dynamic sizes in the operand list.

PiperOrigin-RevId: 279114236


  Commit: eb47d5ee66e2e3dc4d9f2fc7768c41f6b037f3db
      https://github.com/llvm/llvm-project/commit/eb47d5ee66e2e3dc4d9f2fc7768c41f6b037f3db
  Author: Uday Bondhugula <udayb at iisc.ac.in>
  Date:   2019-11-07 (Thu, 07 Nov 2019)

  Changed paths:
    M mlir/lib/IR/AsmPrinter.cpp
    M mlir/test/IR/affine-map.mlir

  Log Message:
  -----------
  Fix asm printer for affine expr

- fixes tensorflow/mlir#201

Signed-off-by: Uday Bondhugula <uday at polymagelabs.com>

Closes tensorflow/mlir#204

COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/204 from bondhugula:printfix 3f8a5b65391f45598258b2735fecaa409fbde848
PiperOrigin-RevId: 279115720


  Commit: 09e8e7107aafcdc61632ed0aabfa63255859e87a
      https://github.com/llvm/llvm-project/commit/09e8e7107aafcdc61632ed0aabfa63255859e87a
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2019-11-07 (Thu, 07 Nov 2019)

  Changed paths:
    M mlir/include/mlir/Translation.h
    M mlir/lib/Dialect/SPIRV/Serialization/TranslateRegistration.cpp
    M mlir/lib/Support/TranslateClParser.cpp
    M mlir/lib/Target/LLVMIR/ConvertFromLLVMIR.cpp
    M mlir/lib/Translation/Translation.cpp
    A mlir/test/Target/llvmir-invalid.mlir
    M mlir/tools/mlir-translate/mlir-translate.cpp

  Log Message:
  -----------
  mlir-translate: support -verify-diagnostics

MLIR translation tools can emit diagnostics and we want to be able to check if
it is indeed the case in tests. Reuse the source manager error handlers
provided for mlir-opt to support the verification in mlir-translate. This
requires us to change the signature of the functions that are registered to
translate sources to MLIR: it now takes a source manager instead of a memory
buffer.

PiperOrigin-RevId: 279132972


  Commit: 24f306a22b630349e4f94693822a134c15ac1612
      https://github.com/llvm/llvm-project/commit/24f306a22b630349e4f94693822a134c15ac1612
  Author: Alexander Belyaev <pifon at google.com>
  Date:   2019-11-07 (Thu, 07 Nov 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/Linalg/IR/LinalgLibraryOps.td

  Log Message:
  -----------
  Move description from GenericOpBase to linalg.(indexed_)generic.

PiperOrigin-RevId: 279173284


  Commit: 4697d657b7927360e166efb12ff4e3bd6cc7b5db
      https://github.com/llvm/llvm-project/commit/4697d657b7927360e166efb12ff4e3bd6cc7b5db
  Author: Denis Khalikov <khalikov.denis at huawei.com>
  Date:   2019-11-08 (Fri, 08 Nov 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/SPIRV/SPIRVBase.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVBitOps.td
    M mlir/lib/Dialect/SPIRV/SPIRVOps.cpp
    A mlir/test/Dialect/SPIRV/Serialization/bit-ops.td
    M mlir/test/Dialect/SPIRV/ops.mlir

  Log Message:
  -----------
  [spirv] Add bit ops

This CL added op definitions for a few bit operations:

* OpShiftLeftLogical
* OpShiftRightArithmetic
* OpShiftRightLogical
* OpBitCount
* OpBitReverse
* OpNot

Also moved the definition of spv.BitwiseAnd to follow the
lexicographical order.

Closes tensorflow/mlir#215

COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/215 from denis0x0D:sandbox/bit_ops d9b0852b689ac6c4879a9740b1740a2357f44d24
PiperOrigin-RevId: 279350470


  Commit: bcfb3d4cd6de3b535d7915972ac2af0b74378ff9
      https://github.com/llvm/llvm-project/commit/bcfb3d4cd6de3b535d7915972ac2af0b74378ff9
  Author: Jacques Pienaar <jpienaar at google.com>
  Date:   2019-11-08 (Fri, 08 Nov 2019)

  Changed paths:
    M mlir/lib/Transforms/DialectConversion.cpp

  Log Message:
  -----------
  Explicitly initialize isRecursivelyLegal

This also previously triggered the warning:

warning: missing field 'isRecursivelyLegal' initializer [-Wmissing-field-initializers]
  legalOperations[op] = {action};
                               ^
PiperOrigin-RevId: 279399175


  Commit: 9fbf52e330faa9f310855d7e4a02d48c3a1ccd41
      https://github.com/llvm/llvm-project/commit/9fbf52e330faa9f310855d7e4a02d48c3a1ccd41
  Author: MLIR Team <no-reply at google.com>
  Date:   2019-11-08 (Fri, 08 Nov 2019)

  Changed paths:
    M mlir/include/mlir/IR/Module.h
    M mlir/lib/Dialect/GPU/Transforms/KernelOutlining.cpp
    M mlir/test/Dialect/GPU/outlining.mlir

  Log Message:
  -----------
  Look for SymbolRefAttr in KernelOutlining instead of hard-coding CallOp

This code should be exercised using the existing kernel outlining unit test, but
let me know if I should add a dedicated unit test using a fake call instruction
as well.

PiperOrigin-RevId: 279436321


  Commit: 1328f93e9180c32a46c89bf5114e137db75c90ef
      https://github.com/llvm/llvm-project/commit/1328f93e9180c32a46c89bf5114e137db75c90ef
  Author: Manuel Freiberger <manuel.freiberger at gmail.com>
  Date:   2019-11-09 (Sat, 09 Nov 2019)

  Changed paths:
    M mlir/g3doc/Tutorials/Toy/Ch-2.md

  Log Message:
  -----------
  Add a short TableGen HowTo to tutorial chapter 2.

Add a note to chapter 2 of the Toy tutorial stating how to invoke
mlir-tblgen to check the generated C++ code. IMHO this is incredibly
useful when getting acquainted with TableGen/ODS.

Closes tensorflow/mlir#228

COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/228 from ombre5733:toy-ch2-howto-mlir-tblgen a051a3734ca8bbf4f12027fe737aca07c64ca59d
PiperOrigin-RevId: 279518989


  Commit: 85612fe6d195529db35913680bed8e8dbb6b9d9e
      https://github.com/llvm/llvm-project/commit/85612fe6d195529db35913680bed8e8dbb6b9d9e
  Author: Mehdi Amini <aminim at google.com>
  Date:   2019-11-09 (Sat, 09 Nov 2019)

  Changed paths:
    M mlir/examples/toy/Ch2/toyc.cpp
    M mlir/examples/toy/Ch3/toyc.cpp
    M mlir/examples/toy/Ch4/toyc.cpp
    M mlir/examples/toy/Ch5/toyc.cpp
    M mlir/examples/toy/Ch6/toyc.cpp
    M mlir/examples/toy/Ch7/toyc.cpp

  Log Message:
  -----------
  Fix segfault (nullptr dereference) when passing a non-existent file to the Toy tutorial compiler

Fix tensorflow/mlir#229

PiperOrigin-RevId: 279557863


  Commit: e04d4bf865b01ec35ecfb98b34372a1dacd70266
      https://github.com/llvm/llvm-project/commit/e04d4bf865b01ec35ecfb98b34372a1dacd70266
  Author: Stephan Herhut <herhut at google.com>
  Date:   2019-11-11 (Mon, 11 Nov 2019)

  Changed paths:
    M mlir/include/mlir/IR/Matchers.h
    M mlir/test/Transforms/canonicalize.mlir

  Log Message:
  -----------
  Also consider index constants when folding integer arithmetics with constants.

PiperOrigin-RevId: 279698088


  Commit: 5cf6e0ce7f03f9841675b1a9d44232540f3df5cc
      https://github.com/llvm/llvm-project/commit/5cf6e0ce7f03f9841675b1a9d44232540f3df5cc
  Author: Andy Davis <andydavis at google.com>
  Date:   2019-11-11 (Mon, 11 Nov 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/StandardOps/Ops.td
    M mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
    M mlir/lib/Dialect/Linalg/Transforms/Fusion.cpp
    M mlir/lib/Dialect/Linalg/Transforms/LowerToLLVMDialect.cpp
    M mlir/lib/Dialect/Linalg/Transforms/Promotion.cpp
    M mlir/lib/Dialect/Linalg/Transforms/Tiling.cpp
    M mlir/lib/Dialect/Linalg/Utils/Utils.cpp
    M mlir/lib/Dialect/StandardOps/Ops.cpp
    M mlir/test/IR/core-ops.mlir
    M mlir/test/IR/invalid-ops.mlir

  Log Message:
  -----------
  Adds std.subview operation which takes dynamic offsets, sizes and strides and returns a memref type which represents sub/reduced-size view of its memref argument.
This operation is a companion operation to the std.view operation added as proposed in "Updates to the MLIR MemRefType" RFC.

PiperOrigin-RevId: 279766410


  Commit: 9b9c647cefea0a81fdf7d2bf6586a13f99d9a2cf
      https://github.com/llvm/llvm-project/commit/9b9c647cefea0a81fdf7d2bf6586a13f99d9a2cf
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-11-11 (Mon, 11 Nov 2019)

  Changed paths:
    M mlir/examples/toy/Ch2/include/toy/Ops.td
    M mlir/examples/toy/Ch3/include/toy/Ops.td
    M mlir/examples/toy/Ch4/include/toy/Ops.td
    M mlir/examples/toy/Ch5/include/toy/Ops.td
    M mlir/examples/toy/Ch6/include/toy/Ops.td
    M mlir/examples/toy/Ch6/mlir/LowerToLLVM.cpp
    M mlir/examples/toy/Ch7/include/toy/Ops.td
    M mlir/examples/toy/Ch7/mlir/LowerToLLVM.cpp
    M mlir/g3doc/LangRef.md
    M mlir/g3doc/Tutorials/Toy/Ch-6.md
    M mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
    M mlir/include/mlir/Dialect/Linalg/IR/LinalgLibraryOps.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVControlFlowOps.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVOps.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVStructureOps.td
    M mlir/include/mlir/Dialect/StandardOps/Ops.td
    M mlir/include/mlir/IR/Attributes.h
    M mlir/include/mlir/IR/Builders.h
    M mlir/include/mlir/IR/Function.h
    M mlir/include/mlir/IR/OpBase.td
    M mlir/lib/Analysis/CallGraph.cpp
    M mlir/lib/Dialect/GPU/IR/GPUDialect.cpp
    M mlir/lib/Dialect/GPU/Transforms/KernelOutlining.cpp
    M mlir/lib/Dialect/Linalg/Transforms/LowerToLLVMDialect.cpp
    M mlir/lib/Dialect/SPIRV/SPIRVOps.cpp
    M mlir/lib/Dialect/SPIRV/Serialization/Deserializer.cpp
    M mlir/lib/Dialect/SPIRV/Serialization/Serializer.cpp
    M mlir/lib/Dialect/StandardOps/Ops.cpp
    M mlir/lib/IR/AsmPrinter.cpp
    M mlir/lib/IR/AttributeDetail.h
    M mlir/lib/IR/Attributes.cpp
    M mlir/lib/IR/Builders.cpp
    M mlir/lib/IR/FunctionSupport.cpp
    M mlir/lib/Parser/Parser.cpp
    M mlir/lib/Target/LLVMIR/ModuleTranslation.cpp
    M mlir/test/IR/parser.mlir
    M mlir/test/lib/TestDialect/TestOps.td
    M mlir/test/mlir-tblgen/op-attribute.td

  Log Message:
  -----------
  Add support for nested symbol references.

This change allows for adding additional nested references to a SymbolRefAttr to allow for further resolving a symbol if that symbol also defines a SymbolTable. If a referenced symbol also defines a symbol table, a nested reference can be used to refer to a symbol within that table. Nested references are printed after the main reference in the following form:

  symbol-ref-attribute ::= symbol-ref-id (`::` symbol-ref-id)*

Example:

  module @reference {
    func @nested_reference()
  }

  my_reference_op @reference::@nested_reference

Given that SymbolRefAttr is now more general, the existing functionality centered around a single reference is moved to a derived class FlatSymbolRefAttr. Followup commits will add support to lookups, rauw, etc. for scoped references.

PiperOrigin-RevId: 279860501


  Commit: 6582489219ab695a025457302a9e6924b1259176
      https://github.com/llvm/llvm-project/commit/6582489219ab695a025457302a9e6924b1259176
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-11-11 (Mon, 11 Nov 2019)

  Changed paths:
    M mlir/lib/Parser/Lexer.cpp
    M mlir/lib/Parser/Lexer.h

  Log Message:
  -----------
  Restructure comment lexing to not recurse.

In some files that have large amounts of comments, this can lead to a stack overflow.

PiperOrigin-RevId: 279867330


  Commit: f51a15533729cddc9907320b5ab963f7fc037aa0
      https://github.com/llvm/llvm-project/commit/f51a15533729cddc9907320b5ab963f7fc037aa0
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2019-11-12 (Tue, 12 Nov 2019)

  Changed paths:
    M mlir/g3doc/ConversionToLLVMDialect.md
    M mlir/include/mlir/Conversion/StandardToLLVM/ConvertStandardToLLVM.h
    M mlir/include/mlir/Dialect/StandardOps/Ops.td
    M mlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp
    M mlir/lib/Conversion/VectorToLLVM/VectorToLLVM.cpp
    M mlir/lib/Dialect/Linalg/Transforms/LowerToLLVMDialect.cpp
    M mlir/lib/Dialect/StandardOps/Ops.cpp
    M mlir/test/Conversion/StandardToLLVM/convert-argattrs.mlir
    M mlir/test/Conversion/StandardToLLVM/convert-memref-ops.mlir
    M mlir/test/Conversion/StandardToLLVM/convert-to-llvmir.mlir
    M mlir/test/Conversion/StandardToLLVM/standard-to-llvm.mlir
    M mlir/test/Conversion/VectorToLLVM/vector-to-llvm.mlir
    M mlir/test/Dialect/Linalg/llvm.mlir
    M mlir/test/mlir-cpu-runner/include/mlir_runner_utils.h
    M mlir/tools/mlir-cuda-runner/cuda-runtime-wrappers.cpp

  Log Message:
  -----------
  Add support for alignment attribute in std.alloc.

This CL adds an extra pointer to the memref descriptor to allow specifying alignment.

In a previous implementation, we used 2 types: `linalg.buffer` and `view` where the buffer type was the unit of allocation/deallocation/alignment and `view` was the unit of indexing.

After multiple discussions it was decided to use a single type, which conflates both, so the memref descriptor now needs to carry both pointers.

This is consistent with the [RFC-Proposed Changes to MemRef and Tensor MLIR Types](https://groups.google.com/a/tensorflow.org/forum/#!searchin/mlir/std.view%7Csort:date/mlir/-wKHANzDNTg/4K6nUAp8AAAJ).

PiperOrigin-RevId: 279959463


  Commit: 82d2c43ecaec2cea105fab3b56de10599509c5e6
      https://github.com/llvm/llvm-project/commit/82d2c43ecaec2cea105fab3b56de10599509c5e6
  Author: Andy Davis <andydavis at google.com>
  Date:   2019-11-12 (Tue, 12 Nov 2019)

  Changed paths:
    M mlir/g3doc/Dialects/Affine.md
    M mlir/include/mlir/Dialect/AffineOps/AffineOps.td
    M mlir/lib/Dialect/AffineOps/AffineOps.cpp
    M mlir/test/AffineOps/canonicalize.mlir
    M mlir/test/AffineOps/invalid.mlir
    M mlir/test/AffineOps/ops.mlir

  Log Message:
  -----------
  Adds affine.min operation which returns the minimum value from a multi-result affine map. This operation is useful for things like computing the dynamic value of affine loop bounds, and is trivial to constant fold.

PiperOrigin-RevId: 279959714


  Commit: 51de3f688ea99d55dd1ed69706d2e055f231e4fb
      https://github.com/llvm/llvm-project/commit/51de3f688ea99d55dd1ed69706d2e055f231e4fb
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2019-11-12 (Tue, 12 Nov 2019)

  Changed paths:
    M mlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp
    M mlir/test/Conversion/StandardToLLVM/convert-to-llvmir.mlir

  Log Message:
  -----------
  Add LLVM lowering of std.subview

A followup CL will replace usage of linalg.subview by std.subview.

PiperOrigin-RevId: 279961981


  Commit: 0e2affdf5946ef457809fb7afcb16547388c58b9
      https://github.com/llvm/llvm-project/commit/0e2affdf5946ef457809fb7afcb16547388c58b9
  Author: Lei Zhang <antiagainst at google.com>
  Date:   2019-11-12 (Tue, 12 Nov 2019)

  Changed paths:
    M mlir/include/mlir/IR/OpBase.td

  Log Message:
  -----------
  Update outdated comment for NativeCodeCall

PiperOrigin-RevId: 279986050


  Commit: a6fac0aa29a9bb9ca1b903599767e1b75aa951ad
      https://github.com/llvm/llvm-project/commit/a6fac0aa29a9bb9ca1b903599767e1b75aa951ad
  Author: Jacques Pienaar <jpienaar at google.com>
  Date:   2019-11-12 (Tue, 12 Nov 2019)

  Changed paths:
    M mlir/utils/textmate/mlir.json

  Log Message:
  -----------
  Update textmate syntax file

Allow comments in more places and fix function params.

PiperOrigin-RevId: 279986797


  Commit: c4a0883a9253336533dcaedc4b0f6201b6448666
      https://github.com/llvm/llvm-project/commit/c4a0883a9253336533dcaedc4b0f6201b6448666
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-11-12 (Tue, 12 Nov 2019)

  Changed paths:
    M mlir/g3doc/WritingAPass.md
    M mlir/include/mlir/IR/OperationSupport.h
    M mlir/lib/IR/AsmPrinter.cpp
    M mlir/lib/IR/Diagnostics.cpp
    M mlir/lib/Pass/IRPrinting.cpp

  Log Message:
  -----------
  Add a printer flag to use local scope when printing IR.

This causes the AsmPrinter to use a local value numbering when printing the IR, allowing for the printer to be used safely in a local context, e.g. to ensure thread-safety when printing the IR. This means that the IR printing instrumentation can also be used during multi-threading when module-scope is disabled. Operation::dump and DiagnosticArgument(Operation*) are also updated to always print local scope, as this is the most common use case when debugging.

PiperOrigin-RevId: 279988203


  Commit: f4aca03232467174eaf734c3a201178970bdcef2
      https://github.com/llvm/llvm-project/commit/f4aca03232467174eaf734c3a201178970bdcef2
  Author: Lei Zhang <antiagainst at google.com>
  Date:   2019-11-12 (Tue, 12 Nov 2019)

  Changed paths:
    M mlir/tools/mlir-tblgen/SPIRVUtilsGen.cpp

  Log Message:
  -----------
  [spirv] Properly return when finding error in serialization

PiperOrigin-RevId: 280001339


  Commit: 104af84f4c8788da2d2202cac720fd7aa62b01cd
      https://github.com/llvm/llvm-project/commit/104af84f4c8788da2d2202cac720fd7aa62b01cd
  Author: Mahesh Ravishankar <ravishankarm at google.com>
  Date:   2019-11-12 (Tue, 12 Nov 2019)

  Changed paths:
    M mlir/lib/Conversion/GPUToSPIRV/GPUToSPIRV.cpp
    A mlir/test/Conversion/GPUToSPIRV/loop.mlir

  Log Message:
  -----------
  Add Conversion to lower loop::ForOp to spirv::LoopOp.

loop::ForOp can be lowered to the structured control flow represented
by spirv::LoopOp by making the continue block of the spirv::LoopOp the
loop latch and the merge block the exit block. The resulting
spirv::LoopOp has a single back edge from the continue to header
block, and a single exit from header to merge.
PiperOrigin-RevId: 280015614


  Commit: aa9dc9446e21b0de1389d460a41867ade7bc4683
      https://github.com/llvm/llvm-project/commit/aa9dc9446e21b0de1389d460a41867ade7bc4683
  Author: Lei Zhang <antiagainst at google.com>
  Date:   2019-11-12 (Tue, 12 Nov 2019)

  Changed paths:
    M mlir/include/mlir/TableGen/Attribute.h
    M mlir/lib/TableGen/Attribute.cpp

  Log Message:
  -----------
  Expose an isSubclassOf() method on AttrConstraint

PiperOrigin-RevId: 280021408


  Commit: 626e1fd95e626c47154c5fe5d546f3d36b39e319
      https://github.com/llvm/llvm-project/commit/626e1fd95e626c47154c5fe5d546f3d36b39e319
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-11-12 (Tue, 12 Nov 2019)

  Changed paths:
    M mlir/lib/IR/Operation.cpp
    A mlir/test/IR/print-op-on-diagnostic.mlir
    M mlir/test/lib/TestDialect/TestDialect.cpp
    M mlir/test/lib/TestDialect/TestDialect.h

  Log Message:
  -----------
  Add an option to print an operation if a diagnostic is emitted on it

It is often helpful to inspect the operation that the error/warning/remark/etc. originated from, especially in the context of debugging or in the case of a verifier failure. This change adds an option 'mlir-print-op-on-diagnostic' that attaches the operation as a note to any diagnostic that is emitted on it via Operation::emit(Error|Warning|Remark). In the case of an error, the operation is printed in the generic form.

PiperOrigin-RevId: 280021438


  Commit: b259c26eb0717b6962c2f75ac23a44491b27810d
      https://github.com/llvm/llvm-project/commit/b259c26eb0717b6962c2f75ac23a44491b27810d
  Author: Lei Zhang <antiagainst at google.com>
  Date:   2019-11-12 (Tue, 12 Nov 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/SPIRV/SPIRVControlFlowOps.td
    M mlir/lib/Dialect/SPIRV/SPIRVOps.cpp
    M mlir/lib/Dialect/SPIRV/Serialization/Deserializer.cpp
    M mlir/lib/Dialect/SPIRV/Serialization/Serializer.cpp
    M mlir/test/Dialect/SPIRV/Serialization/loop.mlir

  Log Message:
  -----------
  Add support for OpPhi in loop header block

During deserialization, the loop header block will be moved into the
spv.loop's region. If the loop header block has block arguments,
we need to make sure it is correctly carried over to the block where
the new spv.loop resides.

During serialization, we need to make sure block arguments from the
spv.loop's entry block are not silently dropped.

PiperOrigin-RevId: 280021777


  Commit: 9d985141ef848f352c444cb950096c1e7ccadad9
      https://github.com/llvm/llvm-project/commit/9d985141ef848f352c444cb950096c1e7ccadad9
  Author: Mahesh Ravishankar <ravishankarm at google.com>
  Date:   2019-11-12 (Tue, 12 Nov 2019)

  Changed paths:
    M mlir/lib/Conversion/GPUToSPIRV/GPUToSPIRV.cpp

  Log Message:
  -----------
  Make legality check in GPU->SPIR-V lowering of FuncOp kernel specific.

Existing check that sets FuncOp to be dynamically legal was just
checking that the types of the argument are SPIR-V compatible. Since
the current conversion from GPU to SPIR-V does not handle lowering
non-kernel functions, change the legality check to verify that the
FuncOp has the gpu.kernel attribute and has void(void) return type.

PiperOrigin-RevId: 280032782


  Commit: 8082e3a687da76929e469ec76f86957c534f59db
      https://github.com/llvm/llvm-project/commit/8082e3a687da76929e469ec76f86957c534f59db
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-11-12 (Tue, 12 Nov 2019)

  Changed paths:
    M mlir/lib/IR/Attributes.cpp

  Log Message:
  -----------
  NFC: Change DictionaryAttr::get(StringRef) to use binary search instead of a linear scan.

The elements of a DictionaryAttr are guaranteed to be sorted by name, so we can use a more efficient lookup when searching for an attribute.

PiperOrigin-RevId: 280035488


  Commit: 2be53603e9296e86ae6ef529c37053e198560f60
      https://github.com/llvm/llvm-project/commit/2be53603e9296e86ae6ef529c37053e198560f60
  Author: Mahesh Ravishankar <ravishankarm at google.com>
  Date:   2019-11-12 (Tue, 12 Nov 2019)

  Changed paths:
    M mlir/lib/Conversion/StandardToSPIRV/ConvertStandardToSPIRV.cpp
    M mlir/test/Conversion/StandardToSPIRV/op_conversion.mlir

  Log Message:
  -----------
  Add operations needed to support lowering of AffineExpr to SPIR-V.

Lowering of CmpIOp, DivISOp, RemISOp, SubIOp and SelectOp to SPIR-V
dialect enables the lowering of operations generated by AffineExpr ->
StandardOps conversion into the SPIR-V dialect.

PiperOrigin-RevId: 280039204


  Commit: 85d7fb3324a6442e865c87ea766992ab096f8859
      https://github.com/llvm/llvm-project/commit/85d7fb3324a6442e865c87ea766992ab096f8859
  Author: Hanhan Wang <hanchung at google.com>
  Date:   2019-11-12 (Tue, 12 Nov 2019)

  Changed paths:
    M mlir/lib/Dialect/SPIRV/Serialization/Serializer.cpp
    M mlir/test/Dialect/SPIRV/Serialization/constant.mlir
    M mlir/tools/mlir-tblgen/SPIRVUtilsGen.cpp

  Log Message:
  -----------
  Make VariableOp instructions be in the first block in the function.

Since VariableOp is serialized during processBlock, we add two more fields,
`functionHeader` and `functionBody`, to collect instructions for a function.
After all the blocks have been processed, we append them to the `functions`.

Also, fix a bug in processGlobalVariableOp. The global variables should be
encoded into `typesGlobalValues`.

PiperOrigin-RevId: 280105366


  Commit: 6df83699418c6a6d6105728cdec59c78212aa841
      https://github.com/llvm/llvm-project/commit/6df83699418c6a6d6105728cdec59c78212aa841
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-11-13 (Wed, 13 Nov 2019)

  Changed paths:
    M mlir/include/mlir/IR/OpImplementation.h
    M mlir/lib/IR/FunctionSupport.cpp
    M mlir/lib/IR/Module.cpp
    M mlir/lib/Parser/Parser.cpp
    M mlir/test/IR/invalid-func-op.mlir

  Log Message:
  -----------
  Rename the current parseSymbolName to parseOptionalSymbolName

The current implementation silently fails if the '@' identifier isn't present, making it similar to the 'optional' parse methods. This change renames the current implementation to 'Optional' and adds a new 'parseSymbolName' that emits an error.

PiperOrigin-RevId: 280214610


  Commit: f45852be6c152efc377419e3c8bead5d80544223
      https://github.com/llvm/llvm-project/commit/f45852be6c152efc377419e3c8bead5d80544223
  Author: Lucy Fox <lucyfox at google.com>
  Date:   2019-11-13 (Wed, 13 Nov 2019)

  Changed paths:
    A mlir/g3doc/Glossary.md
    M mlir/g3doc/LangRef.md

  Log Message:
  -----------
  Create and begin writing glossary.

This creates a central place in the documentation where MLIR-specific terminology is defined. See discussion on the MLIR forum (https://groups.google.com/a/tensorflow.org/g/mlir/c/5YXDSdu76Hk).

PiperOrigin-RevId: 280220365


  Commit: d985c7488393a181f30b0faeb3083ec0c27983eb
      https://github.com/llvm/llvm-project/commit/d985c7488393a181f30b0faeb3083ec0c27983eb
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-11-13 (Wed, 13 Nov 2019)

  Changed paths:
    M mlir/include/mlir/Transforms/DialectConversion.h
    M mlir/lib/Conversion/GPUToSPIRV/GPUToSPIRV.cpp
    M mlir/lib/Transforms/DialectConversion.cpp
    M mlir/test/Transforms/test-legalizer-full.mlir
    M mlir/test/Transforms/test-legalizer.mlir
    M mlir/test/lib/TestDialect/TestPatterns.cpp

  Log Message:
  -----------
  NFC: Refactor block signature conversion to not erase the original arguments.

This refactors the implementation of block signature(type) conversion to not insert fake cast operations to perform the type conversion, but to instead create a new block containing the proper signature. This has the benefit of enabling the use of pre-computed analyses that rely on mapping values. It also leads to a much cleaner implementation overall. The major user facing change is that applySignatureConversion will now replace the entry block of the region, meaning that blocks generally shouldn't be cached over calls to applySignatureConversion.

PiperOrigin-RevId: 280226936


  Commit: 486f2122cde3a55b64c2f0e594528782ce42c22b
      https://github.com/llvm/llvm-project/commit/486f2122cde3a55b64c2f0e594528782ce42c22b
  Author: Sean Silva <silvasean at google.com>
  Date:   2019-11-13 (Wed, 13 Nov 2019)

  Changed paths:
    M mlir/include/mlir/IR/Function.h
    M mlir/lib/IR/Function.cpp
    A mlir/test/IR/test-func-erase-arg.mlir
    A mlir/test/IR/test-func-set-type.mlir
    M mlir/test/lib/IR/CMakeLists.txt
    A mlir/test/lib/IR/TestFunc.cpp

  Log Message:
  -----------
  Add FuncOp::eraseArgument

This is a quite complex operation that users are likely to attempt to write
themselves and get wrong (citation: users=me).

Ideally, we could pull this into FunctionLike, but for now, the
FunctionType rewriting makes it FuncOp specific. We would need some hook
for rewriting the function type (which for LLVM's func op, would need to
rewrite the underlying LLVM type).

PiperOrigin-RevId: 280234164


  Commit: 40f0c76ee27f4dee3952c8b76678cd10122ebc1b
      https://github.com/llvm/llvm-project/commit/40f0c76ee27f4dee3952c8b76678cd10122ebc1b
  Author: Lucy Fox <lucyfox at google.com>
  Date:   2019-11-13 (Wed, 13 Nov 2019)

  Changed paths:
    M mlir/g3doc/Glossary.md

  Log Message:
  -----------
  Fix glossary formatting.

PiperOrigin-RevId: 280236761


  Commit: 0bd6390b541e8a95ee4d2fc8abcdcaf1d7c580cb
      https://github.com/llvm/llvm-project/commit/0bd6390b541e8a95ee4d2fc8abcdcaf1d7c580cb
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2019-11-13 (Wed, 13 Nov 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/Linalg/IR/LinalgOps.h
    M mlir/include/mlir/Dialect/Linalg/IR/LinalgOps.td
    M mlir/include/mlir/Dialect/Linalg/Utils/Utils.h
    M mlir/include/mlir/Dialect/StandardOps/Ops.h
    M mlir/include/mlir/Dialect/StandardOps/Ops.td
    M mlir/include/mlir/IR/StandardTypes.h
    M mlir/lib/Dialect/Linalg/Analysis/DependenceAnalysis.cpp
    M mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
    M mlir/lib/Dialect/Linalg/Transforms/Fusion.cpp
    M mlir/lib/Dialect/Linalg/Transforms/LowerToLLVMDialect.cpp
    M mlir/lib/Dialect/Linalg/Transforms/Promotion.cpp
    M mlir/lib/Dialect/Linalg/Transforms/Tiling.cpp
    M mlir/lib/Dialect/Linalg/Utils/Utils.cpp
    M mlir/lib/Dialect/StandardOps/Ops.cpp
    M mlir/lib/IR/StandardTypes.cpp
    M mlir/test/Conversion/LoopsToGPU/imperfect_linalg.mlir
    M mlir/test/Dialect/Linalg/fusion-2-level.mlir
    M mlir/test/Dialect/Linalg/fusion.mlir
    M mlir/test/Dialect/Linalg/invalid.mlir
    M mlir/test/Dialect/Linalg/llvm.mlir
    M mlir/test/Dialect/Linalg/promote.mlir
    M mlir/test/Dialect/Linalg/roundtrip.mlir
    M mlir/test/Dialect/Linalg/tile.mlir
    M mlir/test/Dialect/Linalg/tile_conv.mlir

  Log Message:
  -----------
  Deprecate linalg.subview in favor of std.subview

This CL uses the now standard std.subview in linalg.
Two shortcuts are currently taken to allow this port:
1. the type resulting from a view is currently degraded to fully dynamic to pass the SubViewOp verifier.
2. indexing into SubViewOp may access out of bounds since lowering to LLVM does not currently enforce it by construction.

These will be fixed in subsequent commits after discussions.

PiperOrigin-RevId: 280250129


  Commit: 8abda15b3f63b5b84ed8df285aaf6e473c8bad56
      https://github.com/llvm/llvm-project/commit/8abda15b3f63b5b84ed8df285aaf6e473c8bad56
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2019-11-13 (Wed, 13 Nov 2019)

  Changed paths:
    M mlir/lib/Dialect/Linalg/Transforms/Tiling.cpp

  Log Message:
  -----------
  Replace explicit concatenation by llvm::concat

PiperOrigin-RevId: 280258938


  Commit: d1c99e10d05508855b51ec391c8f1c4a7f4aa14b
      https://github.com/llvm/llvm-project/commit/d1c99e10d05508855b51ec391c8f1c4a7f4aa14b
  Author: Jacques Pienaar <jpienaar at google.com>
  Date:   2019-11-13 (Wed, 13 Nov 2019)

  Changed paths:
    M mlir/lib/IR/AsmPrinter.cpp
    A mlir/test/IR/print-op-local-scope.mlir

  Log Message:
  -----------
  Do not emit aliases when printing local form

Expand local scope printing to skip printing aliases as aliases are printed out at the top of a module and may not be part of the output generated by local scope print.

PiperOrigin-RevId: 280278617


  Commit: ee5c2256ef31fefc92ad59f78b0649b145dc0eb0
      https://github.com/llvm/llvm-project/commit/ee5c2256ef31fefc92ad59f78b0649b145dc0eb0
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2019-11-14 (Thu, 14 Nov 2019)

  Changed paths:
    M mlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp

  Log Message:
  -----------
  Concentrate memref descriptor manipulation logic in one place

Memref descriptor is becoming increasingly complex. Memrefs are manipulated by
multiple standard instructions, each of which has a non-trivial lowering to the
LLVM dialect. This leads to verbose code that manipulates the descriptors
exposing the internals of insert/extractelement opreations. Implement a wrapper
class that contains a memref descriptor and provides semantically named methods
that build the primitive IR operations instead.

PiperOrigin-RevId: 280371225


  Commit: a007d4395a36adf3aad0f4b9914dcb8756a37c7d
      https://github.com/llvm/llvm-project/commit/a007d4395a36adf3aad0f4b9914dcb8756a37c7d
  Author: Lei Zhang <antiagainst at google.com>
  Date:   2019-11-14 (Thu, 14 Nov 2019)

  Changed paths:
    M mlir/g3doc/DeclarativeRewrites.md
    M mlir/g3doc/OpDefinitions.md

  Log Message:
  -----------
  [doc] Add debugging tips in ODS and DRR doc regarding mlir-tblgen

PiperOrigin-RevId: 280398956


  Commit: 7c28de4aef6da3ab2f53118ecf717e56c68352e7
      https://github.com/llvm/llvm-project/commit/7c28de4aef6da3ab2f53118ecf717e56c68352e7
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2019-11-14 (Thu, 14 Nov 2019)

  Changed paths:
    M mlir/include/mlir/Conversion/StandardToLLVM/ConvertStandardToLLVM.h
    M mlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp
    M mlir/lib/Dialect/Linalg/Transforms/LowerToLLVMDialect.cpp

  Log Message:
  -----------
  Use MemRefDescriptor in Linalg-to-LLVM conversion

Following up on the consolidation of MemRef descriptor conversion, update
Linalg-to-LLVM conversion to use the helper class that abstracts away the
implementation details of the MemRef descriptor. This required MemRefDescriptor
to become publicly visible. Since this conversion is heavily EDSC-based,
introduce locally an additional wrapper that uses builder and location pointed
to by the EDSC context while emitting descriptor manipulation operations.

PiperOrigin-RevId: 280429228


  Commit: f2b6ae99913d0049c7929160aed5f213b1081abb
      https://github.com/llvm/llvm-project/commit/f2b6ae99913d0049c7929160aed5f213b1081abb
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2019-11-14 (Thu, 14 Nov 2019)

  Changed paths:
    M mlir/g3doc/Dialects/Vector.md
    M mlir/include/mlir/Dialect/VectorOps/VectorOps.h
    M mlir/include/mlir/Dialect/VectorOps/VectorOps.td
    M mlir/lib/Analysis/VectorAnalysis.cpp
    M mlir/lib/Conversion/VectorToLLVM/VectorToLLVM.cpp
    M mlir/lib/Dialect/VectorOps/VectorOps.cpp
    M mlir/lib/Transforms/LowerVectorTransfers.cpp
    M mlir/lib/Transforms/MaterializeVectors.cpp
    M mlir/lib/Transforms/Vectorize.cpp
    M mlir/test/Conversion/VectorToLLVM/vector-to-llvm.mlir
    M mlir/test/Dialect/VectorOps/invalid.mlir
    M mlir/test/Dialect/VectorOps/ops.mlir
    M mlir/test/IR/core-ops.mlir
    M mlir/test/IR/invalid-ops.mlir
    M mlir/test/Transforms/Vectorize/lower_vector_transfers.mlir
    M mlir/test/Transforms/Vectorize/vectorize_1d.mlir
    M mlir/test/Transforms/Vectorize/vectorize_2d.mlir
    M mlir/test/Transforms/Vectorize/vectorize_3d.mlir
    M mlir/test/Transforms/Vectorize/vectorize_outer_loop_2d.mlir
    M mlir/test/Transforms/Vectorize/vectorize_outer_loop_transpose_2d.mlir
    M mlir/test/Transforms/Vectorize/vectorize_transpose_2d.mlir

  Log Message:
  -----------
  Move VectorOps to Tablegen - (almost) NFC

This CL moves VectorOps to Tablegen and cleans up the implementation.

This is almost NFC but 2 changes occur:
  1. an interface change occurs in the padding value specification in vector_transfer_read:
     the value becomes non-optional. As a shortcut we currently use %f0 for all paddings.
     This should become an OpInterface for vectorization in the future.
  2. the return type of vector.type_cast is trivial and simplified to `memref<vector<...>>`

Relevant roundtrip and invalid tests that used to sit in core are moved to the vector dialect.

The op documentation is moved to the .td file.

PiperOrigin-RevId: 280430869


  Commit: 62d5b1de45298d0ea3a1c7135555ca83cfa57353
      https://github.com/llvm/llvm-project/commit/62d5b1de45298d0ea3a1c7135555ca83cfa57353
  Author: MLIR Team <no-reply at google.com>
  Date:   2019-11-14 (Thu, 14 Nov 2019)

  Changed paths:
    M mlir/lib/Conversion/GPUToCUDA/ConvertKernelFuncToCubin.cpp

  Log Message:
  -----------
  Adapt code to LLVM API updates.

PiperOrigin-RevId: 280431812


  Commit: bf5916e7a49b4f8279ee38c0fd20154a101ff026
      https://github.com/llvm/llvm-project/commit/bf5916e7a49b4f8279ee38c0fd20154a101ff026
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2019-11-14 (Thu, 14 Nov 2019)

  Changed paths:
    M mlir/include/mlir/Conversion/StandardToLLVM/ConvertStandardToLLVM.h
    M mlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp
    M mlir/lib/Conversion/VectorToLLVM/VectorToLLVM.cpp
    M mlir/test/Conversion/VectorToLLVM/vector-to-llvm.mlir

  Log Message:
  -----------
  Use MemRefDescriptor in Vector-to-LLVM convresion

Following up on the consolidation of MemRef descriptor conversion, update
Vector-to-LLVM conversion to use the helper class that abstracts away the
implementation details of the MemRef descriptor. This also makes the types of
the attributes in emitted llvm.insert/extractelement operations consistently
i64 instead of a mix of index and i64.

PiperOrigin-RevId: 280441451


  Commit: b34a861d5a50fa380ddd578290baf9b819d3b5df
      https://github.com/llvm/llvm-project/commit/b34a861d5a50fa380ddd578290baf9b819d3b5df
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2019-11-14 (Thu, 14 Nov 2019)

  Changed paths:
    M mlir/include/mlir/Conversion/StandardToLLVM/ConvertStandardToLLVM.h
    M mlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp

  Log Message:
  -----------
  Make positions of elements in MemRef descriptor private

Previous commits removed all uses of LLVMTypeConverter::k*PosInMemRefDescriptor
outside of the MemRefDescriptor class. These numbers are an implementation
detail and can be hidden under a layer of more semantic APIs.

PiperOrigin-RevId: 280442444


  Commit: 971b8dd4d881cdc21b6aa73a3797bf9a6d48ca14
      https://github.com/llvm/llvm-project/commit/971b8dd4d881cdc21b6aa73a3797bf9a6d48ca14
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2019-11-14 (Thu, 14 Nov 2019)

  Changed paths:
    M mlir/examples/toy/Ch6/CMakeLists.txt
    M mlir/examples/toy/Ch6/mlir/LowerToLLVM.cpp
    M mlir/examples/toy/Ch7/CMakeLists.txt
    M mlir/examples/toy/Ch7/mlir/LowerToLLVM.cpp
    A mlir/include/mlir/Conversion/AffineToStandard/AffineToStandard.h
    R mlir/include/mlir/Transforms/LowerAffine.h
    A mlir/lib/Conversion/AffineToStandard/AffineToStandard.cpp
    M mlir/lib/Conversion/CMakeLists.txt
    M mlir/lib/Conversion/LoopsToGPU/LoopsToGPU.cpp
    M mlir/lib/Dialect/Linalg/Transforms/LowerToLLVMDialect.cpp
    M mlir/lib/Transforms/CMakeLists.txt
    R mlir/lib/Transforms/LowerAffine.cpp
    M mlir/tools/mlir-opt/CMakeLists.txt

  Log Message:
  -----------
  Move Affine to Standard conversion to lib/Conversion

This is essentially a dialect conversion and conceptually belongs to
conversions.

PiperOrigin-RevId: 280460034


  Commit: 796ca609ebd4978d0779eaf5a7a44310aa368c73
      https://github.com/llvm/llvm-project/commit/796ca609ebd4978d0779eaf5a7a44310aa368c73
  Author: Lei Zhang <antiagainst at google.com>
  Date:   2019-11-14 (Thu, 14 Nov 2019)

  Changed paths:
    M mlir/include/mlir/TableGen/Operator.h
    M mlir/lib/TableGen/Operator.cpp
    M mlir/lib/TableGen/Pattern.cpp
    M mlir/test/lib/TestDialect/TestOps.td
    M mlir/test/mlir-tblgen/pattern.mlir

  Log Message:
  -----------
  [ODS] Fix operation argument population to avoid crash

The `Operator` class keeps an `arguments` field, which contains pointers
to `operands` and `attributes` elements. Thus it must be populated after
`operands` and `attributes` are finalized so to have stable pointers.
SmallVector may re-allocate when still having new elements added, which
will invalidate pointers.

PiperOrigin-RevId: 280466896


  Commit: e0a0ac4b00e8d175bd6d0f98318baff64381162b
      https://github.com/llvm/llvm-project/commit/e0a0ac4b00e8d175bd6d0f98318baff64381162b
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2019-11-14 (Thu, 14 Nov 2019)

  Changed paths:
    A mlir/lib/Conversion/AffineToStandard/CMakeLists.txt

  Log Message:
  -----------
  Add CMakeLists.txt for AffineToStandard conversion

PiperOrigin-RevId: 280470142


  Commit: a4669cd3b49f1e7b7b06bcc5602ab00da5b99efb
      https://github.com/llvm/llvm-project/commit/a4669cd3b49f1e7b7b06bcc5602ab00da5b99efb
  Author: Andy Davis <andydavis at google.com>
  Date:   2019-11-14 (Thu, 14 Nov 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/StandardOps/Ops.td
    M mlir/lib/Dialect/StandardOps/Ops.cpp
    M mlir/test/IR/core-ops.mlir
    M mlir/test/Transforms/canonicalize.mlir

  Log Message:
  -----------
  Adds canonicalizer to SubViewOp which folds constants from base memref and operands into the subview result memref type.
Changes SubViewOp to support zero operands case, when offset, strides and sizes are all constant.

PiperOrigin-RevId: 280485075


  Commit: a78bd84cf84c00914f48781fa0c561cbb6bdf847
      https://github.com/llvm/llvm-project/commit/a78bd84cf84c00914f48781fa0c561cbb6bdf847
  Author: Mahesh Ravishankar <ravishankarm at google.com>
  Date:   2019-11-14 (Thu, 14 Nov 2019)

  Changed paths:
    A mlir/include/mlir/Conversion/GPUToSPIRV/ConvertGPUToSPIRV.h
    A mlir/include/mlir/Conversion/GPUToSPIRV/ConvertGPUToSPIRVPass.h
    M mlir/include/mlir/Conversion/StandardToSPIRV/ConvertStandardToSPIRV.h
    A mlir/include/mlir/Conversion/StandardToSPIRV/ConvertStandardToSPIRVPass.h
    M mlir/include/mlir/Dialect/SPIRV/Passes.h
    A mlir/include/mlir/Dialect/SPIRV/SPIRVLowering.h
    M mlir/lib/Conversion/GPUToSPIRV/CMakeLists.txt
    A mlir/lib/Conversion/GPUToSPIRV/ConvertGPUToSPIRV.cpp
    A mlir/lib/Conversion/GPUToSPIRV/ConvertGPUToSPIRVPass.cpp
    R mlir/lib/Conversion/GPUToSPIRV/GPUToSPIRV.cpp
    M mlir/lib/Conversion/StandardToSPIRV/CMakeLists.txt
    M mlir/lib/Conversion/StandardToSPIRV/ConvertStandardToSPIRV.cpp
    M mlir/lib/Conversion/StandardToSPIRV/ConvertStandardToSPIRVPass.cpp
    M mlir/lib/Dialect/SPIRV/CMakeLists.txt
    A mlir/lib/Dialect/SPIRV/SPIRVLowering.cpp
    M mlir/tools/mlir-opt/CMakeLists.txt

  Log Message:
  -----------
  NFC: Refactor Dialect Conversion targeting SPIR-V.

Refactoring the conversion from StandardOps/GPU dialect to SPIR-V
dialect:
1) Move the SPIRVTypeConversion and SPIRVOpLowering class into SPIR-V
   dialect.
2) Add header files that expose functions to add patterns for the
   dialects to SPIR-V lowering, as well as a pass that does the
   dialect to SPIR-V lowering.
3) Make SPIRVOpLowering derive from OpLowering class.
PiperOrigin-RevId: 280486871


  Commit: 0b271b7dfe285064b8b237d18bfc923212e7a77b
      https://github.com/llvm/llvm-project/commit/0b271b7dfe285064b8b237d18bfc923212e7a77b
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2019-11-14 (Thu, 14 Nov 2019)

  Changed paths:
    A mlir/include/mlir/Conversion/VectorConversions/VectorConversions.h
    R mlir/include/mlir/Conversion/VectorToLLVM/VectorToLLVM.h
    M mlir/include/mlir/Transforms/Passes.h
    M mlir/lib/Conversion/CMakeLists.txt
    A mlir/lib/Conversion/VectorConversions/CMakeLists.txt
    A mlir/lib/Conversion/VectorConversions/VectorToLLVM.cpp
    A mlir/lib/Conversion/VectorConversions/VectorToLoops.cpp
    R mlir/lib/Conversion/VectorToLLVM/CMakeLists.txt
    R mlir/lib/Conversion/VectorToLLVM/VectorToLLVM.cpp
    M mlir/lib/Dialect/Linalg/Transforms/LowerToLLVMDialect.cpp
    M mlir/lib/Transforms/CMakeLists.txt
    R mlir/lib/Transforms/LowerVectorTransfers.cpp
    A mlir/test/Conversion/VectorConversions/lower_vector_transfers.mlir
    A mlir/test/Conversion/VectorConversions/vector-to-llvm.mlir
    R mlir/test/Conversion/VectorToLLVM/vector-to-llvm.mlir
    R mlir/test/Transforms/Vectorize/lower_vector_transfers.mlir
    M mlir/test/lib/Transforms/CMakeLists.txt
    A mlir/test/lib/Transforms/TestLowerVectorTransfers.cpp

  Log Message:
  -----------
  Refactor the LowerVectorTransfers pass to use the RewritePattern infra - NFC

This is step 1/n in refactoring infrastructure along the Vector dialect to make it ready for retargetability and composable progressive lowering.

PiperOrigin-RevId: 280529784


  Commit: 682b9b2b83ec72f77a5920285e34cad5b563de58
      https://github.com/llvm/llvm-project/commit/682b9b2b83ec72f77a5920285e34cad5b563de58
  Author: Lucy Fox <lucyfox at google.com>
  Date:   2019-11-14 (Thu, 14 Nov 2019)

  Changed paths:
    M mlir/g3doc/Glossary.md

  Log Message:
  -----------
  Expand on operation definition to clarify the difference between operation and op.

PiperOrigin-RevId: 280555742


  Commit: 95d5d359582c4f43f2dd4796584df86847af0336
      https://github.com/llvm/llvm-project/commit/95d5d359582c4f43f2dd4796584df86847af0336
  Author: MLIR Team <no-reply at google.com>
  Date:   2019-11-15 (Fri, 15 Nov 2019)

  Changed paths:
    M mlir/g3doc/Tutorials/Toy/Ch-1.md
    M mlir/g3doc/Tutorials/Toy/Ch-3.md
    M mlir/g3doc/Tutorials/Toy/Ch-4.md
    M mlir/g3doc/Tutorials/Toy/Ch-5.md
    M mlir/g3doc/Tutorials/Toy/Ch-6.md

  Log Message:
  -----------
  Add more navigation to the MLIR toy tutorial.

This comes in the form of:
1. Missing links to next chapters.
2. Table of contents for each page.

PiperOrigin-RevId: 280619053


  Commit: 9c7bceb4fe5144fbe1ef4f1cdda3c802fb272248
      https://github.com/llvm/llvm-project/commit/9c7bceb4fe5144fbe1ef4f1cdda3c802fb272248
  Author: Stephan Herhut <herhut at google.com>
  Date:   2019-11-15 (Fri, 15 Nov 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/StandardOps/Ops.td
    M mlir/test/Transforms/canonicalize.mlir

  Log Message:
  -----------
  Mark std.subview as no-sideeffect.

In essence, std.subview is just an abstract indexing transformation (somewhat
akin to a gep in llvm) and by itself has no effect. From a practical perspective
this helps, as it allows to remove dead subview operations.

PiperOrigin-RevId: 280630046


  Commit: 57bafc674e68396374c62f4ecb8cb43064d41b27
      https://github.com/llvm/llvm-project/commit/57bafc674e68396374c62f4ecb8cb43064d41b27
  Author: Stephan Herhut <herhut at google.com>
  Date:   2019-11-15 (Fri, 15 Nov 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/StandardOps/Ops.td
    M mlir/test/Transforms/canonicalize.mlir

  Log Message:
  -----------
  Mark std.view as no-sideeffect.

The same reasoning as for std.subview applies.

PiperOrigin-RevId: 280639308


  Commit: 264a4635c8e4be829c21f6c6992d145e81272093
      https://github.com/llvm/llvm-project/commit/264a4635c8e4be829c21f6c6992d145e81272093
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2019-11-15 (Fri, 15 Nov 2019)

  Changed paths:
    M mlir/lib/Dialect/Linalg/Transforms/LowerToLoops.cpp

  Log Message:
  -----------
  Templatize linalg::LowerToLoops - NFC

This modification will allow to easily plug lowering of linalg ops to different types of loops (affine, loop.for and other future constructs).
This is purely NFC for now.

PiperOrigin-RevId: 280652186


  Commit: 88843ae37cf3c65bb0e2debe171ae23cd5ad108d
      https://github.com/llvm/llvm-project/commit/88843ae37cf3c65bb0e2debe171ae23cd5ad108d
  Author: Lei Zhang <antiagainst at google.com>
  Date:   2019-11-15 (Fri, 15 Nov 2019)

  Changed paths:
    M mlir/g3doc/DeclarativeRewrites.md
    M mlir/test/mlir-tblgen/op-attribute.td
    M mlir/test/mlir-tblgen/op-result.td
    M mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
    M mlir/tools/mlir-tblgen/RewriterGen.cpp

  Log Message:
  -----------
  Use aggregate-parameter builder for ops having autogen type-deduction builder

Thus far DRR always invokes the separate-parameter builder (i.e., requiring
a separate parameter for each result-type/operand/attribute) for creating
ops, no matter whether we can auto-generate a builder with type-deduction
ability or not.

This CL changes the path for ops that we can auto-generate type-deduction
builders, i.e., with SameOperandsAndResultType/FirstAttrDerivedResultType
traits. Now they are going through a aggregate-parameter builder (i.e.,
requiring one parameter for all result-types/operands/attributes).
attributes.)

It is expected this approach will be more friendly for future shape inference
function autogen and calling those autogen'd shape inference function without
excessive packing and repacking operand/attribute lists.
Also, it would enable better support for creating ops with optional attributes
because we are not required to provide an Attribute() as placeholder for
an optional attribute anymore.

PiperOrigin-RevId: 280654800


  Commit: 615b9ccdf053e4392ab7f62f2cf0b66b4d649ae8
      https://github.com/llvm/llvm-project/commit/615b9ccdf053e4392ab7f62f2cf0b66b4d649ae8
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2019-11-15 (Fri, 15 Nov 2019)

  Changed paths:
    M mlir/lib/Dialect/Linalg/Analysis/DependenceAnalysis.cpp

  Log Message:
  -----------
  Fix build warnings

Delete unused constexpr ints in LowerToLLVMDialect.
Add (void)toStringRef for non-debug builds.

Fixes tensorflow/mlir#232.

PiperOrigin-RevId: 280671014


  Commit: b9fa45864dea7073dbc1e39649d72b1ddadd0217
      https://github.com/llvm/llvm-project/commit/b9fa45864dea7073dbc1e39649d72b1ddadd0217
  Author: Jacques Pienaar <jpienaar at google.com>
  Date:   2019-11-15 (Fri, 15 Nov 2019)

  Changed paths:
    M mlir/utils/textmate/mlir.json

  Log Message:
  -----------
  Use simpler highlighting textmate syntax

Changes from:
https://github-lightshow.herokuapp.com/?utf8=%E2%9C%93&scope=from-url&grammar_format=auto&grammar_url=https%3A%2F%2Fraw.githubusercontent.com%2Fjpienaar%2Fmlir-grammar%2Fmaster%2Fgrammars%2Fmlir.json&grammar_text=&code_source=from-url&code_url=https%3A%2F%2Fraw.githubusercontent.com%2Fjpienaar%2Fmlir-grammar%2Fmaster%2Fsample.mlir&code=

To:
https://github-lightshow.herokuapp.com/?utf8=%E2%9C%93&scope=from-url&grammar_format=auto&grammar_url=https%3A%2F%2Fraw.githubusercontent.com%2Fjpienaar%2Fmlir-grammar%2Fsimpler%2Fgrammars%2Fmlir.json&grammar_text=&code_source=from-url&code_url=https%3A%2F%2Fraw.githubusercontent.com%2Fjpienaar%2Fmlir-grammar%2Fmaster%2Fsample.mlir&code=

Which I think is an improvement.

PiperOrigin-RevId: 280674770


  Commit: 9d7039b001d6f454d0b6712e0ae31b1d0019adb8
      https://github.com/llvm/llvm-project/commit/9d7039b001d6f454d0b6712e0ae31b1d0019adb8
  Author: Lucy Fox <lucyfox at google.com>
  Date:   2019-11-15 (Fri, 15 Nov 2019)

  Changed paths:
    M mlir/examples/toy/Ch1/include/toy/Lexer.h
    M mlir/g3doc/Canonicalization.md
    M mlir/g3doc/DeveloperGuide.md
    M mlir/g3doc/DialectConversion.md
    M mlir/g3doc/Interfaces.md
    M mlir/g3doc/LangRef.md
    M mlir/g3doc/Tutorials/Toy/Ch-1.md
    M mlir/g3doc/Tutorials/Toy/Ch-2.md
    M mlir/g3doc/Tutorials/Toy/Ch-3.md
    M mlir/g3doc/Tutorials/Toy/Ch-4.md
    M mlir/g3doc/Tutorials/Toy/Ch-5.md
    M mlir/g3doc/Tutorials/Toy/Ch-6.md
    M mlir/g3doc/Tutorials/Toy/Ch-7.md
    M mlir/g3doc/WritingAPass.md

  Log Message:
  -----------
  Modify tutorial and other documentation for consistency, clarity, and correctness.

PiperOrigin-RevId: 280678392


  Commit: a0986bf43d8287175b93e8dd6e2da2d1dc7ac7f0
      https://github.com/llvm/llvm-project/commit/a0986bf43d8287175b93e8dd6e2da2d1dc7ac7f0
  Author: Lei Zhang <antiagainst at google.com>
  Date:   2019-11-15 (Fri, 15 Nov 2019)

  Changed paths:
    M mlir/bindings/python/pybind.cpp
    M mlir/include/mlir/Dialect/StandardOps/CMakeLists.txt
    M mlir/include/mlir/Dialect/StandardOps/Ops.h
    M mlir/include/mlir/Dialect/StandardOps/Ops.td
    M mlir/lib/Conversion/AffineToStandard/AffineToStandard.cpp
    M mlir/lib/Conversion/LoopToStandard/ConvertLoopToStandard.cpp
    M mlir/lib/Conversion/StandardToSPIRV/ConvertStandardToSPIRV.cpp
    M mlir/lib/Dialect/StandardOps/Ops.cpp
    M mlir/lib/EDSC/Builders.cpp
    M mlir/lib/Transforms/Utils/LoopUtils.cpp
    M mlir/test/IR/invalid-ops.mlir

  Log Message:
  -----------
  NFC: Convert CmpIPredicate in StandardOps to use EnumAttr

This turns several hand-written functions to auto-generated ones.

PiperOrigin-RevId: 280684326


  Commit: f90d5d703a814f70a06f719636d61ccb9fa26f21
      https://github.com/llvm/llvm-project/commit/f90d5d703a814f70a06f719636d61ccb9fa26f21
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2019-11-15 (Fri, 15 Nov 2019)

  Changed paths:
    M mlir/g3doc/LangRef.md

  Log Message:
  -----------
  Clarify that identity maps are discarded from the MemRef type

Update LangRef to explicitly mention the type canonicalization rule applied to
MemRef types: identity maps do not contribute to type identification.

PiperOrigin-RevId: 280684904


  Commit: 68e48ba1116ddf9d0a11d2b308205787a18ca089
      https://github.com/llvm/llvm-project/commit/68e48ba1116ddf9d0a11d2b308205787a18ca089
  Author: Denis Khalikov <khalikov.denis at huawei.com>
  Date:   2019-11-15 (Fri, 15 Nov 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/SPIRV/SPIRVBase.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVBitOps.td
    M mlir/lib/Dialect/SPIRV/SPIRVOps.cpp
    A mlir/test/Dialect/SPIRV/Serialization/bit-ops.mlir
    R mlir/test/Dialect/SPIRV/Serialization/bit-ops.td
    M mlir/test/Dialect/SPIRV/ops.mlir

  Log Message:
  -----------
  [spirv] Add bit ops

This CL added op definitions for a few bit operations:

* OpBitFieldInsert
* OpBitFieldSExtract
* OpBitFieldUExtract

Closes tensorflow/mlir#233

COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/233 from denis0x0D:sandbox/bit_field_ops e7fd85b00d72d483d7992dc42b9cc4d673903455
PiperOrigin-RevId: 280691816


  Commit: 0fbac09473fba2bcd991920fc1c2efe976d0ed66
      https://github.com/llvm/llvm-project/commit/0fbac09473fba2bcd991920fc1c2efe976d0ed66
  Author: Logan Chien <loganchien at google.com>
  Date:   2019-11-15 (Fri, 15 Nov 2019)

  Changed paths:
    M mlir/g3doc/Dialects/GPU.md
    M mlir/g3doc/Dialects/Standard.md
    M mlir/g3doc/LangRef.md

  Log Message:
  -----------
  Fix attribute dict syntax in the docs

This commit fixes several attribute dict syntax errors in the documentation.

PiperOrigin-RevId: 280726269


  Commit: 8ec002cbec1a46b1604a58c6cb76057084884cc4
      https://github.com/llvm/llvm-project/commit/8ec002cbec1a46b1604a58c6cb76057084884cc4
  Author: Jacques Pienaar <jpienaar at google.com>
  Date:   2019-11-16 (Sat, 16 Nov 2019)

  Changed paths:
    M mlir/examples/toy/Ch7/include/toy/Dialect.h

  Log Message:
  -----------
  Fix mismatched-tags warning

PiperOrigin-RevId: 280888290


  Commit: b8dc3fd81273b5928bfe98519cf10ce5bf9c565d
      https://github.com/llvm/llvm-project/commit/b8dc3fd81273b5928bfe98519cf10ce5bf9c565d
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2019-11-18 (Mon, 18 Nov 2019)

  Changed paths:
    M mlir/lib/Conversion/GPUToNVVM/LowerGpuOpsToNVVMOps.cpp
    M mlir/lib/Conversion/GPUToROCDL/LowerGpuOpsToROCDLOps.cpp
    M mlir/test/Conversion/GPUToNVVM/gpu-to-nvvm.mlir
    M mlir/test/Conversion/GPUToROCDL/gpu-to-rocdl.mlir

  Log Message:
  -----------
  Rename CLI flags -lower-gpu-ops-to-*-ops to -convert-gpu-to-*

This makes the flags consistent with the naming scheme used elsewhere in the
codebase for dialect conversions.

PiperOrigin-RevId: 281027517


  Commit: f0f3b71d67e218f2a556065e16ee3d0ec86067ef
      https://github.com/llvm/llvm-project/commit/f0f3b71d67e218f2a556065e16ee3d0ec86067ef
  Author: Stephan Herhut <herhut at google.com>
  Date:   2019-11-18 (Mon, 18 Nov 2019)

  Changed paths:
    M mlir/lib/Dialect/StandardOps/Ops.cpp
    M mlir/test/Transforms/canonicalize.mlir

  Log Message:
  -----------
  Implement folding of pattern dim(subview(_)[...][s1, ..., sn][...], i) -> si.

PiperOrigin-RevId: 281042016


  Commit: 9732bb533cceeebed80c19be799a79853018fa09
      https://github.com/llvm/llvm-project/commit/9732bb533cceeebed80c19be799a79853018fa09
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2019-11-18 (Mon, 18 Nov 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/VectorOps/VectorOps.td
    M mlir/lib/Conversion/VectorConversions/VectorToLLVM.cpp
    M mlir/lib/Dialect/VectorOps/VectorOps.cpp

  Log Message:
  -----------
  Standardize all VectorOps class names to be prefixed by Vector - NFC

This improves consistency and will concretely avoid collisions between VectorExtractElementOp and ExtractElementOp when they are included in the same transforms / rewrites.

PiperOrigin-RevId: 281101588


  Commit: 68a8da4a938e5489ba915d615352af0b069ae56a
      https://github.com/llvm/llvm-project/commit/68a8da4a938e5489ba915d615352af0b069ae56a
  Author: Andy Davis <andydavis at google.com>
  Date:   2019-11-18 (Mon, 18 Nov 2019)

  Changed paths:
    M mlir/lib/Analysis/Utils.cpp
    M mlir/lib/Transforms/LoopFusion.cpp
    M mlir/test/Transforms/loop-fusion.mlir

  Log Message:
  -----------
  Fix Affine Loop Fusion test case reported on github.
This CL utilizies the more robust fusion feasibility analysis being built out in LoopFusionUtils, which will eventually be used to replace the current affine loop fusion pass.

PiperOrigin-RevId: 281112340


  Commit: 062dd406b1efd00483961ab3a4e75543e47b4859
      https://github.com/llvm/llvm-project/commit/062dd406b1efd00483961ab3a4e75543e47b4859
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2019-11-18 (Mon, 18 Nov 2019)

  Changed paths:
    M mlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp

  Log Message:
  -----------
  ConvertStandardToLLVM: replace assertion with graceful failure

The assertion was introduced in the early days of dialect conversion
infrastructure when we had the matching function separate from the rewriting
function. The infrastructure evolved to have a common matchAndRewrite function
and the separate matching function was dropped without chaning the rewriting
that became matchAndRewrite. This has led to assertion being triggered. Return
a matchFailure instead of failing an assertion on unsupported types.

Closes tensorflow/mlir#230

PiperOrigin-RevId: 281113741


  Commit: 563b5910a8394373454c5009d98f1b4fe13f0f68
      https://github.com/llvm/llvm-project/commit/563b5910a8394373454c5009d98f1b4fe13f0f68
  Author: Jing Pu <jingpu at google.com>
  Date:   2019-11-18 (Mon, 18 Nov 2019)

  Changed paths:
    M mlir/lib/Transforms/ViewOpGraph.cpp

  Log Message:
  -----------
  Also elide large array attribute in OpGraph Dump

PiperOrigin-RevId: 281114034


  Commit: 6c77e59bfd28e7195754cbf8cc32c6cce90de6b6
      https://github.com/llvm/llvm-project/commit/6c77e59bfd28e7195754cbf8cc32c6cce90de6b6
  Author: Denis Khalikov <khalikov.denis at huawei.com>
  Date:   2019-11-18 (Mon, 18 Nov 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/SPIRV/SPIRVCastOps.td
    M mlir/lib/Dialect/SPIRV/SPIRVOps.cpp
    M mlir/test/Dialect/SPIRV/canonicalize.mlir

  Log Message:
  -----------
  [spirv] Add a canonicalizer for BitcastOp.

Convert chained `spirv::BitcastOp` operations into
one `spirv::BitcastOp` operation.

Closes tensorflow/mlir#238

COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/238 from denis0x0D:sandbox/canon_bitcast 4352ed4f81b959ec92f849c599e733b62a99c010
PiperOrigin-RevId: 281129234


  Commit: 1f475e316cc9991004fbfb8096bd0b10398515f3
      https://github.com/llvm/llvm-project/commit/1f475e316cc9991004fbfb8096bd0b10398515f3
  Author: Lei Zhang <antiagainst at google.com>
  Date:   2019-11-18 (Mon, 18 Nov 2019)

  Changed paths:
    M mlir/utils/spirv/gen_spirv_dialect.py

  Log Message:
  -----------
  Fix gen_spirv_dialect.py regarding 1D/2D/3D Dim symbol name

PiperOrigin-RevId: 281131561


  Commit: 9873a29817840369b32b018272ec2b3b2f0d076f
      https://github.com/llvm/llvm-project/commit/9873a29817840369b32b018272ec2b3b2f0d076f
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-11-18 (Mon, 18 Nov 2019)

  Changed paths:
    M mlir/include/mlir/IR/DialectImplementation.h
    M mlir/include/mlir/IR/OpImplementation.h
    M mlir/test/Dialect/SPIRV/structure-ops.mlir

  Log Message:
  -----------
  Add a parseAttribute<AttrType> overload for the non-type case.

The variant that accepts a type will check that the parsed attribute is a valid instance of AttrType. The non-type variant would silently fail in this case, leading to garbage attribute values.

PiperOrigin-RevId: 281136528


  Commit: a6a287335d7dff1fddaf4693133714f44205f0a2
      https://github.com/llvm/llvm-project/commit/a6a287335d7dff1fddaf4693133714f44205f0a2
  Author: Andy Davis <andydavis at google.com>
  Date:   2019-11-18 (Mon, 18 Nov 2019)

  Changed paths:
    M mlir/lib/Dialect/StandardOps/Ops.cpp
    M mlir/test/Transforms/canonicalize.mlir

  Log Message:
  -----------
  Fix SubViewOp stride calculation in constant folding.
Adds unit tests for subview offset and stride argument constant folding.

PiperOrigin-RevId: 281161041


  Commit: 613ace94f2f042dad7907bc24fa5c1a5b956484b
      https://github.com/llvm/llvm-project/commit/613ace94f2f042dad7907bc24fa5c1a5b956484b
  Author: Uday Bondhugula <udayb at iisc.ac.in>
  Date:   2019-11-18 (Mon, 18 Nov 2019)

  Changed paths:
    M mlir/tools/mlir-translate/CMakeLists.txt

  Log Message:
  -----------
  Drop unnecessary dependences from mlir-translate

Closes tensorflow/mlir#243

COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/243 from bondhugula:patch-2 fb682996efde001189414a4c7aa59ce42ace7831
PiperOrigin-RevId: 281167834


  Commit: 8c6a5233d511c65337b2314a424c9959260c4f5f
      https://github.com/llvm/llvm-project/commit/8c6a5233d511c65337b2314a424c9959260c4f5f
  Author: Alexander Belyaev <pifon at google.com>
  Date:   2019-11-18 (Mon, 18 Nov 2019)

  Changed paths:
    M mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
    M mlir/lib/Dialect/Linalg/Transforms/LowerToLLVMDialect.cpp
    M mlir/lib/Dialect/Linalg/Transforms/LowerToLoops.cpp
    M mlir/test/Dialect/Linalg/invalid.mlir
    M mlir/test/Dialect/Linalg/loops.mlir

  Log Message:
  -----------
  Lower linalg.indexed_generic to loops.

PiperOrigin-RevId: 281169885


  Commit: d8563c0e3aea35cb1b8a9f97516da50875e04d14
      https://github.com/llvm/llvm-project/commit/d8563c0e3aea35cb1b8a9f97516da50875e04d14
  Author: Tian Jin <tjingrant at gmail.com>
  Date:   2019-11-18 (Mon, 18 Nov 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/StandardOps/Ops.h
    M mlir/lib/Dialect/StandardOps/Ops.cpp

  Log Message:
  -----------
  Use SmallVectorImpl instead of SmallVector for function parameters (NFC)

Closes tensorflow/mlir#247

PiperOrigin-RevId: 281185661


  Commit: c614c92fdc679d484662756234c9d9cf5c7238e4
      https://github.com/llvm/llvm-project/commit/c614c92fdc679d484662756234c9d9cf5c7238e4
  Author: Hanhan Wang <hanchung at google.com>
  Date:   2019-11-18 (Mon, 18 Nov 2019)

  Changed paths:
    M mlir/lib/Dialect/SPIRV/SPIRVOps.cpp
    M mlir/lib/Dialect/SPIRV/Serialization/Serializer.cpp
    M mlir/test/Dialect/SPIRV/Serialization/constant.mlir
    M mlir/test/Dialect/SPIRV/structure-ops.mlir

  Log Message:
  -----------
  Support SPIR-V constant op to take DenseElementsAttr as input.

Iterates each element to build the array. This includes a little refactor to
combine bool/int/float into a function, since they are similar. The only
difference is calling different function in the end.

PiperOrigin-RevId: 281210288


  Commit: 01fb8cf1da736f54286ecc678ad46afde221209b
      https://github.com/llvm/llvm-project/commit/01fb8cf1da736f54286ecc678ad46afde221209b
  Author: Manuel Freiberger <manuel.freiberger at gmail.com>
  Date:   2019-11-18 (Mon, 18 Nov 2019)

  Changed paths:
    M mlir/g3doc/Tutorials/Toy/Ch-1.md

  Log Message:
  -----------
  Fix the shape of the outcome in the example code.

The toy language uses element-wise multiplication. Transposing and multiplying
two tensors with shape <2, 3> gives a tensor with shape <3, 2>.

Closes tensorflow/mlir#227

COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/227 from ombre5733:toy-ch1-docu-fix d79e5d3f9e3d5150a7ac8aac28b899df5a0d10a0
PiperOrigin-RevId: 281221671


  Commit: 9110af5bec63525ba7ebbcdaba1d205ba04d1efc
      https://github.com/llvm/llvm-project/commit/9110af5bec63525ba7ebbcdaba1d205ba04d1efc
  Author: Logan Chien <loganchien at google.com>
  Date:   2019-11-18 (Mon, 18 Nov 2019)

  Changed paths:
    M mlir/g3doc/LangRef.md

  Log Message:
  -----------
  Add dialect-attribute-entry requirement to docs

This commit add `dialect-attribute-entry` requirements on function arguments,
function results, and function attributes to the documentation.

PiperOrigin-RevId: 281227740


  Commit: 8961d8e32fc371631b990b8ece64da6b7691236e
      https://github.com/llvm/llvm-project/commit/8961d8e32fc371631b990b8ece64da6b7691236e
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2019-11-19 (Tue, 19 Nov 2019)

  Changed paths:
    M mlir/g3doc/ConversionToLLVMDialect.md
    M mlir/g3doc/Passes.md
    M mlir/g3doc/WritingAPass.md
    M mlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp
    M mlir/test/Conversion/StandardToLLVM/convert-argattrs.mlir
    M mlir/test/Conversion/StandardToLLVM/convert-funcs.mlir
    M mlir/test/Conversion/StandardToLLVM/convert-memref-ops.mlir
    M mlir/test/Conversion/StandardToLLVM/convert-to-llvmir.mlir
    M mlir/test/Conversion/StandardToLLVM/standard-to-llvm.mlir
    M mlir/test/mlir-cpu-runner/utils.mlir

  Log Message:
  -----------
  Change conversion CLI flag from -lower-to-llvm to -convert-std-to-llvm

The command-line flag name `lower-to-llvm` for the pass performing dialect
conversion from the Standard dialect to the LLVM dialect is misleading and
inconsistent with most of the conversion passses. It leads the user to believe
that there are no restrictions on what can be converted, while in fact only a
subset of the Standard dialect can be converted (with operations from other
dialects converted by separate passes). Use `convert-std-to-llvm` that better
reflects what the pass does and is consistent with most other conversions.

PiperOrigin-RevId: 281238797


  Commit: 06fb797b4090526b906d7af44715a826faed5d3a
      https://github.com/llvm/llvm-project/commit/06fb797b4090526b906d7af44715a826faed5d3a
  Author: Eric Schweitz <eric.schweitz at pgroup.com>
  Date:   2019-11-19 (Tue, 19 Nov 2019)

  Changed paths:
    M mlir/include/mlir/IR/DialectImplementation.h
    M mlir/lib/Parser/Parser.cpp

  Log Message:
  -----------
  Add '*' and '?' and optional brace parse calls to the Parser

Closes tensorflow/mlir#245

PiperOrigin-RevId: 281321459


  Commit: dd5a7cb48833d4abf93a063f40b7cf5baae940ef
      https://github.com/llvm/llvm-project/commit/dd5a7cb48833d4abf93a063f40b7cf5baae940ef
  Author: Diego Caballero <diego.caballero at intel.com>
  Date:   2019-11-19 (Tue, 19 Nov 2019)

  Changed paths:
    M mlir/include/mlir/Transforms/DialectConversion.h
    M mlir/lib/Transforms/DialectConversion.cpp
    A mlir/test/Transforms/test-legalize-remapped-value.mlir
    M mlir/test/lib/TestDialect/TestPatterns.cpp

  Log Message:
  -----------
  Add getRemappedValue to ConversionPatternRewriter

This method is needed for N->1 conversion patterns to retrieve remapped
Values used in the original N operations.

Closes tensorflow/mlir#237

COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/237 from dcaballe:dcaballe/getRemappedValue 1f64fadcf2b203f7b336ff0c5838b116ae3625db
PiperOrigin-RevId: 281321881


  Commit: d324c613eafb03ac78076edc0441325e92b29fe9
      https://github.com/llvm/llvm-project/commit/d324c613eafb03ac78076edc0441325e92b29fe9
  Author: Mehdi Amini <aminim at google.com>
  Date:   2019-11-19 (Tue, 19 Nov 2019)

  Changed paths:
    M mlir/g3doc/DeveloperGuide.md

  Log Message:
  -----------
  Add mention to avoid cl::opt for MLIR passes in the developer guide

PiperOrigin-RevId: 281338448


  Commit: c017704cd96d7dcf252a9a7895f0f2ac7eebadf0
      https://github.com/llvm/llvm-project/commit/c017704cd96d7dcf252a9a7895f0f2ac7eebadf0
  Author: Mehdi Amini <aminim at google.com>
  Date:   2019-11-19 (Tue, 19 Nov 2019)

  Changed paths:
    M mlir/g3doc/DeveloperGuide.md

  Log Message:
  -----------
  Add a note on commit messages to our developer guide

PiperOrigin-RevId: 281338738


  Commit: 3732ba4def17af34567966276898fcdca11730c2
      https://github.com/llvm/llvm-project/commit/3732ba4def17af34567966276898fcdca11730c2
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2019-11-19 (Tue, 19 Nov 2019)

  Changed paths:
    M mlir/test/mlir-cpu-runner/mlir_runner_utils.cpp
    M mlir/test/mlir-cpu-runner/utils.mlir

  Log Message:
  -----------
  Fix pretty printer corner case in mlir_runner_utils.cpp.

In the particular case where the size of a memref dimension is 1, double printing would happen because printLast was called unconditionally.
This CL fixes the print and updates an incorrect test that should have caught this in the first place.

PiperOrigin-RevId: 281345142


  Commit: ee95f6f2594e9089990024208d01634fd81d2da2
      https://github.com/llvm/llvm-project/commit/ee95f6f2594e9089990024208d01634fd81d2da2
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2019-11-19 (Tue, 19 Nov 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/VectorOps/VectorOps.td
    M mlir/lib/Dialect/VectorOps/VectorOps.cpp
    M mlir/test/Dialect/VectorOps/invalid.mlir
    M mlir/test/Dialect/VectorOps/ops.mlir

  Log Message:
  -----------
  Add VectorOps.StridedSliceOp

The `vector.strided_slice` takes an n-D vector, k-D `offsets` integer array attribute, a
k-D `sizes` integer array attribute, a k-D `strides` integer array attribute and extracts
the n-D subvector at the proper offset.

Returns an n-D vector where the first k-D dimensions match the `sizes` attribute.
The returned subvector contains the elements starting at offset `offsets` and ending at
`offsets + sizes`.

Example:
```
  %1 = vector.strided_slice %0
      {offsets : [0, 2], sizes : [2, 4], strides : [1, 1]}:
    vector<4x8x16xf32> // returns a vector<2x4x16xf32>
```

This op will be useful for progressive lowering within the VectorOp dialect.

PiperOrigin-RevId: 281352749


  Commit: f868adafee91a8c3ebee1e052d5fdfff7be0afd0
      https://github.com/llvm/llvm-project/commit/f868adafee91a8c3ebee1e052d5fdfff7be0afd0
  Author: Christian Sigg <csigg at google.com>
  Date:   2019-11-19 (Tue, 19 Nov 2019)

  Changed paths:
    M mlir/lib/Conversion/GPUToCUDA/ConvertLaunchFuncToCudaCalls.cpp
    M mlir/test/mlir-cuda-runner/all-reduce-op.mlir
    M mlir/test/mlir-cuda-runner/all-reduce-region.mlir
    M mlir/test/mlir-cuda-runner/gpu-to-cubin.mlir
    M mlir/tools/mlir-cuda-runner/cuda-runtime-wrappers.cpp

  Log Message:
  -----------
  Make type and rank explicit in mcuMemHostRegister function.

Fix registered size of indirect MemRefType kernel arguments.

PiperOrigin-RevId: 281362940


  Commit: 88368a19aa5b13b9a08f187a99ed0d04d17be653
      https://github.com/llvm/llvm-project/commit/88368a19aa5b13b9a08f187a99ed0d04d17be653
  Author: Eric Schweitz <eric.schweitz at pgroup.com>
  Date:   2019-11-19 (Tue, 19 Nov 2019)

  Changed paths:
    M mlir/CMakeLists.txt
    M mlir/tools/mlir-opt/CMakeLists.txt

  Log Message:
  -----------
  Add some CMake rules for installing headers, mlir-tblgen, and mlir-opt

Closes tensorflow/mlir#246

PiperOrigin-RevId: 281442685


  Commit: abb626686d47ef3809ad800f8a25e68c56e79a7e
      https://github.com/llvm/llvm-project/commit/abb626686d47ef3809ad800f8a25e68c56e79a7e
  Author: Stephan Herhut <herhut at google.com>
  Date:   2019-11-20 (Wed, 20 Nov 2019)

  Changed paths:
    M mlir/lib/Dialect/GPU/Transforms/KernelOutlining.cpp
    M mlir/test/Dialect/GPU/outlining.mlir

  Log Message:
  -----------
  Extend kernel outlining to also consider dim worth inlining.

PiperOrigin-RevId: 281483447


  Commit: e50261657f077b933b256937b0d68eb0bc5bd9a4
      https://github.com/llvm/llvm-project/commit/e50261657f077b933b256937b0d68eb0bc5bd9a4
  Author: Alexander Belyaev <pifon at google.com>
  Date:   2019-11-20 (Wed, 20 Nov 2019)

  Changed paths:
    M mlir/g3doc/DeclarativeRewrites.md
    M mlir/g3doc/OpDefinitions.md
    M mlir/include/mlir/Analysis/CallGraph.h
    M mlir/lib/Analysis/CallGraph.cpp
    M mlir/test/Transforms/loop-fusion.mlir
    M mlir/test/lib/TestDialect/TestPatterns.cpp

  Log Message:
  -----------
  Fix 'the the' typo.

PiperOrigin-RevId: 281501234


  Commit: 3825cc46ab7d2c63c8725524fe0338f40a53c4fc
      https://github.com/llvm/llvm-project/commit/3825cc46ab7d2c63c8725524fe0338f40a53c4fc
  Author: Alexander Belyaev <pifon at google.com>
  Date:   2019-11-20 (Wed, 20 Nov 2019)

  Changed paths:
    M mlir/include/mlir/IR/Region.h

  Log Message:
  -----------
  Fix the comment to Region block iterators.

PiperOrigin-RevId: 281506693


  Commit: 3c055957de7e47e53d3ee8f5ab283cdb5c0ea535
      https://github.com/llvm/llvm-project/commit/3c055957de7e47e53d3ee8f5ab283cdb5c0ea535
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2019-11-20 (Wed, 20 Nov 2019)

  Changed paths:
    M mlir/test/mlir-cpu-runner/include/mlir_runner_utils.h

  Log Message:
  -----------
  Add StridedMemRef<>::operator[] - NFC

This operator is used for internal debugging purposes.

PiperOrigin-RevId: 281544152


  Commit: eb418559ef29716cc34c891c93490c38ac5ea1dd
      https://github.com/llvm/llvm-project/commit/eb418559ef29716cc34c891c93490c38ac5ea1dd
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-11-20 (Wed, 20 Nov 2019)

  Changed paths:
    M mlir/include/mlir/CMakeLists.txt
    M mlir/include/mlir/Dialect/StandardOps/Ops.h
    M mlir/include/mlir/Dialect/StandardOps/Ops.td
    A mlir/include/mlir/IR/CMakeLists.txt
    A mlir/include/mlir/IR/OpAsmInterface.td
    M mlir/include/mlir/IR/OpImplementation.h
    M mlir/lib/Dialect/StandardOps/Ops.cpp
    M mlir/lib/IR/AsmPrinter.cpp
    M mlir/lib/IR/CMakeLists.txt
    M mlir/test/IR/parser.mlir
    M mlir/test/lib/TestDialect/TestDialect.cpp
    M mlir/test/lib/TestDialect/TestOps.td

  Log Message:
  -----------
  Add a new OpAsmOpInterface to allow for ops to directly hook into the AsmPrinter.

This interface provides more fine-grained hooks into the AsmPrinter than the dialect interface, allowing for operations to define the asm name to use for results directly on the operations themselves. The hook is also expanded to enable defining named result "groups". Get a special name to use when printing the results of this operation.
The given callback is invoked with a specific result value that starts a
result "pack", and the name to give this result pack. To signal that a
result pack should use the default naming scheme, a None can be passed
in instead of the name.

For example, if you have an operation that has four results and you want
to split these into three distinct groups you could do the following:

  setNameFn(getResult(0), "first_result");
  setNameFn(getResult(1), "middle_results");
  setNameFn(getResult(3), ""); // use the default numbering.

This would print the operation as follows:

  %first_result, %middle_results:2, %0 = "my.op" ...

PiperOrigin-RevId: 281546873


  Commit: fa14d4f6ab2ec069e43314a1769d21f374ccb4bd
      https://github.com/llvm/llvm-project/commit/fa14d4f6ab2ec069e43314a1769d21f374ccb4bd
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2019-11-20 (Wed, 20 Nov 2019)

  Changed paths:
    M mlir/include/mlir/Analysis/VectorAnalysis.h
    M mlir/include/mlir/Conversion/VectorConversions/VectorConversions.h
    M mlir/include/mlir/Dialect/VectorOps/CMakeLists.txt
    A mlir/include/mlir/Dialect/VectorOps/VectorTransformPatterns.td
    M mlir/lib/Analysis/VectorAnalysis.cpp
    M mlir/lib/Conversion/VectorConversions/CMakeLists.txt
    A mlir/lib/Conversion/VectorConversions/VectorToVector.cpp
    M mlir/lib/Transforms/MaterializeVectors.cpp
    A mlir/test/Conversion/VectorConversions/vector-to-vector.mlir
    M mlir/test/lib/Transforms/CMakeLists.txt
    A mlir/test/lib/Transforms/TestVectorToVectorConversion.cpp
    M mlir/test/lib/Transforms/TestVectorizationUtils.cpp
    M mlir/tools/mlir-opt/CMakeLists.txt

  Log Message:
  -----------
  Implement unrolling of vector ops to finer-grained vector ops as a pattern.

This CL uses the pattern rewrite infrastructure to implement a simple VectorOps -> VectorOps legalization strategy to unroll coarse-grained vector operations into finer grained ones.
The transformation is written using local pattern rewrites to allow composition with other rewrites. It proceeds by iteratively introducing fake cast ops and cleaning canonicalizing or lowering them away where appropriate.

This is an example of writing transformations as compositions of local pattern rewrites that should enable us to make them significantly more declarative.

PiperOrigin-RevId: 281555100


  Commit: 19212105dd09b70e7a7836115694be8aba9e8990
      https://github.com/llvm/llvm-project/commit/19212105dd09b70e7a7836115694be8aba9e8990
  Author: Mahesh Ravishankar <ravishankarm at google.com>
  Date:   2019-11-20 (Wed, 20 Nov 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/StandardOps/Ops.td
    M mlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp
    M mlir/lib/Dialect/StandardOps/Ops.cpp
    M mlir/test/Conversion/StandardToLLVM/convert-to-llvmir.mlir
    M mlir/test/IR/core-ops.mlir
    M mlir/test/IR/invalid-ops.mlir

  Log Message:
  -----------
  Changes to SubViewOp to make it more amenable to canonicalization.

The current SubViewOp specification allows for either all offsets,
shape and stride to be dynamic or all of them to be static. There are
opportunities for more fine-grained canonicalization based on which of
these are static. For example, if the sizes are static, the result
memref is of static shape. The specification of SubViewOp is modified
to allow on or more of offsets, shapes and strides to be statically
specified. The verification is updated to ensure that the result type
of the subview op is consistent with which of these are static and
which are dynamic.

PiperOrigin-RevId: 281560457


  Commit: e4f83c6c2690088c274f9877064797c9efd4540e
      https://github.com/llvm/llvm-project/commit/e4f83c6c2690088c274f9877064797c9efd4540e
  Author: Sean Silva <silvasean at google.com>
  Date:   2019-11-20 (Wed, 20 Nov 2019)

  Changed paths:
    M mlir/include/mlir/IR/Operation.h
    M mlir/include/mlir/Transforms/Passes.h
    M mlir/lib/IR/Operation.cpp
    M mlir/lib/Transforms/CMakeLists.txt
    A mlir/lib/Transforms/DCE.cpp
    A mlir/test/Transforms/dce.mlir

  Log Message:
  -----------
  Add multi-level DCE pass.

This is a simple multi-level DCE pass that operates pretty generically on
the IR. Its key feature compared to the existing peephole dead op folding
that happens during canonicalization is being able to delete recursively
dead cycles of the use-def graph, including block arguments.

PiperOrigin-RevId: 281568202


  Commit: 84f4bbc5eb1ade360910da343150923703dc9f79
      https://github.com/llvm/llvm-project/commit/84f4bbc5eb1ade360910da343150923703dc9f79
  Author: MLIR Team <no-reply at google.com>
  Date:   2019-11-20 (Wed, 20 Nov 2019)

  Changed paths:
    M mlir/g3doc/Rationale.md

  Log Message:
  -----------
  missing outer index %i in search_body

PiperOrigin-RevId: 281580028


  Commit: 1145cebdab3774c70aa4cb74948e0849473b6388
      https://github.com/llvm/llvm-project/commit/1145cebdab3774c70aa4cb74948e0849473b6388
  Author: Mahesh Ravishankar <ravishankarm at google.com>
  Date:   2019-11-20 (Wed, 20 Nov 2019)

  Changed paths:
    M mlir/lib/Dialect/StandardOps/Ops.cpp
    M mlir/test/IR/invalid-ops.mlir

  Log Message:
  -----------
  Verify subview op result has dynamic shape, when sizes are specified.

If the sizes are specified as arguments to the subview op, then the
shape must be dynamic as well.

PiperOrigin-RevId: 281591608


  Commit: d6a70b31be42d2c41b7fc7e8ecc4c803deb867c5
      https://github.com/llvm/llvm-project/commit/d6a70b31be42d2c41b7fc7e8ecc4c803deb867c5
  Author: Andy Davis <andydavis at google.com>
  Date:   2019-11-20 (Wed, 20 Nov 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/VectorOps/VectorOps.td
    M mlir/lib/Dialect/VectorOps/VectorOps.cpp
    M mlir/test/Dialect/VectorOps/invalid.mlir
    M mlir/test/Dialect/VectorOps/ops.mlir

  Log Message:
  -----------
  Add VectorContractionOp to the VectorOps dialect.

PiperOrigin-RevId: 281605471


  Commit: fafb708b9a0bb4adbdcba0cd7a7cdacf55211696
      https://github.com/llvm/llvm-project/commit/fafb708b9a0bb4adbdcba0cd7a7cdacf55211696
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-11-20 (Wed, 20 Nov 2019)

  Changed paths:
    M mlir/include/mlir/Transforms/Passes.h
    M mlir/include/mlir/Transforms/RegionUtils.h
    M mlir/lib/Transforms/CMakeLists.txt
    R mlir/lib/Transforms/DCE.cpp
    M mlir/lib/Transforms/Utils/GreedyPatternRewriteDriver.cpp
    M mlir/lib/Transforms/Utils/RegionUtils.cpp
    A mlir/test/Transforms/canonicalize-dce.mlir
    R mlir/test/Transforms/dce.mlir
    M mlir/test/lib/TestDialect/TestOps.td

  Log Message:
  -----------
  Merge DCE and unreachable block elimination into a new utility 'simplifyRegions'.

This moves the different canonicalizations of regions into one place and invokes them in the fixed-point iteration of the canonicalizer.

PiperOrigin-RevId: 281617072


  Commit: 75379a684f61b92dff752e348ceebcff24a039d9
      https://github.com/llvm/llvm-project/commit/75379a684f61b92dff752e348ceebcff24a039d9
  Author: MLIR Team <no-reply at google.com>
  Date:   2019-11-20 (Wed, 20 Nov 2019)

  Changed paths:
    M mlir/lib/Parser/Parser.cpp
    M mlir/test/IR/affine-map.mlir
    M mlir/test/IR/invalid-affinemap.mlir
    M mlir/test/Transforms/lower-affine.mlir

  Log Message:
  -----------
  Correctly parse empty affine maps.

Previously the test case crashes / produces an error.

PiperOrigin-RevId: 281630540


  Commit: 57ea705f685dbf8682353486ad65667ca8242fda
      https://github.com/llvm/llvm-project/commit/57ea705f685dbf8682353486ad65667ca8242fda
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-11-20 (Wed, 20 Nov 2019)

  Changed paths:
    A mlir/g3doc/Traits.md
    M mlir/g3doc/Tutorials/Toy/Ch-2.md

  Log Message:
  -----------
  Add a document detailing operation traits, how to define them, and the current list.

Traits are an important piece of operation definition, but don't really have a good documentation presence at the moment.

PiperOrigin-RevId: 281649025


  Commit: 4ea92a0586bcef883a6adc33a5d3359c7ed1aec7
      https://github.com/llvm/llvm-project/commit/4ea92a0586bcef883a6adc33a5d3359c7ed1aec7
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-11-20 (Wed, 20 Nov 2019)

  Changed paths:
    M mlir/lib/Transforms/Utils/RegionUtils.cpp

  Log Message:
  -----------
  NFC: Use Region::getBlocks to fix build failure with drop_begin.
PiperOrigin-RevId: 281656603


  Commit: d05effb705592e8dcca11b7b23f20f47bb34700d
      https://github.com/llvm/llvm-project/commit/d05effb705592e8dcca11b7b23f20f47bb34700d
  Author: Aart Bik <ajcbik at google.com>
  Date:   2019-11-20 (Wed, 20 Nov 2019)

  Changed paths:
    M mlir/g3doc/LangRef.md

  Log Message:
  -----------
  Fixed typo in 2-d tiled layout

PiperOrigin-RevId: 281671097


  Commit: 8bde4aa1bcc7745e1d4274046193358fe3181f16
      https://github.com/llvm/llvm-project/commit/8bde4aa1bcc7745e1d4274046193358fe3181f16
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2019-11-21 (Thu, 21 Nov 2019)

  Changed paths:
    M mlir/include/mlir/TableGen/OpInterfaces.h

  Log Message:
  -----------
  Fix OSS build

Add include of ADT/SmallVector.h.
Fixes tensorflow/mlir#254.

PiperOrigin-RevId: 281721705


  Commit: b5af3784a6b9c67f67a11a9308b043b877f01095
      https://github.com/llvm/llvm-project/commit/b5af3784a6b9c67f67a11a9308b043b877f01095
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2019-11-21 (Thu, 21 Nov 2019)

  Changed paths:
    M mlir/lib/IR/FunctionSupport.cpp
    M mlir/test/Dialect/GPU/outlining.mlir
    M mlir/test/Dialect/LLVMIR/func.mlir
    M mlir/test/IR/parser.mlir
    M mlir/test/IR/test-symbol-rauw.mlir

  Log Message:
  -----------
  Don't force newline before function attributes

Due to legacy reasons, a newline character followed by two spaces was always
inserted before the attributes of the function Op in pretty form. This breaks
formatting when functions are nested in some other operations. Don't print the
newline and just put the attributes on the same line, which is also more
consistent with module Op. Line breaking aware of indentation can be introduced
separately into the parser if deemed useful.

PiperOrigin-RevId: 281721793


  Commit: c2741d4ea0d3c0cc0305895e510ebc03c040b5fd
      https://github.com/llvm/llvm-project/commit/c2741d4ea0d3c0cc0305895e510ebc03c040b5fd
  Author: Benjamin Kramer <kramerb at google.com>
  Date:   2019-11-21 (Thu, 21 Nov 2019)

  Changed paths:
    M mlir/include/mlir/Support/Functional.h

  Log Message:
  -----------
  Add missing include after LLVM 049043b598ef5b12a5894c0c22db8608be70f517

PiperOrigin-RevId: 281732683


  Commit: 2c4985816f4564f359d965a9c118b791f37dd5a4
      https://github.com/llvm/llvm-project/commit/2c4985816f4564f359d965a9c118b791f37dd5a4
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2019-11-21 (Thu, 21 Nov 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/Linalg/Transforms/LinalgTransformPatterns.td
    A mlir/include/mlir/Dialect/Linalg/Transforms/LinalgTransforms.h
    M mlir/lib/Dialect/Linalg/Transforms/LinalgTransforms.cpp
    M mlir/test/lib/CMakeLists.txt
    A mlir/test/lib/DeclarativeTransforms/CMakeLists.txt
    A mlir/test/lib/DeclarativeTransforms/TestLinalgTransformPatterns.td
    A mlir/test/lib/DeclarativeTransforms/lit.local.cfg
    M mlir/test/lib/Transforms/CMakeLists.txt
    A mlir/test/lib/Transforms/TestLinalgTransforms.cpp

  Log Message:
  -----------
  Split Linalg declarative patterns from specific test patterns - NFC

This will make it easier to scale out test patterns and build specific passes that do not interfere with independent testing.

PiperOrigin-RevId: 281736335


  Commit: 663c2f731b259a4af297d86e9a856a9a0d97f814
      https://github.com/llvm/llvm-project/commit/663c2f731b259a4af297d86e9a856a9a0d97f814
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2019-11-21 (Thu, 21 Nov 2019)

  Changed paths:
    M mlir/lib/Dialect/Linalg/Transforms/Promotion.cpp

  Log Message:
  -----------
  Drop unused function - NFC

PiperOrigin-RevId: 281741923


  Commit: 0abec2744c0fa4ab4d88eb1d55d9a1117d35cd41
      https://github.com/llvm/llvm-project/commit/0abec2744c0fa4ab4d88eb1d55d9a1117d35cd41
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2019-11-21 (Thu, 21 Nov 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/Linalg/Transforms/LinalgTransforms.h
    M mlir/lib/Dialect/Linalg/Transforms/LinalgTransforms.cpp

  Log Message:
  -----------
  Fix OSS builds - NFC

PiperOrigin-RevId: 281757979


  Commit: c621e64150676adf7effe8666226f2cb71726b1e
      https://github.com/llvm/llvm-project/commit/c621e64150676adf7effe8666226f2cb71726b1e
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-11-21 (Thu, 21 Nov 2019)

  Changed paths:
    M mlir/include/mlir/IR/Attributes.h

  Log Message:
  -----------
  NFC: Add wrappers around DenseIntElementsAttr/DenseFPElementsAttr::get to avoid the need to cast.

This avoids the need to cast back to the derived type when calling get, i.e. removes the need to do DenseIntElementsAttr::get(...).cast<DenseIntElementsAttr>().

PiperOrigin-RevId: 281772163


  Commit: d7c17195a4398467e5149f9537cb957cd48341d6
      https://github.com/llvm/llvm-project/commit/d7c17195a4398467e5149f9537cb957cd48341d6
  Author: Christian Sigg <csigg at google.com>
  Date:   2019-11-21 (Thu, 21 Nov 2019)

  Changed paths:
    M mlir/test/mlir-cuda-runner/all-reduce-op.mlir
    M mlir/test/mlir-cuda-runner/all-reduce-region.mlir
    M mlir/test/mlir-cuda-runner/gpu-to-cubin.mlir
    M mlir/tools/mlir-cuda-runner/cuda-runtime-wrappers.cpp

  Log Message:
  -----------
  Change CUDA tests to use print_memref.

Swap dimensions in all-reduce-op test.

PiperOrigin-RevId: 281791744


  Commit: c35378003c64b87e02542187ae583b3fb6623df7
      https://github.com/llvm/llvm-project/commit/c35378003c64b87e02542187ae583b3fb6623df7
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-11-21 (Thu, 21 Nov 2019)

  Changed paths:
    M mlir/lib/TableGen/Operator.cpp
    M mlir/test/lib/TestDialect/TestDialect.cpp
    M mlir/test/lib/TestDialect/TestOps.td
    M mlir/test/mlir-tblgen/op-decl.td
    M mlir/test/mlir-tblgen/pattern.mlir
    M mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp

  Log Message:
  -----------
  Add support for using the ODS result names as the Asm result names for multi-result operations.

This changes changes the OpDefinitionsGen to automatically add the OpAsmOpInterface for operations with multiple result groups using the provided ODS names. We currently just limit the generation to multi-result ops as most single result operations don't have an interesting name(result/output/etc.). An example is shown below:
// The following operation:
def MyOp : ... {
  let results = (outs AnyType:$first, Variadic<AnyType>:$middle, AnyType);
}

// May now be printed as:
%first, %middle:2, %0 = "my.op" ...

PiperOrigin-RevId: 281834156


  Commit: 6755543af5cfdb26e61207701be4579c2054b040
      https://github.com/llvm/llvm-project/commit/6755543af5cfdb26e61207701be4579c2054b040
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2019-11-21 (Thu, 21 Nov 2019)

  Changed paths:
    A mlir/include/mlir/Conversion/LinalgToLLVM/LinalgToLLVM.h
    M mlir/include/mlir/Dialect/Linalg/Passes.h
    M mlir/lib/Conversion/CMakeLists.txt
    A mlir/lib/Conversion/LinalgToLLVM/CMakeLists.txt
    A mlir/lib/Conversion/LinalgToLLVM/LinalgToLLVM.cpp
    M mlir/lib/Dialect/Linalg/CMakeLists.txt
    R mlir/lib/Dialect/Linalg/Transforms/LowerToLLVMDialect.cpp
    M mlir/tools/mlir-opt/CMakeLists.txt

  Log Message:
  -----------
  Move Linalg Transforms that are actually Conversions - NFC

PiperOrigin-RevId: 281844602


  Commit: f7906c921134166ff65aeb491597347e73a65d27
      https://github.com/llvm/llvm-project/commit/f7906c921134166ff65aeb491597347e73a65d27
  Author: Lucy Fox <lucyfox at google.com>
  Date:   2019-11-21 (Thu, 21 Nov 2019)

  Changed paths:
    M mlir/g3doc/Tutorials/Toy/Ch-2.md

  Log Message:
  -----------
  Add more detail about locations in Chapter 2 of tutorial.

Resolves issue 241 (tensorflow/mlir#241).

PiperOrigin-RevId: 281867192


  Commit: 104777d8e6cd66b8817822836eaa4019d2a46210
      https://github.com/llvm/llvm-project/commit/104777d8e6cd66b8817822836eaa4019d2a46210
  Author: Jean-Michel Gorius <jean-michel.gorius at ens-rennes.fr>
  Date:   2019-11-22 (Fri, 22 Nov 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/VectorOps/VectorOps.td
    M mlir/include/mlir/EDSC/Intrinsics.h
    M mlir/lib/Analysis/LoopAnalysis.cpp
    M mlir/lib/Analysis/VectorAnalysis.cpp
    M mlir/lib/Conversion/VectorConversions/VectorToLLVM.cpp
    M mlir/lib/Conversion/VectorConversions/VectorToLoops.cpp
    M mlir/lib/Conversion/VectorConversions/VectorToVector.cpp
    M mlir/lib/Dialect/VectorOps/VectorOps.cpp
    M mlir/lib/Transforms/MaterializeVectors.cpp
    M mlir/lib/Transforms/Vectorize.cpp

  Log Message:
  -----------
  Unify vector op names with other dialects.

Change vector op names from VectorFooOp to Vector_FooOp and from
vector::VectorFooOp to vector::FooOp.

Closes tensorflow/mlir#257

COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/257 from Kayjukh:master dfc3a0e04114885aaec8740d5951d6984d6e1577
PiperOrigin-RevId: 281967461


  Commit: 36e8fa84abb3b2827327d0461c6fb3212e44720b
      https://github.com/llvm/llvm-project/commit/36e8fa84abb3b2827327d0461c6fb3212e44720b
  Author: Lucy Fox <lucyfox at google.com>
  Date:   2019-11-22 (Fri, 22 Nov 2019)

  Changed paths:
    M mlir/g3doc/Tutorials/Toy/Ch-2.md

  Log Message:
  -----------
  Small formatting fix in Tutorial Ch2.

PiperOrigin-RevId: 281998069


  Commit: 6db8530c26c82131d320f2465e67d6b6c95d77e0
      https://github.com/llvm/llvm-project/commit/6db8530c26c82131d320f2465e67d6b6c95d77e0
  Author: Mahesh Ravishankar <ravishankarm at google.com>
  Date:   2019-11-22 (Fri, 22 Nov 2019)

  Changed paths:
    M mlir/lib/Dialect/StandardOps/Ops.cpp
    M mlir/test/Transforms/canonicalize.mlir

  Log Message:
  -----------
  Add more canonicalizations for SubViewOp.

Depending on which of the offsets, sizes, or strides are constant, the
subview op can be canonicalized in different ways. Add such
canonicalizations, which generalize the existing approach of
canonicalizing subview op only if all of offsets, sizes and shapes are
constants.

PiperOrigin-RevId: 282010703


  Commit: a5cda4763f48e62fb9b477bd67c0b4751b266299
      https://github.com/llvm/llvm-project/commit/a5cda4763f48e62fb9b477bd67c0b4751b266299
  Author: Denis Khalikov <khalikov.denis at huawei.com>
  Date:   2019-11-22 (Fri, 22 Nov 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/SPIRV/SPIRVLogicalOps.td
    M mlir/lib/Dialect/SPIRV/SPIRVOps.cpp
    M mlir/test/Dialect/SPIRV/arithmetic-ops.mlir
    M mlir/test/Dialect/SPIRV/canonicalize.mlir
    M mlir/test/Dialect/SPIRV/logical-ops.mlir

  Log Message:
  -----------
  [spirv] Add a canonicalizer for `spirv::LogicalNotOp`.

Add a canonicalizer for `spirv::LogicalNotOp`.
Converts:
* spv.LogicalNot(spv.IEqual(...)) -> spv.INotEqual(...)
* spv.LogicalNot(spv.INotEqual(...)) -> spv.IEqual(...)
* spv.LogicalNot(spv.LogicalEqual(...)) -> spv.LogicalNotEqual(...)
* spv.LogicalNot(spv.LogicalNotEqual(...)) -> spv.LogicalEqual(...)

Also moved the test for spv.IMul to arithemtic tests.

Closes tensorflow/mlir#256

COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/256 from denis0x0D:sandbox/canon_logical_not 76ab5787b2c777f948c8978db061d99e76453d44
PiperOrigin-RevId: 282012356


  Commit: 9a62ec8c965ccdd459a7c5ba48d387d9207d9820
      https://github.com/llvm/llvm-project/commit/9a62ec8c965ccdd459a7c5ba48d387d9207d9820
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2019-11-22 (Fri, 22 Nov 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/Linalg/Transforms/LinalgTransforms.h
    M mlir/lib/Dialect/Linalg/Transforms/LinalgTransforms.cpp

  Log Message:
  -----------
  Fix Windows Build

PiperOrigin-RevId: 282048102


  Commit: b8ee5634491e3b3b0a52dd50ccd44103c918d3fe
      https://github.com/llvm/llvm-project/commit/b8ee5634491e3b3b0a52dd50ccd44103c918d3fe
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-11-22 (Fri, 22 Nov 2019)

  Changed paths:
    M mlir/examples/toy/Ch2/include/toy/Ops.td
    M mlir/examples/toy/Ch3/include/toy/Ops.td
    M mlir/examples/toy/Ch3/mlir/ToyCombine.td
    M mlir/examples/toy/Ch4/include/toy/Ops.td
    M mlir/examples/toy/Ch4/include/toy/ShapeInferenceInterface.td
    M mlir/examples/toy/Ch4/mlir/ToyCombine.td
    M mlir/examples/toy/Ch5/include/toy/Ops.td
    M mlir/examples/toy/Ch5/include/toy/ShapeInferenceInterface.td
    M mlir/examples/toy/Ch5/mlir/ToyCombine.td
    M mlir/examples/toy/Ch6/include/toy/Ops.td
    M mlir/examples/toy/Ch6/include/toy/ShapeInferenceInterface.td
    M mlir/examples/toy/Ch6/mlir/ToyCombine.td
    M mlir/examples/toy/Ch7/include/toy/Ops.td
    M mlir/examples/toy/Ch7/include/toy/ShapeInferenceInterface.td
    M mlir/examples/toy/Ch7/mlir/ToyCombine.td
    M mlir/include/mlir/Analysis/CallInterfaces.td
    M mlir/include/mlir/Analysis/InferTypeOpInterface.td
    M mlir/include/mlir/Dialect/AffineOps/AffineOps.td
    M mlir/include/mlir/Dialect/AffineOps/AffineOpsBase.td
    M mlir/include/mlir/Dialect/FxpMathOps/FxpMathOps.td
    M mlir/include/mlir/Dialect/GPU/GPUOps.td
    M mlir/include/mlir/Dialect/LLVMIR/LLVMOpBase.td
    M mlir/include/mlir/Dialect/Linalg/IR/LinalgBase.td
    M mlir/include/mlir/Dialect/Linalg/IR/LinalgLibraryOps.td
    M mlir/include/mlir/Dialect/Linalg/IR/LinalgOps.td
    M mlir/include/mlir/Dialect/Linalg/Transforms/LinalgTransformPatterns.td
    M mlir/include/mlir/Dialect/LoopOps/LoopOps.td
    M mlir/include/mlir/Dialect/QuantOps/QuantOps.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVArithmeticOps.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVBase.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVBitOps.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVCastOps.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVControlFlowOps.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVGLSLOps.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVLogicalOps.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVOps.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVStructureOps.td
    M mlir/include/mlir/Dialect/StandardOps/Ops.td
    M mlir/include/mlir/Dialect/VectorOps/VectorOps.td
    M mlir/include/mlir/IR/OpAsmInterface.td
    M mlir/include/mlir/Transforms/LoopLikeInterface.td
    M mlir/lib/Conversion/GPUToNVVM/GPUToNVVM.td
    M mlir/lib/Conversion/StandardToSPIRV/StandardToSPIRV.td
    M mlir/test/lib/DeclarativeTransforms/TestLinalgTransformPatterns.td
    M mlir/test/mlir-tblgen/reference-impl.td

  Log Message:
  -----------
  NFC: Remove unnecessarily guarded tablegen includes.

Support for including a file multiple times was added in tablegen, removing the need for these extra guards. This is because we already insert c/c++ style header guards within each of the specific .td files.

PiperOrigin-RevId: 282076728


  Commit: 6a101671b040f59b1fe2ae00244c08b20f2766d5
      https://github.com/llvm/llvm-project/commit/6a101671b040f59b1fe2ae00244c08b20f2766d5
  Author: Uday Bondhugula <uday at polymagelabs.com>
  Date:   2019-11-22 (Fri, 22 Nov 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/AffineOps/AffineOps.h
    M mlir/include/mlir/Dialect/StandardOps/Ops.td
    M mlir/include/mlir/IR/StandardTypes.h
    M mlir/lib/Analysis/AffineStructures.cpp
    M mlir/lib/Dialect/AffineOps/AffineOps.cpp
    M mlir/lib/IR/StandardTypes.cpp
    M mlir/test/AffineOps/ops.mlir

  Log Message:
  -----------
  Make isValidSymbol more powerful

The check in isValidSymbol, as far as a DimOp result went, checked if
the dim op was on a top-level memref. However, any alloc'ed, view, or
subview memref would be fine as long as the corresponding dimension of
that memref is either a static one or was in turn created using a valid
symbol in the case of dynamic dimensions.

Reported-by: Jose Gomez

Signed-off-by: Uday Bondhugula <uday at polymagelabs.com>

Closes tensorflow/mlir#252

COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/252 from bondhugula:symbol 7b57dc394df9375e651f497231c6e4525a32a662
PiperOrigin-RevId: 282097114


  Commit: aaafeac89b4fe8f0637f5dfca04b98e2f8bdf85c
      https://github.com/llvm/llvm-project/commit/aaafeac89b4fe8f0637f5dfca04b98e2f8bdf85c
  Author: Lei Zhang <antiagainst at google.com>
  Date:   2019-11-23 (Sat, 23 Nov 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/SPIRV/SPIRVLowering.h
    A mlir/test/Conversion/GPUToSPIRV/load-store.mlir
    R mlir/test/Conversion/GPUToSPIRV/load_store.mlir
    R mlir/test/Conversion/StandardToSPIRV/op_conversion.mlir
    A mlir/test/Conversion/StandardToSPIRV/std-to-spirv.mlir

  Log Message:
  -----------
  [spirv] NFC: rename test files and sort tests inside

PiperOrigin-RevId: 282132339


  Commit: ae821fe626666ce21efb4a3c5de0adf8ac553493
      https://github.com/llvm/llvm-project/commit/ae821fe626666ce21efb4a3c5de0adf8ac553493
  Author: Lei Zhang <antiagainst at google.com>
  Date:   2019-11-23 (Sat, 23 Nov 2019)

  Changed paths:
    M mlir/lib/Dialect/SPIRV/CMakeLists.txt
    A mlir/lib/Dialect/SPIRV/SPIRVCanonicalization.td
    M mlir/lib/Dialect/SPIRV/SPIRVOps.cpp

  Log Message:
  -----------
  NFC: Wire up DRR settings for SPIR-V canonicalization patterns

This CL added necessary files and settings for using DRR to
write SPIR-V canonicalization patterns and also converted the
patterns for spv.Bitcast and spv.LogicalNot.

PiperOrigin-RevId: 282132786


  Commit: d2284f1f0ba937ed0da8996957eb3e4557243f64
      https://github.com/llvm/llvm-project/commit/d2284f1f0ba937ed0da8996957eb3e4557243f64
  Author: Ben Vanik <benvanik at google.com>
  Date:   2019-11-24 (Sun, 24 Nov 2019)

  Changed paths:
    M mlir/lib/Dialect/StandardOps/Ops.cpp
    M mlir/test/Transforms/constant-fold.mlir

  Log Message:
  -----------
  Support folding of StandardOps with DenseElementsAttr.

PiperOrigin-RevId: 282270243


  Commit: bf4692dc49728f9baaff5ed25a00a46b43988875
      https://github.com/llvm/llvm-project/commit/bf4692dc49728f9baaff5ed25a00a46b43988875
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2019-11-25 (Mon, 25 Nov 2019)

  Changed paths:
    M mlir/g3doc/Dialects/GPU.md
    M mlir/include/mlir/Dialect/GPU/GPUDialect.h
    M mlir/include/mlir/IR/FunctionSupport.h
    M mlir/lib/Dialect/GPU/IR/GPUDialect.cpp
    M mlir/lib/IR/FunctionSupport.cpp
    M mlir/test/Dialect/GPU/invalid.mlir
    M mlir/test/Dialect/GPU/ops.mlir

  Log Message:
  -----------
  Introduce gpu.func

Introduce a new function-like operation to the GPU dialect to provide a
placeholder for the execution semantic description and to add support for GPU
memory hierarchy.  This aligns with the overall goal of the dialect to expose
the common abstraction layer for GPU devices, in particular by providing an
MLIR unit of semantics (i.e. an operation) for memory modeling.

This proposal has been discussed in the mailing list:
https://groups.google.com/a/tensorflow.org/d/msg/mlir/RfXNP7Hklsc/MBNN7KhjAgAJ
As decided, the "convergence" aspect of the execution model will be factored
out into a new discussion and therefore is not included in this commit. This
commit only introduces the operation but does not hook it up with the remaining
flow. The intention is to develop the new flow while keeping the old flow
operational and do the switch in a simple, separately reversible commit.

PiperOrigin-RevId: 282357599


  Commit: 01145544aad4df7c5f5dcaff2631ef00a01800ce
      https://github.com/llvm/llvm-project/commit/01145544aad4df7c5f5dcaff2631ef00a01800ce
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2019-11-25 (Mon, 25 Nov 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/VectorOps/VectorOps.td
    M mlir/include/mlir/IR/OpBase.td
    M mlir/lib/Dialect/VectorOps/VectorOps.cpp
    M mlir/test/Dialect/VectorOps/invalid.mlir
    M mlir/test/Dialect/VectorOps/ops.mlir

  Log Message:
  -----------
  Add vector.insertelement op

This is the counterpart of vector.extractelement op and has the same
limitations at the moment (static I64IntegerArrayAttr to express position).
This restriction will be filterd in the future.
LLVM lowering will be added in a subsequent commit.

PiperOrigin-RevId: 282365760


  Commit: 1ea231bd39eaac77195b7d896d8fb8d7cd76d218
      https://github.com/llvm/llvm-project/commit/1ea231bd39eaac77195b7d896d8fb8d7cd76d218
  Author: Mahesh Ravishankar <ravishankarm at google.com>
  Date:   2019-11-25 (Mon, 25 Nov 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/StandardOps/Ops.td
    M mlir/lib/Dialect/StandardOps/Ops.cpp
    M mlir/test/IR/core-ops.mlir
    M mlir/test/IR/invalid-ops.mlir

  Log Message:
  -----------
  Allow memref_cast from static strides to dynamic strides.

Memref_cast supports cast from static shape to dynamic shape
memrefs. The same should be true for strides as well, i.e a memref
with static strides can be casted to a memref with dynamic strides.

PiperOrigin-RevId: 282381862


  Commit: bd485afda03132488cffa3c5729c9a37a39450e1
      https://github.com/llvm/llvm-project/commit/bd485afda03132488cffa3c5729c9a37a39450e1
  Author: Mahesh Ravishankar <ravishankarm at google.com>
  Date:   2019-11-25 (Mon, 25 Nov 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/SPIRV/LayoutUtils.h
    M mlir/include/mlir/Dialect/SPIRV/Passes.h
    M mlir/include/mlir/Dialect/SPIRV/SPIRVLowering.h
    A mlir/include/mlir/Dialect/SPIRV/SPIRVLowering.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVStructureOps.td
    M mlir/include/mlir/IR/OpBase.td
    M mlir/lib/Conversion/GPUToSPIRV/ConvertGPUToSPIRV.cpp
    M mlir/lib/Conversion/GPUToSPIRV/ConvertGPUToSPIRVPass.cpp
    M mlir/lib/Conversion/StandardToSPIRV/ConvertStandardToSPIRV.cpp
    M mlir/lib/Conversion/StandardToSPIRV/ConvertStandardToSPIRVPass.cpp
    M mlir/lib/Dialect/SPIRV/LayoutUtils.cpp
    M mlir/lib/Dialect/SPIRV/SPIRVLowering.cpp
    M mlir/lib/Dialect/SPIRV/SPIRVOps.cpp
    M mlir/lib/Dialect/SPIRV/SPIRVTypes.cpp
    M mlir/lib/Dialect/SPIRV/Transforms/CMakeLists.txt
    A mlir/lib/Dialect/SPIRV/Transforms/LowerABIAttributesPass.cpp
    M mlir/lib/Transforms/DialectConversion.cpp
    M mlir/test/Conversion/GPUToSPIRV/load-store.mlir
    M mlir/test/Conversion/GPUToSPIRV/simple.mlir
    A mlir/test/Dialect/SPIRV/Transforms/abi-load-store.mlir
    A mlir/test/Dialect/SPIRV/Transforms/abi-simple.mlir

  Log Message:
  -----------
  Introduce attributes that specify the final ABI for a spirv::ModuleOp.

To simplify the lowering into SPIR-V, while still respecting the ABI
requirements of SPIR-V/Vulkan, split the process into two
1) While lowering a function to SPIR-V (when the function is an entry
   point function), allow specifying attributes on arguments and
   function itself that describe the ABI of the function.
2) Add a pass that materializes the ABI described in the function.

Two attributes are needed.
1) Attribute on arguments of the entry point function that describe
   the descriptor_set, binding, storage class, etc, of the
   spv.globalVariable this argument will be replaced by
2) Attribute on function that specifies workgroup size, etc. (for now
   only workgroup size).

Add the pass -spirv-lower-abi-attrs to materialize the ABI described
by the attributes.

This change makes the SPIRVBasicTypeConverter class unnecessary and is
removed, further simplifying the SPIR-V lowering path.

PiperOrigin-RevId: 282387587


  Commit: 9b6e6cef68dc07934fee8b80a05c37a110a58229
      https://github.com/llvm/llvm-project/commit/9b6e6cef68dc07934fee8b80a05c37a110a58229
  Author: Lei Zhang <antiagainst at google.com>
  Date:   2019-11-25 (Mon, 25 Nov 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVBase.td
    M mlir/include/mlir/IR/OpBase.td
    M mlir/test/lib/TestDialect/CMakeLists.txt
    M mlir/test/lib/TestDialect/TestDialect.cpp
    M mlir/test/lib/TestDialect/TestDialect.h
    M mlir/test/lib/TestDialect/TestOps.td
    M mlir/utils/spirv/gen_spirv_dialect.py

  Log Message:
  -----------
  De-duplicate EnumAttr overrides by defining defaults

EnumAttr should provide meaningful defaults so concrete instances
do not need to duplicate the fields.

PiperOrigin-RevId: 282398431


  Commit: d60133f89bb08341718bb3132b19bc891f7d4f4d
      https://github.com/llvm/llvm-project/commit/d60133f89bb08341718bb3132b19bc891f7d4f4d
  Author: Christian Sigg <csigg at google.com>
  Date:   2019-11-25 (Mon, 25 Nov 2019)

  Changed paths:
    M mlir/test/CMakeLists.txt
    M mlir/test/lit.cfg.py
    M mlir/test/lit.site.cfg.py.in
    M mlir/test/mlir-cpu-runner/linalg_integration_test.mlir
    M mlir/test/mlir-cpu-runner/utils.mlir
    M mlir/test/mlir-cuda-runner/all-reduce-op.mlir
    M mlir/test/mlir-cuda-runner/all-reduce-region.mlir
    M mlir/test/mlir-cuda-runner/gpu-to-cubin.mlir

  Log Message:
  -----------
  Changing directory shortcut for CPU/GPU runner utils.

Moving cuda-runtime-wrappers.so into subdirectory to match libmlir_runner_utils.so.
Provide parent directory when running test and load .so from subdirectory.

PiperOrigin-RevId: 282410749


  Commit: 8fc44a4d1364a73671e21b500228f605656b0907
      https://github.com/llvm/llvm-project/commit/8fc44a4d1364a73671e21b500228f605656b0907
  Author: Andy Davis <andydavis at google.com>
  Date:   2019-11-25 (Mon, 25 Nov 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/VectorOps/VectorOps.td
    M mlir/lib/Dialect/VectorOps/VectorOps.cpp
    M mlir/test/Dialect/VectorOps/invalid.mlir
    M mlir/test/Dialect/VectorOps/ops.mlir

  Log Message:
  -----------
  Update VectorContractionOp to take iterator types and index mapping attributes compatible with linalg ops.

PiperOrigin-RevId: 282412311


  Commit: 7fd46bf258e8d256a295426548826e03decb6552
      https://github.com/llvm/llvm-project/commit/7fd46bf258e8d256a295426548826e03decb6552
  Author: Mahesh Ravishankar <ravishankarm at google.com>
  Date:   2019-11-25 (Mon, 25 Nov 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/SPIRV/CMakeLists.txt
    M mlir/lib/Dialect/SPIRV/CMakeLists.txt

  Log Message:
  -----------
  Add missing rule to generate SPIR-V ABI Attribute using tblgen to CMake.

PiperOrigin-RevId: 282415592


  Commit: f87b2fd41bcc92922be2dec7cb87238b12194a2a
      https://github.com/llvm/llvm-project/commit/f87b2fd41bcc92922be2dec7cb87238b12194a2a
  Author: Mahesh Ravishankar <ravishankarm at google.com>
  Date:   2019-11-25 (Mon, 25 Nov 2019)

  Changed paths:
    M mlir/lib/Conversion/GPUToSPIRV/ConvertGPUToSPIRVPass.cpp

  Log Message:
  -----------
  NFC: Actually expose the implementation of createGPUToSPIRVLoweringPass.

A mismatch in the function declaration and function definition,
prevented the implementation of the createGPUToSPIRVLoweringPass from
being exposed.

PiperOrigin-RevId: 282419815


  Commit: 38d7870ee537e21847ec4a67c725f2321e785024
      https://github.com/llvm/llvm-project/commit/38d7870ee537e21847ec4a67c725f2321e785024
  Author: Ben Vanik <benvanik at google.com>
  Date:   2019-11-25 (Mon, 25 Nov 2019)

  Changed paths:
    M mlir/lib/Dialect/StandardOps/Ops.cpp
    M mlir/test/Transforms/constant-fold.mlir

  Log Message:
  -----------
  Make std.divis and std.diviu support ElementsAttr folding.

PiperOrigin-RevId: 282434465


  Commit: 1012c492f0ea6170eb94e2bd5c353340588a4925
      https://github.com/llvm/llvm-project/commit/1012c492f0ea6170eb94e2bd5c353340588a4925
  Author: MLIR Team <no-reply at google.com>
  Date:   2019-11-25 (Mon, 25 Nov 2019)

  Changed paths:
    M mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
    M mlir/test/Conversion/StandardToLLVM/convert-to-llvmir.mlir
    M mlir/test/Conversion/VectorConversions/vector-to-llvm.mlir
    M mlir/test/Dialect/LLVMIR/invalid.mlir
    M mlir/test/Dialect/LLVMIR/roundtrip.mlir
    M mlir/test/Target/llvmir.mlir

  Log Message:
  -----------
  Allow LLVM::ExtractElementOp to have non-i32 indices.

Also change the text format a bit, so that indices are braced by squares.

PiperOrigin-RevId: 282437095


  Commit: 36469f7d2a6b14582eb18e860d61c2aa2c329e49
      https://github.com/llvm/llvm-project/commit/36469f7d2a6b14582eb18e860d61c2aa2c329e49
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2019-11-25 (Mon, 25 Nov 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/VectorOps/VectorOps.td
    M mlir/lib/Dialect/VectorOps/VectorOps.cpp
    M mlir/test/Dialect/VectorOps/invalid.mlir
    M mlir/test/Dialect/VectorOps/ops.mlir

  Log Message:
  -----------
  Add a vector.InsertStridedSliceOp

This new op is the counterpart of vector.StridedSliceOp and will be used for in the pattern rewrites for vector unrolling.

PiperOrigin-RevId: 282447414


  Commit: 174076a1572047cf7945199ec5e7507d61f64e65
      https://github.com/llvm/llvm-project/commit/174076a1572047cf7945199ec5e7507d61f64e65
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2019-11-25 (Mon, 25 Nov 2019)

  Changed paths:
    M mlir/lib/Conversion/VectorConversions/VectorToVector.cpp
    M mlir/lib/Dialect/VectorOps/VectorOps.cpp
    M mlir/test/Conversion/VectorConversions/vector-to-vector.mlir

  Log Message:
  -----------
  Use vector.InsertStridedSlice in Vector -> Vector unrolling

This CL uses the recently added op to finish the implementation of Vector -> Vector unrolling by replacing the "fake join op" by a series of InsertStridedSliceOp.

Test is updated accordingly

PiperOrigin-RevId: 282451126


  Commit: 13c6e419ca68cd4a5434f4349db5433395e6fbf0
      https://github.com/llvm/llvm-project/commit/13c6e419ca68cd4a5434f4349db5433395e6fbf0
  Author: Lei Zhang <antiagainst at google.com>
  Date:   2019-11-25 (Mon, 25 Nov 2019)

  Changed paths:
    M mlir/include/mlir/IR/OpBase.td
    M mlir/include/mlir/IR/OpDefinition.h
    M mlir/include/mlir/TableGen/Operator.h
    M mlir/lib/IR/Operation.cpp
    M mlir/lib/TableGen/Operator.cpp
    M mlir/test/IR/traits.mlir
    M mlir/test/lib/TestDialect/TestOps.td
    M mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
    M mlir/tools/mlir-tblgen/RewriterGen.cpp

  Log Message:
  -----------
  Add support for AttrSizedOperandSegments/AttrSizedResultSegments

Certain operations can have multiple variadic operands and their size
relationship is not always known statically. For such cases, we need
a per-op-instance specification to divide the operands into logical
groups or segments. This can be modeled by attributes.

This CL introduces C++ trait AttrSizedOperandSegments for operands and
AttrSizedResultSegments for results. The C++ trait just guarantees
such size attribute has the correct type (1D vector) and values
(non-negative), etc. It serves as the basis for ODS sugaring that
with ODS argument declarations we can further verify the number of
elements match the number of ODS-declared operands and we can generate
handy getter methods.

PiperOrigin-RevId: 282467075


  Commit: a50f871e8da8e896a51c13336b7a367c69b1ab48
      https://github.com/llvm/llvm-project/commit/a50f871e8da8e896a51c13336b7a367c69b1ab48
  Author: Andrew Anderson <andrew.wja at gmail.com>
  Date:   2019-11-25 (Mon, 25 Nov 2019)

  Changed paths:
    M mlir/g3doc/LangRef.md

  Log Message:
  -----------
  Some minor corrections and improvements to LangRef

Some productions in the LangRef were using undefined terminals and non-terminals, which have been added to the EBNF.
The dialect type and dialect attribute productions matched precisely the same structure and have been deduplicated.
The production for ssa-id was ambiguous but the fix is trivial (merging the leading '%') and has been applied.

Closes tensorflow/mlir#265

PiperOrigin-RevId: 282470892


  Commit: 109338085d7bae03f46e4c7011154a6e312aa319
      https://github.com/llvm/llvm-project/commit/109338085d7bae03f46e4c7011154a6e312aa319
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2019-11-26 (Tue, 26 Nov 2019)

  Changed paths:
    M mlir/lib/Dialect/AffineOps/AffineOps.cpp
    M mlir/test/AffineOps/invalid.mlir

  Log Message:
  -----------
  Relax restriction on affine_apply dim and symbol operands

The affine_apply operation is currently "doubly" affine and conflates two things:
1. it applies an affine map to a list of values of type `index` that are defined as either dim or symbol
2. it restricts (and propagates constraints on) the provenance of dims and symbols to a small subset of ops for which more restrictive polyhedral constraints apply.

Point 2. is related to the ability to form so-called static control parts and is related to dependence analysis and legality of transformations.

Point 1. however is completely independent, the only local implication of dims and symbol for affine_apply is that dims compose while symbols concatenate as well as the structural constraint that dims may not be multiplied.

The properties of composition and canonicalization in affine_apply are more generally useful. This CL relaxes the verifier on affine_apply so it can be used more generally.

The relevant affine.for/if/load/store op verifiers already implement the dim and symbol checking.

See this thread for the related discussion: https://groups.google.com/a/tensorflow.org/g/mlir/c/HkwCbV8D9N0/m/8srUNrX6CAAJ

PiperOrigin-RevId: 282562517


  Commit: 9059cf392d5464b88f1b094f211873e5c5279d71
      https://github.com/llvm/llvm-project/commit/9059cf392d5464b88f1b094f211873e5c5279d71
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2019-11-26 (Tue, 26 Nov 2019)

  Changed paths:
    M mlir/test/CMakeLists.txt
    M mlir/test/lit.cfg.py
    M mlir/test/lit.site.cfg.py.in
    M mlir/test/mlir-cpu-runner/linalg_integration_test.mlir
    M mlir/test/mlir-cpu-runner/utils.mlir
    M mlir/test/mlir-cuda-runner/all-reduce-op.mlir
    M mlir/test/mlir-cuda-runner/all-reduce-region.mlir
    M mlir/test/mlir-cuda-runner/gpu-to-cubin.mlir

  Log Message:
  -----------
  Automated rollback of commit d60133f89bb08341718bb3132b19bc891f7d4f4d

PiperOrigin-RevId: 282574110


  Commit: 03620fa70ad2a16c294c45a131aea305f134ef27
      https://github.com/llvm/llvm-project/commit/03620fa70ad2a16c294c45a131aea305f134ef27
  Author: Mahesh Ravishankar <ravishankarm at google.com>
  Date:   2019-11-26 (Tue, 26 Nov 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/SPIRV/SPIRVLowering.h
    M mlir/lib/Conversion/StandardToSPIRV/ConvertStandardToSPIRV.cpp
    M mlir/lib/Conversion/StandardToSPIRV/ConvertStandardToSPIRVPass.cpp
    M mlir/lib/Dialect/SPIRV/SPIRVLowering.cpp
    M mlir/lib/Dialect/SPIRV/Transforms/LowerABIAttributesPass.cpp
    M mlir/test/Conversion/GPUToSPIRV/load-store.mlir
    M mlir/test/Conversion/GPUToSPIRV/loop.mlir
    M mlir/test/Conversion/GPUToSPIRV/simple.mlir
    M mlir/test/Dialect/SPIRV/Transforms/abi-load-store.mlir
    M mlir/test/Dialect/SPIRV/Transforms/abi-simple.mlir

  Log Message:
  -----------
  Misc changes to lowering to SPIR-V.

These changes to SPIR-V lowering while adding support for lowering
SUbViewOp, but are not directly related.
- Change the lowering of MemRefType to
  !spv.ptr<!spv.struct<!spv.array<...>[offset]>, ..>
  This is consistent with the Vulkan spec.
- To enable testing a simple pattern of lowering functions is added to
  ConvertStandardToSPIRVPass. This is just used to convert the type of
  the arguments of the function. The added function lowering itself is
  not meant to be the way functions are eventually lowered into SPIR-V
  dialect.

PiperOrigin-RevId: 282589644


  Commit: 18aec3e2e5b6ded304ff2a12f807bc2ace1b3a4b
      https://github.com/llvm/llvm-project/commit/18aec3e2e5b6ded304ff2a12f807bc2ace1b3a4b
  Author: David Truby <david.truby at gmail.com>
  Date:   2019-11-26 (Tue, 26 Nov 2019)

  Changed paths:
    M mlir/include/mlir/IR/DialectSymbolRegistry.def

  Log Message:
  -----------
  Add OpenMP dialect to the dialect registry

Closes tensorflow/mlir#244

COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/244 from DavidTruby:openmp 30e2638ee678188575dd5aeb3f7fa51d93369f5f
PiperOrigin-RevId: 282607397


  Commit: cf97263cb8cd4f6f21f00eabb9d6a007e221eaab
      https://github.com/llvm/llvm-project/commit/cf97263cb8cd4f6f21f00eabb9d6a007e221eaab
  Author: Aart Bik <ajcbik at google.com>
  Date:   2019-11-26 (Tue, 26 Nov 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/VectorOps/VectorOps.td
    M mlir/lib/Dialect/VectorOps/VectorOps.cpp
    M mlir/test/Dialect/VectorOps/invalid.mlir
    M mlir/test/Dialect/VectorOps/ops.mlir

  Log Message:
  -----------
  [VectorOps] Add a BroadcastOp to the VectorOps dialect

PiperOrigin-RevId: 282643305


  Commit: f27ceb726188d0b16c979fddf644e33886139006
      https://github.com/llvm/llvm-project/commit/f27ceb726188d0b16c979fddf644e33886139006
  Author: Jacques Pienaar <jpienaar at google.com>
  Date:   2019-11-26 (Tue, 26 Nov 2019)

  Changed paths:
    M mlir/include/mlir/IR/Operation.h
    M mlir/lib/IR/Operation.cpp

  Log Message:
  -----------
  Add create method that takes equivalent of OperationState with NamedAttributeList

This method is close to creating an OperationState first and then unpacking it
but avoids creating the OperationState and takes a NamedAttributeList for
attributes rather than array of NamedAttribute (to enable reusing an already
created NamedAttributeList).

Reuse this new method via create that takes OperationState. I'll update inferReturnTypes in follow up to also take NamedAttributeList and so a build method that uses both inferReturnTypes and create can reuse the same list.

PiperOrigin-RevId: 282651642


  Commit: e2232fbcee8a4bf4e2a6ab181f8fabb57633dda6
      https://github.com/llvm/llvm-project/commit/e2232fbcee8a4bf4e2a6ab181f8fabb57633dda6
  Author: Aart Bik <ajcbik at google.com>
  Date:   2019-11-26 (Tue, 26 Nov 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/VectorOps/VectorOps.td
    M mlir/lib/Dialect/VectorOps/VectorOps.cpp
    M mlir/test/Dialect/VectorOps/invalid.mlir
    M mlir/test/Dialect/VectorOps/ops.mlir

  Log Message:
  -----------
  [VectorOps] Refine BroadcastOp in VectorOps dialect

Since second argument is always fully overwritten and
shape is define in "to" clause, it is not needed.
Also renamed "into" to "to" now that arg is dropped.

PiperOrigin-RevId: 282686475


  Commit: 1fa8c8070b813c0ed3cd5e0fb844bd1ffa343529
      https://github.com/llvm/llvm-project/commit/1fa8c8070b813c0ed3cd5e0fb844bd1ffa343529
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2019-11-27 (Wed, 27 Nov 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/Linalg/Passes.h
    M mlir/include/mlir/Dialect/Linalg/Transforms/LinalgTransformPatterns.td
    M mlir/include/mlir/Dialect/Linalg/Transforms/LinalgTransforms.h
    M mlir/lib/Dialect/Linalg/CMakeLists.txt
    A mlir/lib/Dialect/Linalg/Transforms/LinalgToLoops.cpp
    R mlir/lib/Dialect/Linalg/Transforms/LowerToLoops.cpp
    M mlir/test/Dialect/Linalg/llvm.mlir
    M mlir/test/Dialect/Linalg/loops.mlir
    M mlir/test/Dialect/Linalg/transform-patterns.mlir
    M mlir/test/lib/DeclarativeTransforms/TestLinalgTransformPatterns.td
    M mlir/test/mlir-cpu-runner/linalg_integration_test.mlir
    M mlir/test/mlir-cpu-runner/utils.mlir

  Log Message:
  -----------
  Implement Linalg to loops lowering as a pattern

This CL rewrites the linalg ops to loops transformations as patterns that can be targeted directly from Tablegen. Reliance on OpFolder is removed and to cope with it we introduce local folding patterns that are applied greedily.

PiperOrigin-RevId: 282765550


  Commit: 9f89c34f4b8b6333744bd988e67bc6a18ccee83f
      https://github.com/llvm/llvm-project/commit/9f89c34f4b8b6333744bd988e67bc6a18ccee83f
  Author: Aart Bik <ajcbik at google.com>
  Date:   2019-11-27 (Wed, 27 Nov 2019)

  Changed paths:
    M mlir/g3doc/Tutorials/Toy/Ch-1.md
    M mlir/test/Examples/Toy/Ch1/ast.toy
    M mlir/test/Examples/Toy/Ch2/ast.toy
    M mlir/test/Examples/Toy/Ch3/ast.toy
    M mlir/test/Examples/Toy/Ch4/ast.toy
    M mlir/test/Examples/Toy/Ch5/ast.toy
    M mlir/test/Examples/Toy/Ch6/ast.toy
    M mlir/test/Examples/Toy/Ch7/ast.toy

  Log Message:
  -----------
  Fixed typo in Toy tutorial (second var e -> var f)

PiperOrigin-RevId: 282810649


  Commit: d4e4387fbfde164c9655bc882d4102c321368d97
      https://github.com/llvm/llvm-project/commit/d4e4387fbfde164c9655bc882d4102c321368d97
  Author: Lei Zhang <antiagainst at google.com>
  Date:   2019-11-27 (Wed, 27 Nov 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/SPIRV/SPIRVArithmeticOps.td
    M mlir/lib/Dialect/SPIRV/SPIRVOps.cpp
    M mlir/test/Dialect/SPIRV/canonicalize.mlir

  Log Message:
  -----------
  [spirv] Add folders for spv.IAdd and spv.IMul

Adding zero and multiplying one can be common when generating code
for index calculation.

This CL also sorted canonicalize.mlir to alphabetical order.

PiperOrigin-RevId: 282828055


  Commit: a4d7650230d6c7ad57866cc2904f4f6a56e61a08
      https://github.com/llvm/llvm-project/commit/a4d7650230d6c7ad57866cc2904f4f6a56e61a08
  Author: Lei Zhang <antiagainst at google.com>
  Date:   2019-11-27 (Wed, 27 Nov 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/SPIRV/SPIRVLowering.h
    M mlir/include/mlir/Dialect/SPIRV/SPIRVOps.h
    M mlir/include/mlir/Dialect/SPIRV/SPIRVStructureOps.td
    M mlir/lib/Conversion/StandardToSPIRV/ConvertStandardToSPIRV.cpp
    M mlir/lib/Dialect/SPIRV/SPIRVOps.cpp
    M mlir/lib/Dialect/SPIRV/Transforms/LowerABIAttributesPass.cpp

  Log Message:
  -----------
  [spirv] NFC: Add getZero() and getOne() static method to ConstantOp

Getting constant zero or one is very common so it merits a special handy
method on spirv::ConstantOp itself.

PiperOrigin-RevId: 282832572


  Commit: 5810efe1f1286bacf5de3c0f6326512f17cf2eec
      https://github.com/llvm/llvm-project/commit/5810efe1f1286bacf5de3c0f6326512f17cf2eec
  Author: Lei Zhang <antiagainst at google.com>
  Date:   2019-11-27 (Wed, 27 Nov 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/SPIRV/SPIRVLowering.h
    M mlir/lib/Dialect/SPIRV/SPIRVLowering.cpp

  Log Message:
  -----------
  NFC: A few cleanups for SPIRVLowering

Updated comments and used static instead of anonymous namspace
to hide functions to be consistent with the existing codebase.

PiperOrigin-RevId: 282847784


  Commit: 0494ef60f71abc09dbeed568ef0c5ee09d292bbb
      https://github.com/llvm/llvm-project/commit/0494ef60f71abc09dbeed568ef0c5ee09d292bbb
  Author: Jose Ignacio Gomez <jigomez at ucm.es>
  Date:   2019-11-28 (Thu, 28 Nov 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/Linalg/IR/LinalgLibraryOps.td
    M mlir/test/Dialect/Linalg/fusion.mlir
    M mlir/test/Dialect/Linalg/invalid.mlir
    M mlir/test/Dialect/Linalg/llvm.mlir
    M mlir/test/Dialect/Linalg/loops.mlir
    M mlir/test/Dialect/Linalg/roundtrip.mlir
    M mlir/test/Dialect/Linalg/tile.mlir
    M mlir/test/Dialect/Linalg/transform-patterns.mlir

  Log Message:
  -----------
  [Linalg] Change attribute n_loop_types to iterator

This addresses issue tensorflow/mlir#270. Linalg is updated to take the same form
of iterator_types than vector contraction.

Closes tensorflow/mlir#280

COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/280 from tetuante:PRissue270 d26d88d090d3765d3b9884bfabdd023143f27287
PiperOrigin-RevId: 282905396


  Commit: 2f16bf7ac9de4d525fda2916e801e23f456d8b82
      https://github.com/llvm/llvm-project/commit/2f16bf7ac9de4d525fda2916e801e23f456d8b82
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2019-11-28 (Thu, 28 Nov 2019)

  Changed paths:
    A mlir/include/mlir/IR/FunctionImplementation.h
    M mlir/include/mlir/IR/FunctionSupport.h
    M mlir/lib/Dialect/GPU/IR/GPUDialect.cpp
    M mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
    M mlir/lib/IR/Function.cpp
    A mlir/lib/IR/FunctionImplementation.cpp
    R mlir/lib/IR/FunctionSupport.cpp

  Log Message:
  -----------
  Split out FunctionLike printing/parsing into FunctionImplementation.{h,cpp}

Helper utilies for parsing and printing FunctionLike Ops are only relevant to
the implementation of the Op, not its definition. They depend on
OpImplementation.h and increase the inclusion footprint of FunctionSupport.h,
and do so only to provide some utilities in the "impl" namespace. Move them to
a separate files, similarly to OpDefinition/OpImplementation distinction, and
make only Op implementations use them while keeping headers cleaner. NFC.

PiperOrigin-RevId: 282964556


  Commit: cd556f25deef446042f018d07cb5bc4581f09e82
      https://github.com/llvm/llvm-project/commit/cd556f25deef446042f018d07cb5bc4581f09e82
  Author: Denis Khalikov <khalikov.denis at huawei.com>
  Date:   2019-11-28 (Thu, 28 Nov 2019)

  Changed paths:
    M mlir/lib/Dialect/SPIRV/SPIRVOps.cpp
    M mlir/test/Dialect/SPIRV/canonicalize.mlir

  Log Message:
  -----------
  [spirv] Check that operand of `spirv::CompositeExtractOp` is constant while folding.

Closes tensorflow/mlir#281

COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/281 from denis0x0D:sandbox/composite_ex_fold d02d73658bd1b9eaa515eb4e0aee34bc41d4252b
PiperOrigin-RevId: 282971563


  Commit: c9721e9a2b36c881cbd2b936e03cb1fbe167c6db
      https://github.com/llvm/llvm-project/commit/c9721e9a2b36c881cbd2b936e03cb1fbe167c6db
  Author: JKIsaacLee <51275047+JKIsaacLee at users.noreply.github.com>
  Date:   2019-11-29 (Fri, 29 Nov 2019)

  Changed paths:
    M mlir/g3doc/Tutorials/Toy/Ch-1.md

  Log Message:
  -----------
  Fixed typo in Ch-1 of Toy tutorial

Closes tensorflow/mlir#282

PiperOrigin-RevId: 283064785


  Commit: 52a74151787a051d8ecb246080314f64cf2a7b61
      https://github.com/llvm/llvm-project/commit/52a74151787a051d8ecb246080314f64cf2a7b61
  Author: Jacques Pienaar <jpienaar at google.com>
  Date:   2019-11-29 (Fri, 29 Nov 2019)

  Changed paths:
    M mlir/include/mlir/IR/Operation.h
    M mlir/lib/IR/Operation.cpp

  Log Message:
  -----------
  Fix redundant convert and use NamedAttributeList as value

* Had leftover call that would result in converting to dictionary attr before
  being implicitedly converted back to NamedAttributeList;
* NamedAttributeList is value typed, so don't use const reference;

PiperOrigin-RevId: 283072576


  Commit: 2235333d5878393ca4d43891184c3f58f71edeb5
      https://github.com/llvm/llvm-project/commit/2235333d5878393ca4d43891184c3f58f71edeb5
  Author: Jacques Pienaar <jpienaar at google.com>
  Date:   2019-11-29 (Fri, 29 Nov 2019)

  Changed paths:
    M mlir/tools/mlir-tblgen/mlir-tblgen.cpp

  Log Message:
  -----------
  mlir-tblgen: Dump input records when no generator is set

Follow LLVM's tblgen convention when no generator is set instead of asserting.

PiperOrigin-RevId: 283073690


  Commit: d5e627f84b440cb4dd30802930629ea970dd4342
      https://github.com/llvm/llvm-project/commit/d5e627f84b440cb4dd30802930629ea970dd4342
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2019-12-02 (Mon, 02 Dec 2019)

  Changed paths:
    M mlir/examples/toy/Ch6/mlir/LowerToLLVM.cpp
    M mlir/examples/toy/Ch7/mlir/LowerToLLVM.cpp
    M mlir/include/mlir/Dialect/LLVMIR/LLVMDialect.h
    M mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
    M mlir/lib/Conversion/GPUToCUDA/ConvertLaunchFuncToCudaCalls.cpp
    M mlir/lib/Conversion/GPUToNVVM/LowerGpuOpsToNVVMOps.cpp
    M mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
    M mlir/lib/Target/LLVMIR/ConvertFromLLVMIR.cpp
    M mlir/lib/Target/LLVMIR/ModuleTranslation.cpp
    M mlir/test/Conversion/GPUToCUDA/lower-launch-func-to-cuda.mlir
    M mlir/test/Dialect/GPU/outlining.mlir
    M mlir/test/Dialect/LLVMIR/global.mlir
    M mlir/test/Target/import.ll
    M mlir/test/Target/llvmir.mlir

  Log Message:
  -----------
  Introduce Linkage attribute to the LLVM dialect

LLVM IR supports linkage on global objects such as global variables and
functions. Introduce the Linkage attribute into the LLVM dialect, backed by an
integer storage. Use this attribute on LLVM::GlobalOp and make it mandatory.
Implement parsing/printing of the attribute and conversion to LLVM IR.

See tensorflow/mlir#277.

PiperOrigin-RevId: 283309328


  Commit: 9630fcbc52dbd83dfa5be7d757a5abd41a30a652
      https://github.com/llvm/llvm-project/commit/9630fcbc52dbd83dfa5be7d757a5abd41a30a652
  Author: Alexander Belyaev <pifon at google.com>
  Date:   2019-12-02 (Mon, 02 Dec 2019)

  Changed paths:
    M mlir/lib/Conversion/LinalgToLLVM/LinalgToLLVM.cpp
    M mlir/test/Dialect/Linalg/llvm.mlir

  Log Message:
  -----------
  Lower linalg.indexed_generic with libcall to LLVM.

PiperOrigin-RevId: 283328994


  Commit: 4231de7897442f7423dae1e8b7fffdd1a69d5b58
      https://github.com/llvm/llvm-project/commit/4231de7897442f7423dae1e8b7fffdd1a69d5b58
  Author: JKIsaacLee <51275047+JKIsaacLee at users.noreply.github.com>
  Date:   2019-12-02 (Mon, 02 Dec 2019)

  Changed paths:
    M mlir/g3doc/Tutorials/Toy/Ch-2.md

  Log Message:
  -----------
  add missing '>' in Ch-2

add missing '>' in Ch-2
(tensor<2x3xf64)->(tensor<2x3xf64>)

Closes tensorflow/mlir#283

COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/283 from JKIsaacLee:patch-1 b69fe8d51e2a540f7efaded159d35b88778ad159
PiperOrigin-RevId: 283333807


  Commit: 0d22a3fdc87cb8e96a73cb427c6621c405c4674e
      https://github.com/llvm/llvm-project/commit/0d22a3fdc87cb8e96a73cb427c6621c405c4674e
  Author: Lei Zhang <antiagainst at google.com>
  Date:   2019-12-02 (Mon, 02 Dec 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/StandardOps/Ops.td
    M mlir/include/mlir/IR/Builders.h
    M mlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp
    M mlir/lib/Dialect/StandardOps/Ops.cpp
    M mlir/lib/IR/Builders.cpp

  Log Message:
  -----------
  NFC: Update std.subview op to use AttrSizedOperandSegments

This turns a few manually written helper methods into auto-generated ones.

PiperOrigin-RevId: 283339617


  Commit: 4982eaf87cf879fe47173ce640f87b7f9f103b73
      https://github.com/llvm/llvm-project/commit/4982eaf87cf879fe47173ce640f87b7f9f103b73
  Author: Lei Zhang <antiagainst at google.com>
  Date:   2019-12-02 (Mon, 02 Dec 2019)

  Changed paths:
    M mlir/g3doc/DeclarativeRewrites.md
    M mlir/lib/TableGen/Pattern.cpp
    M mlir/test/lib/TestDialect/TestOps.td
    M mlir/test/mlir-tblgen/pattern.mlir
    M mlir/tools/mlir-tblgen/RewriterGen.cpp

  Log Message:
  -----------
  [DRR] Introduce `$_` to ignore op argument match

Right now op argument matching in DRR is position-based, meaning we need to
specify N arguments for an op with N ODS-declared argument. This can be annoying
when we don't want to capture all the arguments. `$_` is to remedy the situation.

PiperOrigin-RevId: 283339992


  Commit: da3b305e7f126fa8f15f1fd493d01da69f9ccbb5
      https://github.com/llvm/llvm-project/commit/da3b305e7f126fa8f15f1fd493d01da69f9ccbb5
  Author: Denis Khalikov <khalikov.denis at huawei.com>
  Date:   2019-12-02 (Mon, 02 Dec 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/StandardOps/Ops.td

  Log Message:
  -----------
  Add missing `>` to the description of std.view.

Closes tensorflow/mlir#266

COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/266 from denis0x0D:sandbox/miss_char a5f662e1bf103b5009da67d045ee2fcebf822ab0
PiperOrigin-RevId: 283340486


  Commit: e7c8e542f41436861e452c3e65954424aca09102
      https://github.com/llvm/llvm-project/commit/e7c8e542f41436861e452c3e65954424aca09102
  Author: brett koonce <koonce at gmail.com>
  Date:   2019-12-02 (Mon, 02 Dec 2019)

  Changed paths:
    M mlir/g3doc/DeclarativeRewrites.md
    M mlir/g3doc/Tutorials/Toy/Ch-2.md

  Log Message:
  -----------
  docs: minor spelling tweaks

Closes tensorflow/mlir#262

COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/262 from brettkoonce:docs-sp 6833fc8aa41edd02d8bc7c3cbb84211cb8b0334c
PiperOrigin-RevId: 283352765


  Commit: 5e6795070ca4e9371a314b10513a768ffd535fa3
      https://github.com/llvm/llvm-project/commit/5e6795070ca4e9371a314b10513a768ffd535fa3
  Author: Mehdi Amini <aminim at google.com>
  Date:   2019-12-02 (Mon, 02 Dec 2019)

  Changed paths:
    M mlir/CMakeLists.txt
    M mlir/include/mlir/Dialect/AffineOps/CMakeLists.txt
    M mlir/include/mlir/Dialect/FxpMathOps/CMakeLists.txt
    M mlir/include/mlir/Dialect/GPU/CMakeLists.txt
    M mlir/include/mlir/Dialect/LLVMIR/CMakeLists.txt
    M mlir/include/mlir/Dialect/Linalg/IR/CMakeLists.txt
    M mlir/include/mlir/Dialect/LoopOps/CMakeLists.txt
    M mlir/include/mlir/Dialect/QuantOps/CMakeLists.txt
    M mlir/include/mlir/Dialect/SPIRV/CMakeLists.txt
    M mlir/include/mlir/Dialect/VectorOps/CMakeLists.txt

  Log Message:
  -----------
  Generate dialect documentations in the doc folder for every dialect

Also add a mlir-doc build target to general all the docs

PiperOrigin-RevId: 283353529


  Commit: b41162b3af62668b36076baebf765044e21c04ba
      https://github.com/llvm/llvm-project/commit/b41162b3af62668b36076baebf765044e21c04ba
  Author: Lei Zhang <antiagainst at google.com>
  Date:   2019-12-02 (Mon, 02 Dec 2019)

  Changed paths:
    M mlir/g3doc/OpDefinitions.md
    M mlir/include/mlir/TableGen/Attribute.h
    M mlir/include/mlir/TableGen/Operator.h
    M mlir/lib/TableGen/Attribute.cpp
    M mlir/test/mlir-tblgen/op-attribute.td
    M mlir/test/mlir-tblgen/op-decl.td
    M mlir/test/mlir-tblgen/op-result.td
    M mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
    M mlir/tools/mlir-tblgen/RewriterGen.cpp

  Log Message:
  -----------
  [ODS] Generate builders taking unwrapped value and defaults for attributes

Existing builders generated by ODS require attributes to be passed
in as mlir::Attribute or its subclasses. This is okay foraggregate-
parameter builders, which is primarily to be used by programmatic
C++ code generation; it is inconvenient for separate-parameter
builders meant to be called in manually written C++ code because
it requires developers to wrap raw values into mlir::Attribute by
themselves.

This CL extends to generate additional builder methods that
take raw values for attributes and handles the wrapping in the
builder implementation. Additionally, if an attribute appears
late in the arguments list and has a default value, the default
value is supplied in the declaration if possible.

PiperOrigin-RevId: 283355919


  Commit: 3126004a5a8bef0ac079869626b322c2fdbbd655
      https://github.com/llvm/llvm-project/commit/3126004a5a8bef0ac079869626b322c2fdbbd655
  Author: Aart Bik <ajcbik at google.com>
  Date:   2019-12-02 (Mon, 02 Dec 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/VectorOps/VectorOps.td
    M mlir/lib/Dialect/VectorOps/VectorOps.cpp
    M mlir/test/Dialect/VectorOps/invalid.mlir
    M mlir/test/Dialect/VectorOps/ops.mlir

  Log Message:
  -----------
  [VectorOps] Add legality rules to broadcast

PiperOrigin-RevId: 283360101


  Commit: 364b92fa106e0f40d1a2ce24887f385ac67180d7
      https://github.com/llvm/llvm-project/commit/364b92fa106e0f40d1a2ce24887f385ac67180d7
  Author: Lei Zhang <antiagainst at google.com>
  Date:   2019-12-02 (Mon, 02 Dec 2019)

  Changed paths:
    M mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp

  Log Message:
  -----------
  NFC: use `&&` instead of `and`
PiperOrigin-RevId: 283392575


  Commit: 16a9296bc8a662516a7a7d9b13a2c038a39bbb1e
      https://github.com/llvm/llvm-project/commit/16a9296bc8a662516a7a7d9b13a2c038a39bbb1e
  Author: Lei Zhang <antiagainst at google.com>
  Date:   2019-12-02 (Mon, 02 Dec 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/SPIRV/SPIRVBase.td
    M mlir/utils/spirv/gen_spirv_dialect.py

  Log Message:
  -----------
  [spirv] NFC: reorder sections in SPIRVBase.td

Put extensions and capabilities at the very beginning because
they will be referenced later by other definitions.

PiperOrigin-RevId: 283416972


  Commit: fdbb99cd6252b890b4deff7de0f67a6577c370b3
      https://github.com/llvm/llvm-project/commit/fdbb99cd6252b890b4deff7de0f67a6577c370b3
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2019-12-03 (Tue, 03 Dec 2019)

  Changed paths:
    M mlir/g3doc/Dialects/LLVM.md
    M mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
    M mlir/lib/Conversion/GPUCommon/OpToFuncCallLowering.h
    M mlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp
    M mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
    M mlir/lib/IR/FunctionImplementation.cpp
    M mlir/test/Dialect/LLVMIR/func.mlir

  Log Message:
  -----------
  Add linkage support to LLVMFuncOp

A recent commit introduced the Linkage attribute to the LLVM dialect and used
it in the Global Op. Also use it in LLVMFuncOp. As per LLVM Language Reference,
if the linkage attribute is omitted, the function is assumed to have external
linkage.

PiperOrigin-RevId: 283493299


  Commit: d44e865020e0cabfede23509ccd461de3b501713
      https://github.com/llvm/llvm-project/commit/d44e865020e0cabfede23509ccd461de3b501713
  Author: Alexander Belyaev <pifon at google.com>
  Date:   2019-12-03 (Tue, 03 Dec 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/Linalg/IR/LinalgLibraryOps.td

  Log Message:
  -----------
  [Linalg] Update/fix documentation for linalg.indexed_generic.

PiperOrigin-RevId: 283503642


  Commit: 1af9633d851d1827b28b8c00c74e55247075f554
      https://github.com/llvm/llvm-project/commit/1af9633d851d1827b28b8c00c74e55247075f554
  Author: Lei Zhang <antiagainst at google.com>
  Date:   2019-12-03 (Tue, 03 Dec 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/SPIRV/SPIRVBase.td
    A mlir/include/mlir/Dialect/SPIRV/SPIRVGroupOps.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVOps.td
    M mlir/lib/Dialect/SPIRV/SPIRVOps.cpp
    A mlir/test/Dialect/SPIRV/Serialization/group-ops.mlir
    M mlir/test/Dialect/SPIRV/ops.mlir
    M mlir/utils/spirv/gen_spirv_dialect.py

  Log Message:
  -----------
  [spirv] Add spv.SubgroupBallotKHROp

PiperOrigin-RevId: 283522284


  Commit: 2125c0e3a8ec1e0abaadfac8cd9f0f1d8574d952
      https://github.com/llvm/llvm-project/commit/2125c0e3a8ec1e0abaadfac8cd9f0f1d8574d952
  Author: Stephan Herhut <herhut at google.com>
  Date:   2019-12-03 (Tue, 03 Dec 2019)

  Changed paths:
    M mlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp
    M mlir/test/Conversion/StandardToLLVM/convert-to-llvmir.mlir

  Log Message:
  -----------
  Extend conversion of SubViewOp to llvm to also support cases where size and stride
are constant (i.e., there are no size and stride operands).

We recently added canonicalization that rewrites constant size and stride operands to
SubViewOp into static information in the type, so these patterns now occur during code
generation.

PiperOrigin-RevId: 283524688


  Commit: 330d1ff00ea85363125ca9b7e42dca50f6ea4ebe
      https://github.com/llvm/llvm-project/commit/330d1ff00ea85363125ca9b7e42dca50f6ea4ebe
  Author: Diego Caballero <diego.caballero at intel.com>
  Date:   2019-12-03 (Tue, 03 Dec 2019)

  Changed paths:
    M mlir/lib/Transforms/LoopFusion.cpp
    M mlir/test/Transforms/loop-fusion.mlir

  Log Message:
  -----------
  AffineLoopFusion: Prevent fusion of multi-out-edge producer loops

tensorflow/mlir#162 introduced a bug that
incorrectly allowed fusion of producer loops with multiple outgoing
edges. This commit fixes that problem. It also introduces a new flag to
disable sibling loop fusion so that we can test producer-consumer fusion
in isolation.

Closes tensorflow/mlir#259

COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/259 from dcaballe:dcaballe/fix_multi_out_edge_producer_fusion 578d5661705fd5c56c555832d5e0528df88c5282
PiperOrigin-RevId: 283531105


  Commit: 993e79e9bd132d344f4b79d44055c6d49f072a00
      https://github.com/llvm/llvm-project/commit/993e79e9bd132d344f4b79d44055c6d49f072a00
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2019-12-03 (Tue, 03 Dec 2019)

  Changed paths:
    M mlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp
    M mlir/lib/Dialect/StandardOps/Ops.cpp
    M mlir/test/Conversion/StandardToLLVM/convert-to-llvmir.mlir
    M mlir/test/Dialect/Linalg/loops.mlir
    M mlir/test/Dialect/Linalg/promote.mlir
    M mlir/test/Dialect/Linalg/roundtrip.mlir
    M mlir/test/IR/invalid-ops.mlir
    M mlir/test/mlir-cpu-runner/linalg_integration_test.mlir

  Log Message:
  -----------
  Fix ViewOp to have at most one offset operand

As described in the documentation, ViewOp is expected to take an optional
dynamic offset followed by a list of dynamic sizes. However, the ViewOp parser
did not include a check for the offset being a single value and accepeted a
list of values instead.

Furthermore, several tests have been exercising the wrong syntax of a ViewOp,
passing multiple values to the dyanmic stride list, which was not caught by the
parser. The trailing values could have been erronously interpreted as dynamic
sizes. This is likely due to resyntaxing of the ViewOp, with the previous
syntax taking the list of sizes before the offset. Update the tests to use the
syntax with the offset preceding the sizes.

Worse, the conversion of ViewOp to the LLVM dialect assumed the wrong order of
operands with offset in the trailing position, and erronously relied on the
permissive parsing that interpreted trailing dynamic offset values as leading
dynamic sizes. Fix the lowering to use the correct order of operands.

PiperOrigin-RevId: 283532506


  Commit: 1df7f4eb9d8c406ab24f7e8bc1f017fdaaaaca2b
      https://github.com/llvm/llvm-project/commit/1df7f4eb9d8c406ab24f7e8bc1f017fdaaaaca2b
  Author: MLIR Team <no-reply at google.com>
  Date:   2019-12-03 (Tue, 03 Dec 2019)

  Changed paths:
    M mlir/bindings/python/pybind.cpp
    M mlir/bindings/python/test/test_py2and3.py

  Log Message:
  -----------
  Add python bindings for ArrayAttr, AffineMapAttr.

PiperOrigin-RevId: 283561252


  Commit: 2057733ffac81741fc1e3c5c7b6f3967c3dadeb2
      https://github.com/llvm/llvm-project/commit/2057733ffac81741fc1e3c5c7b6f3967c3dadeb2
  Author: MLIR Team <no-reply at google.com>
  Date:   2019-12-03 (Tue, 03 Dec 2019)

  Changed paths:
    M mlir/bindings/python/pybind.cpp
    M mlir/bindings/python/test/test_py2and3.py

  Log Message:
  -----------
  Add Python bindings for affine expressions with binary operators.

PiperOrigin-RevId: 283569325


  Commit: 353fb2bd3878c9a0c9c3e746c8ff5aa687ffcd72
      https://github.com/llvm/llvm-project/commit/353fb2bd3878c9a0c9c3e746c8ff5aa687ffcd72
  Author: Mahesh Ravishankar <ravishankarm at google.com>
  Date:   2019-12-03 (Tue, 03 Dec 2019)

  Changed paths:
    M mlir/lib/Conversion/StandardToSPIRV/ConvertStandardToSPIRV.cpp
    M mlir/lib/Dialect/SPIRV/SPIRVLowering.cpp
    M mlir/test/Conversion/GPUToSPIRV/load-store.mlir
    M mlir/test/Conversion/GPUToSPIRV/loop.mlir

  Log Message:
  -----------
  Convert MemRefType to a linearized array in SPIR-V lowering.

The SPIR-V lowering used nested !spv.arrays to represented
multi-dimensional arrays, with the hope that in-conjunction with the
layout annotations, the shape and layout of memref can be represented
directly. It is unclear though how portable this representation will
end up being. It will rely on driver compilers implementing complex
index computations faithfully. A more portable approach is to use
linearized arrays to represent memrefs and explicitly instantiate all
the index computation in SPIR-V. This gives added benefit that we can
further optimize the generated code in MLIR before generating the
SPIR-V binary.

PiperOrigin-RevId: 283571167


  Commit: 4741ec6af0d49cec5fb49a370244657c27ca033c
      https://github.com/llvm/llvm-project/commit/4741ec6af0d49cec5fb49a370244657c27ca033c
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-12-03 (Tue, 03 Dec 2019)

  Changed paths:
    M mlir/g3doc/WritingAPass.md
    M mlir/include/mlir/Pass/AnalysisManager.h
    M mlir/unittests/Pass/AnalysisManagerTest.cpp

  Log Message:
  -----------
  Allow analyses to provide a hook 'isInvalidated' to determine if they are truly invalidated.

The hook has the following form:
*   `bool isInvalidated(const AnalysisManager::PreservedAnalyses &)`

Given a preserved analysis set, the analysis returns true if it should truly be
invalidated. This allows for more fine-tuned invalidation in cases where an
analysis wasn't explicitly marked preserved, but may be preserved(or
invalidated) based upon other properties; such as analyses sets.

PiperOrigin-RevId: 283582889


  Commit: 67515e8d7a3bf5bcaa8475890eea3c63d7ea732c
      https://github.com/llvm/llvm-project/commit/67515e8d7a3bf5bcaa8475890eea3c63d7ea732c
  Author: Sean Silva <silvasean at google.com>
  Date:   2019-12-03 (Tue, 03 Dec 2019)

  Changed paths:
    M mlir/lib/IR/Operation.cpp
    M mlir/test/IR/invalid.mlir

  Log Message:
  -----------
  Verifier: Better error message in case of successor operand mismatch.

In particular, print the successor number in the diagnostic.

PiperOrigin-RevId: 283585084


  Commit: 2c13fd9f17207d9254c8b3ff1a7c5d92ace35441
      https://github.com/llvm/llvm-project/commit/2c13fd9f17207d9254c8b3ff1a7c5d92ace35441
  Author: Andy Davis <andydavis at google.com>
  Date:   2019-12-03 (Tue, 03 Dec 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/VectorOps/VectorOps.td
    M mlir/lib/Dialect/VectorOps/VectorOps.cpp
    M mlir/test/Dialect/VectorOps/invalid.mlir
    M mlir/test/Dialect/VectorOps/ops.mlir

  Log Message:
  -----------
  Add CreateMaskOp to the VectorOps dialect.

PiperOrigin-RevId: 283591888


  Commit: 82f9f9d112ca35f12dec9fbd83d9584b46fc9d1f
      https://github.com/llvm/llvm-project/commit/82f9f9d112ca35f12dec9fbd83d9584b46fc9d1f
  Author: Sean Silva <silvasean at google.com>
  Date:   2019-12-03 (Tue, 03 Dec 2019)

  Changed paths:
    M mlir/lib/Pass/Pass.cpp
    M mlir/test/Pass/crash-recovery.mlir

  Log Message:
  -----------
  Make diagnostic a bit clearer.

This prints out in case of any pass failure. Not just a crash.

PiperOrigin-RevId: 283616719


  Commit: c5ba37b6ae00f07a37e22072fb9af84768dd1437
      https://github.com/llvm/llvm-project/commit/c5ba37b6ae00f07a37e22072fb9af84768dd1437
  Author: Mahesh Ravishankar <ravishankarm at google.com>
  Date:   2019-12-03 (Tue, 03 Dec 2019)

  Changed paths:
    M mlir/include/mlir/Conversion/StandardToSPIRV/ConvertStandardToSPIRV.h
    M mlir/include/mlir/Conversion/StandardToSPIRV/ConvertStandardToSPIRVPass.h
    M mlir/include/mlir/Dialect/StandardOps/Ops.td
    M mlir/lib/Conversion/StandardToSPIRV/CMakeLists.txt
    M mlir/lib/Conversion/StandardToSPIRV/ConvertStandardToSPIRV.cpp
    A mlir/lib/Conversion/StandardToSPIRV/LegalizeStandardForSPIRV.cpp
    M mlir/lib/Dialect/StandardOps/Ops.cpp
    A mlir/test/Conversion/StandardToSPIRV/legalization.mlir
    A mlir/test/Conversion/StandardToSPIRV/subview-to-spirv.mlir

  Log Message:
  -----------
  Add a pass to legalize operations before lowering to SPIR-V.

Not all StandardOps can be lowered to SPIR-V. For example, subview op
implementation requires use of pointer bitcasts which is not valid
according to SPIR-V spec (or at least is ambiguous about it). Such ops
need to be removed/transformed before lowering to SPIR-V. The
SPIRVLegalizationPass is added a place where such legalizations can be
added. Current implementation folds the subview ops with load/stores
so that the lowering itself does not have to convert a subview op.

PiperOrigin-RevId: 283642981


  Commit: 50b2b26e70fd904c44b4e80788e1cb64ce2b7c9d
      https://github.com/llvm/llvm-project/commit/50b2b26e70fd904c44b4e80788e1cb64ce2b7c9d
  Author: Lei Zhang <antiagainst at google.com>
  Date:   2019-12-03 (Tue, 03 Dec 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/SPIRV/SPIRVBase.td
    A mlir/include/mlir/Dialect/SPIRV/SPIRVNonUniformOps.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVOps.td
    M mlir/lib/Dialect/SPIRV/SPIRVOps.cpp
    A mlir/test/Dialect/SPIRV/Serialization/non-uniform-ops.mlir
    A mlir/test/Dialect/SPIRV/group-ops.mlir
    A mlir/test/Dialect/SPIRV/non-uniform-ops.mlir

  Log Message:
  -----------
  [spirv] Add spv.GroupNonUniformBallot

This CL also did the following cleanup:
- Moved the test for spv.SubgroupBallotKHR to its own file
- Wrapped generated canonicalization patterns in anonymous namespace
- Updated header comments in SPVOps.td

PiperOrigin-RevId: 283650091


  Commit: 5c0c51a9979ffaf1eb57be061bed56a05ae6ddd4
      https://github.com/llvm/llvm-project/commit/5c0c51a9979ffaf1eb57be061bed56a05ae6ddd4
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2019-12-03 (Tue, 03 Dec 2019)

  Changed paths:
    M mlir/include/mlir/Analysis/LoopAnalysis.h
    R mlir/include/mlir/Analysis/VectorAnalysis.h
    R mlir/include/mlir/Conversion/VectorConversions/VectorConversions.h
    A mlir/include/mlir/Conversion/VectorToLLVM/ConvertVectorToLLVM.h
    A mlir/include/mlir/Conversion/VectorToLoops/ConvertVectorToLoops.h
    A mlir/include/mlir/Dialect/VectorOps/Utils.h
    A mlir/include/mlir/Dialect/VectorOps/VectorTransforms.h
    M mlir/include/mlir/EDSC/Builders.h
    M mlir/include/mlir/EDSC/Intrinsics.h
    M mlir/lib/Analysis/LoopAnalysis.cpp
    M mlir/lib/Analysis/SliceAnalysis.cpp
    M mlir/lib/Analysis/VectorAnalysis.cpp
    M mlir/lib/Conversion/CMakeLists.txt
    M mlir/lib/Conversion/LinalgToLLVM/LinalgToLLVM.cpp
    R mlir/lib/Conversion/VectorConversions/CMakeLists.txt
    R mlir/lib/Conversion/VectorConversions/VectorToLLVM.cpp
    R mlir/lib/Conversion/VectorConversions/VectorToLoops.cpp
    R mlir/lib/Conversion/VectorConversions/VectorToVector.cpp
    A mlir/lib/Conversion/VectorToLLVM/CMakeLists.txt
    A mlir/lib/Conversion/VectorToLLVM/ConvertVectorToLLVM.cpp
    A mlir/lib/Conversion/VectorToLoops/CMakeLists.txt
    A mlir/lib/Conversion/VectorToLoops/ConvertVectorToLoops.cpp
    M mlir/lib/Dialect/VectorOps/CMakeLists.txt
    A mlir/lib/Dialect/VectorOps/VectorToVector.cpp
    M mlir/lib/EDSC/Intrinsics.cpp
    M mlir/lib/Transforms/MaterializeVectors.cpp
    M mlir/lib/Transforms/Vectorize.cpp
    R mlir/test/Conversion/VectorConversions/lower_vector_transfers.mlir
    R mlir/test/Conversion/VectorConversions/vector-to-llvm.mlir
    A mlir/test/Conversion/VectorToLLVM/vector-to-llvm.mlir
    A mlir/test/Conversion/VectorToLoops/vector-to-loops.mlir
    M mlir/test/lib/Transforms/CMakeLists.txt
    R mlir/test/lib/Transforms/TestLowerVectorTransfers.cpp
    A mlir/test/lib/Transforms/TestVectorToLoopsConversion.cpp
    M mlir/test/lib/Transforms/TestVectorToVectorConversion.cpp
    M mlir/test/lib/Transforms/TestVectorizationUtils.cpp
    M mlir/tools/mlir-opt/CMakeLists.txt

  Log Message:
  -----------
  Refactor dependencies to expose Vector transformations as patterns - NFC

This CL refactors some of the MLIR vector dependencies to allow decoupling VectorOps, vector analysis, vector transformations and vector conversions from each other.
This makes the system more modular and allows extracting VectorToVector into VectorTransforms that do not depend on vector conversions.

This refactoring exhibited a bunch of cyclic library dependencies that have been cleaned up.

PiperOrigin-RevId: 283660308


  Commit: da0b0b1a0e19520ae54389490f2c6b3c36400e61
      https://github.com/llvm/llvm-project/commit/da0b0b1a0e19520ae54389490f2c6b3c36400e61
  Author: Smit Hinsu <hinsu at google.com>
  Date:   2019-12-03 (Tue, 03 Dec 2019)

  Changed paths:
    M mlir/g3doc/Tutorials/Toy/Ch-2.md

  Log Message:
  -----------
  Avoid variable name conflict in MLIR tutorial code snippet

PiperOrigin-RevId: 283682865


  Commit: c8c36e7979e2b35713fba4e6fea9b6ab1db8ba09
      https://github.com/llvm/llvm-project/commit/c8c36e7979e2b35713fba4e6fea9b6ab1db8ba09
  Author: Kazuaki Ishizaki <ishizaki at jp.ibm.com>
  Date:   2019-12-04 (Wed, 04 Dec 2019)

  Changed paths:
    M mlir/examples/toy/Ch5/mlir/LowerToAffineLoops.cpp
    M mlir/examples/toy/Ch6/mlir/LowerToAffineLoops.cpp
    M mlir/examples/toy/Ch7/mlir/LowerToAffineLoops.cpp
    M mlir/g3doc/DeclarativeRewrites.md
    M mlir/g3doc/Dialects/SPIR-V.md
    M mlir/g3doc/OpDefinitions.md
    M mlir/g3doc/Tutorials/Toy/Ch-2.md
    M mlir/g3doc/Tutorials/Toy/Ch-5.md

  Log Message:
  -----------
  minor spelling tweaks

Closes tensorflow/mlir#250

COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/250 from kiszk:spelling_tweaks_201911 50fc04443723190b764e824b6fcd2469fecb56e6
PiperOrigin-RevId: 283733032


  Commit: 34e1f4aa510ea62155b9d2ab4e810a55ad6f4c5b
      https://github.com/llvm/llvm-project/commit/34e1f4aa510ea62155b9d2ab4e810a55ad6f4c5b
  Author: Andy Davis <andydavis at google.com>
  Date:   2019-12-04 (Wed, 04 Dec 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/VectorOps/VectorOps.td
    M mlir/include/mlir/Dialect/VectorOps/VectorTransformPatterns.td
    M mlir/lib/Dialect/VectorOps/VectorOps.cpp
    M mlir/lib/Dialect/VectorOps/VectorToVector.cpp
    M mlir/test/Conversion/VectorConversions/vector-to-vector.mlir

  Log Message:
  -----------
  Adds support for unrolling single-result vector operations with iterator type lists and indexing maps to a target vector size.
Adds unit tests for unrolling the vector ContractionOp with different iteration orders.

PiperOrigin-RevId: 283747503


  Commit: f7c6bc70a926bf2fb790c4cfc2b6023dd21be622
      https://github.com/llvm/llvm-project/commit/f7c6bc70a926bf2fb790c4cfc2b6023dd21be622
  Author: Julian Gross <julian.gross at dfki.de>
  Date:   2019-12-04 (Wed, 04 Dec 2019)

  Changed paths:
    M mlir/g3doc/Dialects/Standard.md
    M mlir/include/mlir/Dialect/StandardOps/Ops.td
    M mlir/test/IR/core-ops.mlir

  Log Message:
  -----------
  Added new FAbs, FCeil, Cos, Neg, Sign, Tanh operations.

Closes tensorflow/mlir#251

COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/251 from dfki-jugr:new_ops 0398997bf9953016898f873068e22916a062eb2b
PiperOrigin-RevId: 283750699


  Commit: 75175134d46dd63fda804697cbd3e66e8213a01b
      https://github.com/llvm/llvm-project/commit/75175134d46dd63fda804697cbd3e66e8213a01b
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2019-12-04 (Wed, 04 Dec 2019)

  Changed paths:
    M mlir/lib/Transforms/Utils/LoopUtils.cpp
    M mlir/test/Transforms/loop-coalescing.mlir

  Log Message:
  -----------
  Loop coalescing: fix pointer chainsing in use-chain traversal

In the replaceAllUsesExcept utility function called from loop coalescing the
iteration over the use-chain is incorrect. The use list nodes (IROperands) have
next/prev links, and bluntly resetting the use would make the loop to continue
on uses of the value that was replaced instead of the original one. As a
result, it could miss the existing uses and update the wrong ones. Make sure we
increment the iterator before updating the use in the loop body.

Reported-by: Uday Bondhugula <uday at polymagelabs.com>

Closes tensorflow/mlir#291.

PiperOrigin-RevId: 283754195


  Commit: bf45ff6aab02712f2a0b4352417dadff36563d9c
      https://github.com/llvm/llvm-project/commit/bf45ff6aab02712f2a0b4352417dadff36563d9c
  Author: Scott Todd <scotttodd at google.com>
  Date:   2019-12-04 (Wed, 04 Dec 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/SPIRV/SPIRVGLSLOps.td
    M mlir/test/Dialect/SPIRV/Serialization/glsl-ops.mlir
    M mlir/test/Dialect/SPIRV/glslops.mlir

  Log Message:
  -----------
  [spirv] Adding sqrt op in the GLSL extension.

PiperOrigin-RevId: 283769736


  Commit: 0827fa562dc90fb3bed9f19ee4b0d36b0b5c3ac3
      https://github.com/llvm/llvm-project/commit/0827fa562dc90fb3bed9f19ee4b0d36b0b5c3ac3
  Author: Uday Bondhugula <uday at polymagelabs.com>
  Date:   2019-12-04 (Wed, 04 Dec 2019)

  Changed paths:
    M mlir/include/mlir/Analysis/LoopAnalysis.h
    M mlir/lib/Analysis/LoopAnalysis.cpp

  Log Message:
  -----------
  NFC - fix name / comments - isAccessInvariant

- the name was misleading; this is really checking if a Value being used
  to index was loop IV invariant. Update comment.

- the method is only used locally; what can be exposed in the future is
  isAccessInvariant(LoadOrStoreOp op, Value *iv)

Signed-off-by: Uday Bondhugula <uday at polymagelabs.com>

Closes tensorflow/mlir#285

COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/285 from bondhugula:quickfix fe5837abe987980c4ab469a9aa7de8e4f0007d9f
PiperOrigin-RevId: 283771923


  Commit: 26484bc0b6ce2cf878afe75d0f13fd640a0529d1
      https://github.com/llvm/llvm-project/commit/26484bc0b6ce2cf878afe75d0f13fd640a0529d1
  Author: Sean Silva <silvasean at google.com>
  Date:   2019-12-04 (Wed, 04 Dec 2019)

  Changed paths:
    M mlir/lib/IR/AsmPrinter.cpp
    M mlir/test/IR/pretty-attributes.mlir

  Log Message:
  -----------
  Print out large elementsattr's such that they are parseable.

I found that when running crash reproducers, the elided elementsattr's
would prevent parsing the IR repro. I found myself manually going and
replacing the "..." with some valid IR.

With this change, we now print elided attrs as `opaque<"", "0xDEADBEEF">`
to clearly delineate them as being elided while still being parseable.

PiperOrigin-RevId: 283781806


  Commit: 1221918b85c675b7e9222e2bc9e2b745f9ea98ba
      https://github.com/llvm/llvm-project/commit/1221918b85c675b7e9222e2bc9e2b745f9ea98ba
  Author: Lei Zhang <antiagainst at google.com>
  Date:   2019-12-04 (Wed, 04 Dec 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/SPIRV/SPIRVBase.td

  Log Message:
  -----------
  [spirv] Define a few more extensions in SPIRVBase.td

PiperOrigin-RevId: 283798496


  Commit: 31b3e2248b1df65241b1125ec1f530ce9f8a8886
      https://github.com/llvm/llvm-project/commit/31b3e2248b1df65241b1125ec1f530ce9f8a8886
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-12-04 (Wed, 04 Dec 2019)

  Changed paths:
    M mlir/g3doc/LangRef.md
    M mlir/lib/Parser/Lexer.cpp
    M mlir/lib/Parser/Parser.cpp

  Log Message:
  -----------
  NFC: Fix mismatches between LangRef.md and actual parser implementation.
PiperOrigin-RevId: 283805832


  Commit: edfaf925cfab38e02b281136a0d72a51d0e153a1
      https://github.com/llvm/llvm-project/commit/edfaf925cfab38e02b281136a0d72a51d0e153a1
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2019-12-04 (Wed, 04 Dec 2019)

  Changed paths:
    M mlir/lib/Dialect/VectorOps/VectorToVector.cpp
    M mlir/lib/Transforms/CMakeLists.txt
    R mlir/lib/Transforms/MaterializeVectors.cpp
    M mlir/test/Conversion/VectorConversions/vector-to-vector.mlir
    R mlir/test/Transforms/Vectorize/materialize.mlir
    R mlir/test/Transforms/Vectorize/materialize_vectors_1d_to_1d.mlir
    R mlir/test/Transforms/Vectorize/materialize_vectors_2d_to_1d.mlir
    R mlir/test/Transforms/Vectorize/materialize_vectors_2d_to_2d.mlir

  Log Message:
  -----------
  Drop MaterializeVectorTransfers in favor of simpler declarative unrolling

Now that we have unrolling as a declarative pattern, we can drop a full pass that has gone stale. In the future we may want to add specific unrolling patterns for VectorTransferReadOp.

PiperOrigin-RevId: 283806880


  Commit: 6f895bec7d63e31ad005b0ae05395eb016e5014f
      https://github.com/llvm/llvm-project/commit/6f895bec7d63e31ad005b0ae05395eb016e5014f
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-12-04 (Wed, 04 Dec 2019)

  Changed paths:
    M mlir/include/mlir/IR/Attributes.h
    M mlir/lib/Transforms/CSE.cpp

  Log Message:
  -----------
  [CSE] NFC: Hash the attribute dictionary pointer instead of the list of attributes.

PiperOrigin-RevId: 283810829


  Commit: d20d763241020161ea173efe358d207b93310a34
      https://github.com/llvm/llvm-project/commit/d20d763241020161ea173efe358d207b93310a34
  Author: Andy Davis <andydavis at google.com>
  Date:   2019-12-04 (Wed, 04 Dec 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/VectorOps/VectorOps.td
    M mlir/lib/Dialect/VectorOps/VectorOps.cpp
    A mlir/test/Dialect/VectorOps/canonicalize.mlir
    M mlir/test/Dialect/VectorOps/invalid.mlir
    M mlir/test/Dialect/VectorOps/ops.mlir

  Log Message:
  -----------
  Add canonicalization patterns for vector CreateMaskOp and StridedSliceOp to be used in the unroll vector op transformation.
Adds a ConstantMaskOp to the vector ops dialect.
Adds the following canonicalization patterns:
CreateMaskOp -> ConstantMaskOp
StridedSliceOp(ConstantMaskOp) -> ConstantMaskOp

PiperOrigin-RevId: 283816752


  Commit: b3f7cf80a7dc7e9edd5b53827a942bada4a6aeb2
      https://github.com/llvm/llvm-project/commit/b3f7cf80a7dc7e9edd5b53827a942bada4a6aeb2
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2019-12-04 (Wed, 04 Dec 2019)

  Changed paths:
    M mlir/include/mlir/Conversion/StandardToLLVM/ConvertStandardToLLVMPass.h
    M mlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp
    M mlir/test/Conversion/StandardToLLVM/convert-memref-ops.mlir

  Log Message:
  -----------
  Add a CL option to Standard to LLVM lowering to use alloca instead of malloc/free.

In the future, a more configurable malloc and free interface should be used and exposed via
extra parameters to the `createLowerToLLVMPass`. Until requirements are gathered, a simple CL flag allows generating code that runs successfully on hardware that cannot use the stdlib.

PiperOrigin-RevId: 283833424


  Commit: 2c930f8d9daa04576ac49e14c19dc540ebf823fe
      https://github.com/llvm/llvm-project/commit/2c930f8d9daa04576ac49e14c19dc540ebf823fe
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-12-04 (Wed, 04 Dec 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/QuantOps/QuantTypes.h
    M mlir/include/mlir/IR/Attributes.h
    M mlir/include/mlir/IR/Diagnostics.h
    M mlir/include/mlir/IR/StandardTypes.h
    M mlir/include/mlir/IR/Types.h
    M mlir/lib/Dialect/QuantOps/IR/QuantTypes.cpp
    M mlir/lib/IR/Attributes.cpp
    M mlir/lib/IR/StandardTypes.cpp
    M mlir/lib/IR/Types.cpp

  Log Message:
  -----------
  Add emitOptional(Error|Warning|Remark) functions to simplify emission with an optional location.

In some situations a diagnostic may optionally be emitted by the presence of a location, e.g. attribute and type verification. These situations currently require extra 'if(loc) emitError(...); return failure()' wrappers that make verification clunky. These new overloads take an optional location and a list of arguments to the diagnostic, and return a LogicalResult. We take the arguments directly and return LogicalResult instead of returning InFlightDiagnostic because we cannot create a valid diagnostic with a null location. This creates an awkward situation where a user may try to treat the, potentially null, diagnostic as a valid one and encounter crashes when attaching notes/etc. Below is an example of how these methods simplify some existing usages:

Before:

  if (loc)
    emitError(*loc, "this is my diagnostic with argument: ") << 5;
  return failure();

After:

  return emitOptionalError(loc, "this is my diagnostic with argument: ", 5);

PiperOrigin-RevId: 283853599


  Commit: d9da8b647a5a416941c6e1566c29f3a0eda3d503
      https://github.com/llvm/llvm-project/commit/d9da8b647a5a416941c6e1566c29f3a0eda3d503
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-12-04 (Wed, 04 Dec 2019)

  Changed paths:
    M mlir/include/mlir/IR/Operation.h
    M mlir/lib/IR/Block.cpp
    M mlir/lib/IR/Operation.cpp

  Log Message:
  -----------
  Optimize operation ordering to support non-congruent indices.

This change adds support for non-congruent indices in the operation ordering within a basic block. This effect of this is that insertions are less likely to cause an invalidation of the ordering within a block. This has a big effect on modules that have very large basic blocks.

PiperOrigin-RevId: 283858136


  Commit: b60799b71bb4e1e33f701b6c86dac6dc680a853e
      https://github.com/llvm/llvm-project/commit/b60799b71bb4e1e33f701b6c86dac6dc680a853e
  Author: Lei Zhang <antiagainst at google.com>
  Date:   2019-12-04 (Wed, 04 Dec 2019)

  Changed paths:
    M mlir/lib/Dialect/LLVMIR/CMakeLists.txt

  Log Message:
  -----------
  Add MLIRIR as a dependency to LLVM and related dialects

Fixes tensorflow/mlir#289

PiperOrigin-RevId: 283914472


  Commit: b8cd0c148644957ac48bc7a82b7c69e83a11a721
      https://github.com/llvm/llvm-project/commit/b8cd0c148644957ac48bc7a82b7c69e83a11a721
  Author: Tres Popp <tpopp at google.com>
  Date:   2019-12-05 (Thu, 05 Dec 2019)

  Changed paths:
    M mlir/bindings/python/pybind.cpp
    M mlir/include/mlir/IR/Module.h
    M mlir/include/mlir/IR/SymbolTable.h
    M mlir/lib/Dialect/GPU/Transforms/KernelOutlining.cpp
    M mlir/lib/IR/SymbolTable.cpp
    M mlir/test/IR/invalid-module-op.mlir
    M mlir/test/IR/test-symbol-uses.mlir
    M mlir/test/IR/traits.mlir
    M mlir/test/lib/IR/TestSymbolUses.cpp
    M mlir/test/lib/TestDialect/TestOps.td

  Log Message:
  -----------
  Move ModuleManager functionality into mlir::SymbolTable.

Note for broken code, the following transformations occurred:
ModuleManager::insert(Block::iterator, Operation*) - > SymbolTable::insert(Operation*, Block::iterator)
ModuleManager::lookupSymbol -> SymbolTable::lookup
ModuleManager::getModule() -> SymbolTable::getOp()
ModuleManager::getContext() -> SymbolTable::getOp()->getContext()
ModuleManager::* -> SymbolTable::*
PiperOrigin-RevId: 283944635


  Commit: b14ee5a9a149aaebb6574c0f29e1ce1d8d4ca305
      https://github.com/llvm/llvm-project/commit/b14ee5a9a149aaebb6574c0f29e1ce1d8d4ca305
  Author: Mehdi Amini <aminim at google.com>
  Date:   2019-12-05 (Thu, 05 Dec 2019)

  Changed paths:
    M mlir/lib/ExecutionEngine/ExecutionEngine.cpp

  Log Message:
  -----------
  Fix MLIR Build after LLVM upstream JIT changes (getMainJITDylib removed)

The getMainJITDylib() method was removed in 4fc68b9b7f, replace it by creating a JITDylib on the fly.

PiperOrigin-RevId: 283948595


  Commit: c0a9de29ad2a7fa1a0b6f9a426ae21a6b4039ec9
      https://github.com/llvm/llvm-project/commit/c0a9de29ad2a7fa1a0b6f9a426ae21a6b4039ec9
  Author: Lei Zhang <antiagainst at google.com>
  Date:   2019-12-05 (Thu, 05 Dec 2019)

  Changed paths:
    M mlir/lib/Dialect/SPIRV/Serialization/Deserializer.cpp
    M mlir/lib/Dialect/SPIRV/Serialization/Serializer.cpp
    M mlir/test/Dialect/SPIRV/Serialization/phi.mlir

  Log Message:
  -----------
  [spirv] Fix nested loop (de)serialization

For serialization, when we have nested ops, the inner loop will create multiple
SPIR-V blocks. If the outer loop has block arguments (which corresponds to
OpPhi instructions), we defer the handling of OpPhi's parent block handling
until we serialized all blocks and then fix it up with the result <id>. These two
cases happening together was generating invalid SPIR-V blob because we
previously assume the parent block to be the block containing the terminator.
That is not true anymore when the block contains structured control flow ops.
If that happens, it should be fixed to use the structured control flow op's
merge block.

For deserialization, we record a map from header blocks to their corresponding
merge and continue blocks during the initial deserialization and then use the
info to construct spv.selection/spv.loop. The existing implementation will also
fall apart when we have nested loops. If so, we clone all blocks for the outer
loop, including the ones for the inner loop, to the spv.loop's region. So the map
for header blocks' merge info need to be updated; otherwise we are operating
on already deleted blocks.

PiperOrigin-RevId: 283949230


  Commit: 780f0c043aa6f42886c23215be7e39baa5905229
      https://github.com/llvm/llvm-project/commit/780f0c043aa6f42886c23215be7e39baa5905229
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-12-05 (Thu, 05 Dec 2019)

  Changed paths:
    M mlir/lib/IR/Diagnostics.cpp

  Log Message:
  -----------
  Add a flag to dump the current stack trace when emitting a diagnostic.

It is often desirable to know where within the program that a diagnostic was emitted, without reverting to assert/unreachable which crash the program. This change adds a flag `mlir-print-stacktrace-on-diagnostic` that attaches the current stack trace as a note to every diagnostic that gets emitted.

PiperOrigin-RevId: 283996373


  Commit: 037044b0ae4bc72f7c53db4f8435f7d163d2b68a
      https://github.com/llvm/llvm-project/commit/037044b0ae4bc72f7c53db4f8435f7d163d2b68a
  Author: Lei Zhang <antiagainst at google.com>
  Date:   2019-12-05 (Thu, 05 Dec 2019)

  Changed paths:
    A mlir/include/mlir/Dialect/SPIRV/SPIRVAtomicOps.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVBase.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVOps.td
    M mlir/lib/Dialect/SPIRV/SPIRVOps.cpp
    A mlir/test/Dialect/SPIRV/Serialization/atomic-ops.mlir
    A mlir/test/Dialect/SPIRV/atomic-ops.mlir

  Log Message:
  -----------
  Add spv.AtomicCompareExchangeWeak

PiperOrigin-RevId: 283997917


  Commit: 4d61a79db46e1cab990444cbcb84467faff7f042
      https://github.com/llvm/llvm-project/commit/4d61a79db46e1cab990444cbcb84467faff7f042
  Author: Mahesh Ravishankar <ravishankarm at google.com>
  Date:   2019-12-05 (Thu, 05 Dec 2019)

  Changed paths:
    M mlir/include/mlir/Conversion/GPUToSPIRV/ConvertGPUToSPIRV.h
    M mlir/include/mlir/Conversion/GPUToSPIRV/ConvertGPUToSPIRVPass.h
    M mlir/lib/Conversion/GPUToSPIRV/CMakeLists.txt
    M mlir/lib/Conversion/GPUToSPIRV/ConvertGPUToSPIRV.cpp
    M mlir/lib/Conversion/GPUToSPIRV/ConvertGPUToSPIRVPass.cpp
    M mlir/test/Conversion/GPUToSPIRV/simple.mlir

  Log Message:
  -----------
  Allow specification of the workgroup size for GPUToSPIRV lowering.

SPIR-V/Vulkan spec requires the workgroups size to be specified with
the spv.ExecutionMode operation. This was hard-wired to be set to a
particular value. It is now changed to be configurable by clients of
the pass or of the patterns that implement the lowering from GPU to
SPIRV.

PiperOrigin-RevId: 284017482


  Commit: 33a64540ade2dc9e860ddd6d4c1adbd1088e94c2
      https://github.com/llvm/llvm-project/commit/33a64540ade2dc9e860ddd6d4c1adbd1088e94c2
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-12-05 (Thu, 05 Dec 2019)

  Changed paths:
    M mlir/g3doc/WritingAPass.md
    M mlir/include/mlir/Pass/Pass.h
    M mlir/include/mlir/Pass/PassManager.h
    M mlir/lib/Pass/Pass.cpp
    M mlir/lib/Pass/PassDetail.h
    M mlir/lib/Pass/PassManagerOptions.cpp
    A mlir/lib/Pass/PassStatistics.cpp
    M mlir/lib/Pass/PassTiming.cpp
    M mlir/lib/Transforms/CSE.cpp
    A mlir/test/Pass/pipeline-stats.mlir
    M mlir/test/lib/Pass/TestPassManager.cpp

  Log Message:
  -----------
  Add support for instance specific pass statistics.

Statistics are a way to keep track of what the compiler is doing and how effective various optimizations are. It is useful to see what optimizations are contributing to making a particular program run faster. Pass-instance specific statistics take this even further as you can see the effect of placing a particular pass at specific places within the pass pipeline, e.g. they could help answer questions like "what happens if I run CSE again here".

Statistics can be added to a pass by simply adding members of type 'Pass::Statistics'. This class takes as a constructor arguments: the parent pass pointer, a name, and a description. Statistics can be dumped by the pass manager in a similar manner to how pass timing information is dumped, i.e. via PassManager::enableStatistics programmatically; or -pass-statistics and -pass-statistics-display via the command line pass manager options.

Below is an example:

struct MyPass : public OperationPass<MyPass> {
  Statistic testStat{this, "testStat", "A test statistic"};

  void runOnOperation() {
    ...
    ++testStat;
    ...
  }
};

$ mlir-opt -pass-pipeline='func(my-pass,my-pass)' foo.mlir -pass-statistics

Pipeline Display:
===-------------------------------------------------------------------------===
                         ... Pass statistics report ...
===-------------------------------------------------------------------------===
'func' Pipeline
  MyPass
    (S) 15 testStat - A test statistic
  MyPass
    (S)  6 testStat - A test statistic

List Display:
===-------------------------------------------------------------------------===
                         ... Pass statistics report ...
===-------------------------------------------------------------------------===
MyPass
  (S) 21 testStat - A test statistic

PiperOrigin-RevId: 284022014


  Commit: e67acfa4684e4bee38d3b4c90eff1e78adc62cef
      https://github.com/llvm/llvm-project/commit/e67acfa4684e4bee38d3b4c90eff1e78adc62cef
  Author: Denis Khalikov <khalikov.denis at huawei.com>
  Date:   2019-12-05 (Thu, 05 Dec 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/SPIRV/SPIRVBase.td
    A mlir/include/mlir/Dialect/SPIRV/SPIRVCompositeOps.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVOps.td
    M mlir/lib/Dialect/SPIRV/SPIRVOps.cpp
    A mlir/test/Dialect/SPIRV/Serialization/composite-op.mlir
    A mlir/test/Dialect/SPIRV/composite-ops.mlir
    M mlir/test/Dialect/SPIRV/ops.mlir

  Log Message:
  -----------
  [spirv] Add CompositeInsertOp operation

A CompositeInsertOp operation make a copy of a composite object,
while modifying one part of it.

Closes tensorflow/mlir#292

COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/292 from denis0x0D:sandbox/composite_insert 2200962b9057bda53cd2f2866b461e2797196380
PiperOrigin-RevId: 284036551


  Commit: daff60cd68ddf7a198925c9daa3da4320b5c3f25
      https://github.com/llvm/llvm-project/commit/daff60cd68ddf7a198925c9daa3da4320b5c3f25
  Author: nmostafa <nagy.h.mostafa at intel.com>
  Date:   2019-12-05 (Thu, 05 Dec 2019)

  Changed paths:
    M mlir/g3doc/ConversionToLLVMDialect.md
    M mlir/g3doc/Dialects/Standard.md
    M mlir/g3doc/LangRef.md
    M mlir/include/mlir/Conversion/StandardToLLVM/ConvertStandardToLLVM.h
    M mlir/include/mlir/Dialect/StandardOps/Ops.td
    M mlir/include/mlir/IR/OpBase.td
    M mlir/include/mlir/IR/StandardTypes.h
    M mlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp
    M mlir/lib/Dialect/StandardOps/Ops.cpp
    M mlir/lib/IR/AsmPrinter.cpp
    M mlir/lib/IR/MLIRContext.cpp
    M mlir/lib/IR/StandardTypes.cpp
    M mlir/lib/IR/TypeDetail.h
    M mlir/lib/Parser/Parser.cpp
    M mlir/test/Conversion/StandardToLLVM/convert-memref-ops.mlir
    M mlir/test/IR/core-ops.mlir
    M mlir/test/IR/invalid-ops.mlir
    M mlir/test/mlir-cpu-runner/include/mlir_runner_utils.h
    M mlir/test/mlir-cpu-runner/mlir_runner_utils.cpp
    A mlir/test/mlir-cpu-runner/unranked_memref.mlir
    M mlir/test/mlir-cpu-runner/utils.mlir
    M mlir/test/mlir-cuda-runner/all-reduce-op.mlir
    M mlir/test/mlir-cuda-runner/all-reduce-region.mlir

  Log Message:
  -----------
  Add UnrankedMemRef Type

Closes tensorflow/mlir#261

COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/261 from nmostafa:nmostafa/unranked 96b6e918f6ed64496f7573b2db33c0b02658ca45
PiperOrigin-RevId: 284037040


  Commit: da53000fb4191a3c1cef31d0b2faf4757a5dcfec
      https://github.com/llvm/llvm-project/commit/da53000fb4191a3c1cef31d0b2faf4757a5dcfec
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-12-05 (Thu, 05 Dec 2019)

  Changed paths:
    M mlir/include/mlir/Pass/PassManager.h
    M mlir/lib/Pass/IRPrinting.cpp
    M mlir/lib/Pass/PassManagerOptions.cpp

  Log Message:
  -----------
  Refactor the IRPrinting instrumentation to take a derivable config.

This allows for more interesting behavior from users, e.g. enabling the ability to dump the IR to a separate file for each pass invocation.

PiperOrigin-RevId: 284059447


  Commit: f60bbb6c3b407b25367ce5bc5637b6edaf8c9e16
      https://github.com/llvm/llvm-project/commit/f60bbb6c3b407b25367ce5bc5637b6edaf8c9e16
  Author: Jose Ignacio Gomez <jigomez at ucm.es>
  Date:   2019-12-05 (Thu, 05 Dec 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/Linalg/Transforms/LinalgTransformPatterns.td
    M mlir/include/mlir/Dialect/Linalg/Transforms/LinalgTransforms.h
    M mlir/include/mlir/Dialect/Linalg/Utils/Utils.h
    M mlir/include/mlir/IR/AffineMap.h
    M mlir/lib/Dialect/Linalg/Transforms/LinalgTransforms.cpp
    M mlir/lib/Dialect/Linalg/Transforms/Tiling.cpp
    M mlir/lib/IR/AffineMap.cpp
    A mlir/test/Dialect/Linalg/tile_permute_patterns.mlir
    M mlir/test/lib/DeclarativeTransforms/CMakeLists.txt
    A mlir/test/lib/DeclarativeTransforms/TestLinalgTilePermutePatterns.td
    M mlir/test/lib/Transforms/CMakeLists.txt
    A mlir/test/lib/Transforms/TestLinalgTilePermuteTransforms.cpp

  Log Message:
  -----------
  [Linalg] Add permutation information to tiling

This patch closes issue tensorflow/mlir#271.
It adds an optional permutation map to declarative tiling transformations.
The map is expressed as a list of integers.

Closes tensorflow/mlir#288

COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/288 from tetuante:issue271 2df2938d6a1f01b3bc404ded08dea2dd1e10b588
PiperOrigin-RevId: 284064151


  Commit: 71999ff7f2b23091d06f1306b844038d56c48ae9
      https://github.com/llvm/llvm-project/commit/71999ff7f2b23091d06f1306b844038d56c48ae9
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-12-05 (Thu, 05 Dec 2019)

  Changed paths:
    M mlir/test/lib/IR/CMakeLists.txt

  Log Message:
  -----------
  Add include path to the TestDialect to fix broken build.

PiperOrigin-RevId: 284067891


  Commit: 12e57cf6c030a4d1a071ee668d17c5db169d98d6
      https://github.com/llvm/llvm-project/commit/12e57cf6c030a4d1a071ee668d17c5db169d98d6
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-12-05 (Thu, 05 Dec 2019)

  Changed paths:
    M mlir/g3doc/Diagnostics.md

  Log Message:
  -----------
  NFC: Add documentation for `-mlir-print-op-on-diagnostic` and `-mlir-print-stacktrace-on-diagnostic`.

This change adds proper documentation in Diagnostics.md, allowing for users to more easily find them.

PiperOrigin-RevId: 284092336


  Commit: 58adf99ed1a2656c8aec310e6f78da986eb05570
      https://github.com/llvm/llvm-project/commit/58adf99ed1a2656c8aec310e6f78da986eb05570
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2019-12-06 (Fri, 06 Dec 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
    M mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
    M mlir/test/Dialect/LLVMIR/global.mlir

  Log Message:
  -----------
  LLVM::AddressOfOp: properly take into account the address space

The AddressOf operation in the LLVM dialect return a pointer to a global
variable. The latter may be in a non-default address space as indicated by the
"addr_space" attribute. Check that the address space of the pointer returned by
AddressOfOp matches that of the referenced GlobalOp. Update the AddressOfOp
builder to respect this constraint.

PiperOrigin-RevId: 284138860


  Commit: 84a6182ddd62a2ca8eee2d8470e3be1ef6147fce
      https://github.com/llvm/llvm-project/commit/84a6182ddd62a2ca8eee2d8470e3be1ef6147fce
  Author: Kazuaki Ishizaki <ishizaki at jp.ibm.com>
  Date:   2019-12-06 (Fri, 06 Dec 2019)

  Changed paths:
    M mlir/examples/toy/Ch7/mlir/MLIRGen.cpp
    M mlir/g3doc/DeclarativeRewrites.md
    M mlir/g3doc/Dialects/GPU.md
    M mlir/g3doc/OpDefinitions.md
    M mlir/g3doc/WritingAPass.md
    M mlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp
    M mlir/lib/Dialect/SPIRV/SPIRVLowering.cpp
    M mlir/lib/Dialect/SPIRV/Serialization/Deserializer.cpp
    M mlir/lib/IR/AsmPrinter.cpp
    M mlir/lib/IR/Diagnostics.cpp
    M mlir/lib/IR/Operation.cpp
    M mlir/lib/IR/SymbolTable.cpp
    M mlir/lib/Pass/PassTiming.cpp
    M mlir/lib/Transforms/LoopFusion.cpp
    M mlir/test/IR/traits.mlir
    M mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
    M mlir/tools/mlir-tblgen/RewriterGen.cpp
    M mlir/tools/mlir-tblgen/SPIRVUtilsGen.cpp
    M mlir/unittests/TableGen/StructsGenTest.cpp

  Log Message:
  -----------
  minor spelling tweaks

Closes tensorflow/mlir#290

COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/290 from kiszk:spelling_tweaks_201912 9d9afd16a723dd65754a04698b3976f150a6054a
PiperOrigin-RevId: 284169681


  Commit: 3ade6a7d151779d617ca2404eff0125f998bc646
      https://github.com/llvm/llvm-project/commit/3ade6a7d151779d617ca2404eff0125f998bc646
  Author: Uday Bondhugula <uday at polymagelabs.com>
  Date:   2019-12-06 (Fri, 06 Dec 2019)

  Changed paths:
    M mlir/lib/Dialect/StandardOps/Ops.cpp
    M mlir/test/Conversion/VectorToLoops/vector-to-loops.mlir
    M mlir/test/Dialect/Linalg/loops.mlir
    M mlir/test/Transforms/canonicalize.mlir

  Log Message:
  -----------
  DimOp folding for alloc/view dynamic dimensions

Signed-off-by: Uday Bondhugula <uday at polymagelabs.com>

Closes tensorflow/mlir#253

COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/253 from bondhugula:dimop a4b464f24ae63fd259114558d87e11b8ee4dae86
PiperOrigin-RevId: 284169689


  Commit: 9ca53130f3838b23c87c9e856d799a97e1dc2d7a
      https://github.com/llvm/llvm-project/commit/9ca53130f3838b23c87c9e856d799a97e1dc2d7a
  Author: Denis Khalikov <khalikov.denis at huawei.com>
  Date:   2019-12-06 (Fri, 06 Dec 2019)

  Changed paths:
    M mlir/lib/Dialect/SPIRV/Serialization/Deserializer.cpp

  Log Message:
  -----------
  [spirv] Reorder `erase` and `emplace` to avoid "invalid iterator access".

The iterator should be erased before adding a new entry
into blockMergeInfo to avoid iterator invalidation.

Closes tensorflow/mlir#299

COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/299 from denis0x0D:sandbox/reoder_erase 983be565809aa0aadfc7e92962e4d4b282f63c66
PiperOrigin-RevId: 284173235


  Commit: 41f8e105faef4035c0fafdf13cf095dfa7c5fb01
      https://github.com/llvm/llvm-project/commit/41f8e105faef4035c0fafdf13cf095dfa7c5fb01
  Author: Andy Davis <andydavis at google.com>
  Date:   2019-12-06 (Fri, 06 Dec 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/VectorOps/VectorOps.h
    M mlir/include/mlir/Dialect/VectorOps/VectorOps.td
    M mlir/lib/Dialect/VectorOps/VectorOps.cpp
    M mlir/lib/Dialect/VectorOps/VectorToVector.cpp
    M mlir/test/Conversion/VectorConversions/vector-to-vector.mlir
    M mlir/test/Dialect/VectorOps/invalid.mlir
    M mlir/test/Dialect/VectorOps/ops.mlir

  Log Message:
  -----------
  Unroll vector masks along with their associated vector arguments.

Updates vector ContractionOp to use proper vector masks (produced by CreateMaskOp/ConstantMaskOp).
Leverages the following canonicalizations in unrolling unit test: CreateMaskOp -> ConstantMaskOp, StridedSliceOp(ConstantMaskOp) -> ConstantMaskOp
Removes IndexTupleOp (no longer needed now that we have vector mask ops).
Updates all unit tests.

PiperOrigin-RevId: 284182168


  Commit: 79047e1ab5649ddca0253178ce21b376f15bfc4b
      https://github.com/llvm/llvm-project/commit/79047e1ab5649ddca0253178ce21b376f15bfc4b
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-12-06 (Fri, 06 Dec 2019)

  Changed paths:
    M mlir/test/Pass/pipeline-stats.mlir

  Log Message:
  -----------
  Use regex to fix failure when stats are disabled.

It would be nice if we could detect if stats were enabled or not and use 'Requires', but this isn't possible to do at configure time.

Fixes tensorflow/mlir#296

PiperOrigin-RevId: 284200271


  Commit: 3c69ca1e696645a944fac6c9794d71e8424665c5
      https://github.com/llvm/llvm-project/commit/3c69ca1e696645a944fac6c9794d71e8424665c5
  Author: Alexandre E. Eichenberger <alexe at us.ibm.com>
  Date:   2019-12-06 (Fri, 06 Dec 2019)

  Changed paths:
    M mlir/lib/Transforms/Vectorize.cpp

  Log Message:
  -----------
  fix examples in comments

Closes tensorflow/mlir#301

COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/301 from AlexandreEichenberger:vect-doc-update 7e5418a9101a4bdad2357882fe660b02bba8bd01
PiperOrigin-RevId: 284202462


  Commit: e216a72ab8587c443e4c5c06aabc71c36712ce7e
      https://github.com/llvm/llvm-project/commit/e216a72ab8587c443e4c5c06aabc71c36712ce7e
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2019-12-06 (Fri, 06 Dec 2019)

  Changed paths:
    M mlir/include/mlir/Conversion/StandardToLLVM/ConvertStandardToLLVM.h
    M mlir/include/mlir/Dialect/GPU/GPUDialect.h
    M mlir/lib/Conversion/GPUToNVVM/LowerGpuOpsToNVVMOps.cpp
    M mlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp
    A mlir/test/Conversion/GPUToNVVM/memory-attrbution.mlir

  Log Message:
  -----------
  Add conversions of GPU func with memory attributions to LLVM/NVVM

GPU functions use memory attributions, a combination of Op attributes and
region arguments, to specify function-wide buffers placed in workgroup or
private memory spaces. Introduce a lowering pattern for GPU functions to be
converted to LLVM functions taking into account memory attributions. Workgroup
attributions get transformed into module-level globals with unique names
derived from function names. Private attributions get converted into
llvm.allocas inside the function body. In both cases, we inject at the
beginning of the function the IR that obtains the raw pointer to the data and
populates a MemRef descriptor based on the MemRef type of buffer, making
attributions compose with the rest of the MemRef lowering and transparent for
use with std.load and std.store. While using raw pointers instead of
descriptors might have been more efficient, it is better implemented as a
canonicalization or a separate transformation so that non-attribution memrefs
could also benefit from it.

PiperOrigin-RevId: 284208396


  Commit: 398f04aa49109fd5d1eff2c1946a2956dc6b29c6
      https://github.com/llvm/llvm-project/commit/398f04aa49109fd5d1eff2c1946a2956dc6b29c6
  Author: Jacques Pienaar <jpienaar at google.com>
  Date:   2019-12-06 (Fri, 06 Dec 2019)

  Changed paths:
    M mlir/include/mlir/Analysis/InferTypeOpInterface.td
    M mlir/test/lib/TestDialect/TestPatterns.cpp
    M mlir/test/mlir-tblgen/return-types.mlir
    M mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp

  Log Message:
  -----------
  Generate builder for ops that use InferTypeOpInterface trait in ODS

For ops with infer type op interface defined, generate version that calls the inferal method on build. This is intermediate step to removing special casing of SameOperandsAndResultType & FirstAttrDereivedResultType. After that would be generating the inference code, with the initial focus on shaped container types. In between I plan to refactor these a bit to reuse generated paths. The intention would not be to add the type inference trait in multiple places, but rather to take advantage of the current modelling in ODS where possible to emit it instead.

Switch the `inferReturnTypes` method to be static.

Skipping ops with regions here as I don't like the Region vs unique_ptr<Region> difference at the moment, and I want the infer return type trait to be useful for verification too. So instead, just skip it for now to avoid churn.

PiperOrigin-RevId: 284217913


  Commit: b36aaeafb1b026213432b5a8110467e16ed3f306
      https://github.com/llvm/llvm-project/commit/b36aaeafb1b026213432b5a8110467e16ed3f306
  Author: Aart Bik <ajcbik at google.com>
  Date:   2019-12-06 (Fri, 06 Dec 2019)

  Changed paths:
    M mlir/lib/Conversion/VectorToLLVM/ConvertVectorToLLVM.cpp
    M mlir/lib/Dialect/VectorOps/VectorOps.cpp
    M mlir/test/Conversion/VectorToLLVM/vector-to-llvm.mlir
    M mlir/test/Dialect/VectorOps/invalid.mlir

  Log Message:
  -----------
  [VectorOps] Add lowering of vector.broadcast to LLVM IR

For example, a scalar broadcast

    %0 = vector.broadcast %x : f32 to vector<2xf32>
    return %0 : vector<2xf32>

which expands scalar x into vector [x,x] by lowering
to the following LLVM IR dialect to implement the
duplication over the leading dimension.

    %0 = llvm.mlir.undef : !llvm<"<2 x float>">
    %1 = llvm.mlir.constant(0 : index) : !llvm.i64
    %2 = llvm.insertelement %x, %0[%1 : !llvm.i64] : !llvm<"<2 x float>">
    %3 = llvm.shufflevector %2, %0 [0 : i32, 0 : i32] : !llvm<"<2 x float>">, !llvm<"<2 x float>">
    return %3 : vector<2xf32>

In the trailing dimensions, the operand is simply
"passed through", unless a more elaborate "stretch"
is required.

For example

    %0 = vector.broadcast %arg0 : vector<1xf32> to vector<4xf32>
    return %0 : vector<4xf32>

becomes

    %0 = llvm.mlir.undef : !llvm<"<4 x float>">
    %1 = llvm.mlir.constant(0 : index) : !llvm.i64
    %2 = llvm.extractelement %arg0[%1 : !llvm.i64] : !llvm<"<1 x float>">
    %3 = llvm.mlir.constant(0 : index) : !llvm.i64
    %4 = llvm.insertelement %2, %0[%3 : !llvm.i64] : !llvm<"<4 x float>">
    %5 = llvm.shufflevector %4, %0 [0 : i32, 0 : i32, 0 : i32, 0 : i32] : !llvm<"<4 x float>">, !llvm<"<4 x float>">
    llvm.return %5 : !llvm<"<4 x float>">

PiperOrigin-RevId: 284219926


  Commit: 9ef9e236820cf37b9d152fef1f265e6c5338332a
      https://github.com/llvm/llvm-project/commit/9ef9e236820cf37b9d152fef1f265e6c5338332a
  Author: MLIR Team <no-reply at google.com>
  Date:   2019-12-06 (Fri, 06 Dec 2019)

  Changed paths:
    M mlir/bindings/python/pybind.cpp
    M mlir/bindings/python/test/test_py2and3.py

  Log Message:
  -----------
  Provide a way to get the type of a ValueHandle.

PiperOrigin-RevId: 284221337


  Commit: ccc767d63bea96652b97f4b726bbcf079716f33e
      https://github.com/llvm/llvm-project/commit/ccc767d63bea96652b97f4b726bbcf079716f33e
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2019-12-06 (Fri, 06 Dec 2019)

  Changed paths:
    M mlir/g3doc/Dialects/GPU.md
    M mlir/include/mlir/Dialect/GPU/GPUDialect.h
    M mlir/include/mlir/Dialect/GPU/GPUOps.td
    M mlir/include/mlir/IR/OpBase.td
    M mlir/lib/Dialect/GPU/IR/GPUDialect.cpp

  Log Message:
  -----------
  Move GPU::FuncOp definition to ODS - NFC

Move the definition of the GPU function opreation from hand-rolled C++ code to
ODS framework. This only does the moves, a follow-up is necessary to clean up
users of custom functions that could be auto-generated by ODS.

PiperOrigin-RevId: 284233245


  Commit: be3ed14658721aa458eeb887db5a5fc4b5a5fc1e
      https://github.com/llvm/llvm-project/commit/be3ed14658721aa458eeb887db5a5fc4b5a5fc1e
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2019-12-06 (Fri, 06 Dec 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
    M mlir/lib/Conversion/GPUToNVVM/LowerGpuOpsToNVVMOps.cpp
    M mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp

  Log Message:
  -----------
  LLVM::GlobalOp: take address space as builder argument

Accept the address space of the global as a builder argument when constructing
an LLVM::GlobalOp instance. This decreases the reliance of LLVM::GlobalOp users
on the internal name of the attribute used for this purpose. Update several
uses of the address space in GPU to NVVM conversion.

PiperOrigin-RevId: 284233254


  Commit: d37f27251f13ee6780267683fb9c4e69aa9c15a6
      https://github.com/llvm/llvm-project/commit/d37f27251f13ee6780267683fb9c4e69aa9c15a6
  Author: Aart Bik <ajcbik at google.com>
  Date:   2019-12-06 (Fri, 06 Dec 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/VectorOps/VectorOps.td
    M mlir/lib/Conversion/VectorToLLVM/ConvertVectorToLLVM.cpp
    M mlir/lib/Dialect/VectorOps/VectorOps.cpp
    M mlir/test/Conversion/VectorToLLVM/vector-to-llvm.mlir
    M mlir/test/Dialect/VectorOps/invalid.mlir
    M mlir/test/Dialect/VectorOps/ops.mlir

  Log Message:
  -----------
  [VecOps] Rename vector.[insert|extract]element to just vector.[insert|extract]

Since these operations lower to [insert|extract][element|value] at LLVM
dialect level, neither element nor value would correctly reflect the meaning.

PiperOrigin-RevId: 284240727


  Commit: 6e0a2e4e2fedbbfea4cb95b8d5ac7a85ff3a2911
      https://github.com/llvm/llvm-project/commit/6e0a2e4e2fedbbfea4cb95b8d5ac7a85ff3a2911
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2019-12-06 (Fri, 06 Dec 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td

  Log Message:
  -----------
  Use named traits in the ODS definition of LLVMFuncOp

The "FunctionLike" and "IsIsolatedFromAbove" op traits are now defined as named
records in base ODS file. Use those instead of NativeOpTrait referring to the
C++ class name in the ODS definition of LLVMFuncOp. NFC.

PiperOrigin-RevId: 284260891


  Commit: 3230267d0dbdc908d7be5886e20c2ee5f0e942fe
      https://github.com/llvm/llvm-project/commit/3230267d0dbdc908d7be5886e20c2ee5f0e942fe
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2019-12-06 (Fri, 06 Dec 2019)

  Changed paths:
    M mlir/g3doc/Dialects/GPU.md
    M mlir/include/mlir/Dialect/GPU/GPUDialect.h
    M mlir/include/mlir/Dialect/GPU/GPUOps.td
    M mlir/lib/Dialect/GPU/IR/GPUDialect.cpp

  Log Message:
  -----------
  Move GPU::LaunchOp to ODS. NFC.

Move the definition of the GPU launch opreation from hand-rolled C++ code to
ODS framework. This only does the moves, a follow-up is necessary to clean up
users of custom functions that could be auto-generated by ODS.

PiperOrigin-RevId: 284261856


  Commit: 883f5557263e5543c2a8cf7621be885760b47d5d
      https://github.com/llvm/llvm-project/commit/883f5557263e5543c2a8cf7621be885760b47d5d
  Author: Mahesh Ravishankar <ravishankarm at google.com>
  Date:   2019-12-06 (Fri, 06 Dec 2019)

  Changed paths:
    M mlir/lib/Dialect/SPIRV/Serialization/TranslateRegistration.cpp

  Log Message:
  -----------
  During serialization do a walk of ops in module to find spv.module.

During lowering, spv.module might be within other modules (for example
gpu kernel module). Walk the module op to find spirv module to
serialize.

PiperOrigin-RevId: 284262550


  Commit: e96150eb46d8c381f11a7333f0384aad0fc8d1b6
      https://github.com/llvm/llvm-project/commit/e96150eb46d8c381f11a7333f0384aad0fc8d1b6
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2019-12-06 (Fri, 06 Dec 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/GPU/GPUOps.td
    M mlir/lib/Conversion/LoopsToGPU/LoopsToGPU.cpp
    M mlir/lib/Dialect/GPU/IR/GPUDialect.cpp
    M mlir/lib/Dialect/GPU/Transforms/KernelOutlining.cpp

  Log Message:
  -----------
  Replace custom getBody method with an ODS-generated in gpu::LaunchOp

PiperOrigin-RevId: 284262981


  Commit: 4add9edd7212f9e0b51552250cee606b4d93a043
      https://github.com/llvm/llvm-project/commit/4add9edd7212f9e0b51552250cee606b4d93a043
  Author: Jacques Pienaar <jpienaar at google.com>
  Date:   2019-12-06 (Fri, 06 Dec 2019)

  Changed paths:
    M mlir/include/mlir/Analysis/InferTypeOpInterface.td
    M mlir/test/lib/TestDialect/TestDialect.cpp
    M mlir/test/lib/TestDialect/TestPatterns.cpp
    M mlir/test/mlir-tblgen/return-types.mlir
    M mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp

  Log Message:
  -----------
  Change inferReturnTypes to return LogicalResult and values

Previously the error case was using a sentinel in the error case which was bad. Also make the one `build` invoke the other `build` to reuse verification there.

And follow up on suggestion to use formatv which I missed during previous review.

PiperOrigin-RevId: 284265762


  Commit: 6500b7e0c085432873c250e75b6ff47cced22239
      https://github.com/llvm/llvm-project/commit/6500b7e0c085432873c250e75b6ff47cced22239
  Author: Mahesh Ravishankar <ravishankarm at google.com>
  Date:   2019-12-06 (Fri, 06 Dec 2019)

  Changed paths:
    M mlir/lib/Conversion/StandardToSPIRV/ConvertStandardToSPIRV.cpp

  Log Message:
  -----------
  NFC: Separate implementation and definition in ConvertStandardToSPIRV.cpp
PiperOrigin-RevId: 284274326


  Commit: fcc215e39979b0f678de84b37a5e2ab208839a8c
      https://github.com/llvm/llvm-project/commit/fcc215e39979b0f678de84b37a5e2ab208839a8c
  Author: nmostafa <nagy.h.mostafa at intel.com>
  Date:   2019-12-06 (Fri, 06 Dec 2019)

  Changed paths:
    M mlir/g3doc/LangRef.md

  Log Message:
  -----------
  Fix langref code snippet - NFC

Closes tensorflow/mlir#294

PiperOrigin-RevId: 284281172


  Commit: ca23bd78d4bed96020f7e681a88c4c767fe594aa
      https://github.com/llvm/llvm-project/commit/ca23bd78d4bed96020f7e681a88c4c767fe594aa
  Author: Uday Bondhugula <uday at polymagelabs.com>
  Date:   2019-12-06 (Fri, 06 Dec 2019)

  Changed paths:
    M mlir/g3doc/Dialects/Affine.md
    M mlir/include/mlir/Analysis/AffineStructures.h
    M mlir/include/mlir/IR/AffineExpr.h
    M mlir/lib/Analysis/AffineStructures.cpp
    M mlir/lib/Dialect/AffineOps/AffineOps.cpp
    M mlir/utils/vim/syntax/mlir.vim

  Log Message:
  -----------
  NFC - update doc, comments, vim syntax file

- for the symbol rules, the code was updated but the doc wasn't.

Signed-off-by: Uday Bondhugula <uday at polymagelabs.com>

Closes tensorflow/mlir#284

COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/284 from bondhugula:doc 9aad8b8a715559f7ce61265f3da3f8a3c11b45ea
PiperOrigin-RevId: 284283712


  Commit: 8904e910354d7ba0a1fcb56c082cc184e430a077
      https://github.com/llvm/llvm-project/commit/8904e910354d7ba0a1fcb56c082cc184e430a077
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-12-06 (Fri, 06 Dec 2019)

  Changed paths:
    M mlir/g3doc/WritingAPass.md
    M mlir/include/mlir/Pass/PassManager.h
    M mlir/lib/Pass/IRPrinting.cpp
    M mlir/lib/Pass/PassManagerOptions.cpp
    M mlir/test/Pass/ir-printing.mlir

  Log Message:
  -----------
  Add a flag to the IRPrinter instrumentation to only print after a pass if there is a change to the IR.

This adds an additional filtering mode for printing after a pass that checks to see if the pass actually changed the IR before printing it. This "change" detection is implemented using a SHA1 hash of the current operation and its children.

PiperOrigin-RevId: 284291089


  Commit: d27bc1db6a64b6caaf7f64d62a459a595773906b
      https://github.com/llvm/llvm-project/commit/d27bc1db6a64b6caaf7f64d62a459a595773906b
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2019-12-06 (Fri, 06 Dec 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/Linalg/IR/LinalgBase.td
    M mlir/include/mlir/Dialect/Linalg/IR/LinalgLibraryOps.td
    M mlir/include/mlir/Dialect/Linalg/IR/LinalgOps.td

  Log Message:
  -----------
  Improve Linalg documentation following the Structured Ops presentation.

PiperOrigin-RevId: 284291653


  Commit: 9d1a0c72b4ae54b97809966257bd1b9cb3140dfe
      https://github.com/llvm/llvm-project/commit/9d1a0c72b4ae54b97809966257bd1b9cb3140dfe
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-12-06 (Fri, 06 Dec 2019)

  Changed paths:
    M mlir/include/mlir/IR/OpImplementation.h
    M mlir/include/mlir/IR/Operation.h
    M mlir/include/mlir/IR/PatternMatch.h
    M mlir/include/mlir/Support/LLVM.h
    M mlir/include/mlir/Support/STLExtras.h
    M mlir/include/mlir/Transforms/DialectConversion.h
    M mlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp
    M mlir/lib/Dialect/AffineOps/AffineOps.cpp
    M mlir/lib/Dialect/StandardOps/Ops.cpp
    M mlir/lib/Dialect/VectorOps/VectorToVector.cpp
    M mlir/lib/IR/AsmPrinter.cpp
    M mlir/lib/IR/Operation.cpp
    M mlir/lib/IR/PatternMatch.cpp
    M mlir/lib/Transforms/DialectConversion.cpp

  Log Message:
  -----------
  Add a new ValueRange class.

This class represents a generic abstraction over the different ways to represent a range of Values: ArrayRef<Value *>, operand_range, result_range. This class will allow for removing the many instances of explicit SmallVector<Value *, N> construction. It has the same memory cost as ArrayRef, and only suffers cost from indexing(if+elsing the different underlying representations).

This change only updates a few of the existing usages, with more to be changed in followups; e.g. 'build' API.

PiperOrigin-RevId: 284307996


  Commit: d6ee6a031063cb99ca9828f1698a60536ffbb38a
      https://github.com/llvm/llvm-project/commit/d6ee6a031063cb99ca9828f1698a60536ffbb38a
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-12-07 (Sat, 07 Dec 2019)

  Changed paths:
    M mlir/include/mlir/Analysis/InferTypeOpInterface.td
    M mlir/include/mlir/Dialect/AffineOps/AffineOps.h
    M mlir/include/mlir/Dialect/AffineOps/AffineOps.td
    M mlir/include/mlir/Dialect/GPU/GPUDialect.h
    M mlir/include/mlir/Dialect/GPU/GPUOps.td
    M mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
    M mlir/include/mlir/Dialect/Linalg/IR/LinalgLibraryOps.td
    M mlir/include/mlir/Dialect/Linalg/IR/LinalgOps.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVControlFlowOps.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVOps.td
    M mlir/include/mlir/Dialect/StandardOps/Ops.h
    M mlir/include/mlir/Dialect/StandardOps/Ops.td
    M mlir/include/mlir/IR/Operation.h
    M mlir/include/mlir/IR/OperationSupport.h
    M mlir/lib/Conversion/GPUToNVVM/LowerGpuOpsToNVVMOps.cpp
    M mlir/lib/Conversion/LinalgToLLVM/LinalgToLLVM.cpp
    M mlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp
    M mlir/lib/Conversion/StandardToSPIRV/LegalizeStandardForSPIRV.cpp
    M mlir/lib/Dialect/AffineOps/AffineOps.cpp
    M mlir/lib/Dialect/GPU/IR/GPUDialect.cpp
    M mlir/lib/Dialect/GPU/Transforms/KernelOutlining.cpp
    M mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
    M mlir/lib/Dialect/SPIRV/SPIRVOps.cpp
    M mlir/lib/Dialect/StandardOps/Ops.cpp
    M mlir/lib/IR/Operation.cpp
    M mlir/lib/IR/OperationSupport.cpp
    M mlir/lib/Transforms/Utils/LoopUtils.cpp
    M mlir/lib/Transforms/Vectorize.cpp
    M mlir/test/lib/TestDialect/TestDialect.cpp
    M mlir/test/lib/TestDialect/TestPatterns.cpp
    M mlir/test/mlir-tblgen/op-decl.td
    M mlir/test/mlir-tblgen/op-operand.td
    M mlir/test/mlir-tblgen/op-result.td
    M mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp

  Log Message:
  -----------
  Update the builder API to take ValueRange instead of ArrayRef<Value *>

This allows for users to provide operand_range and result_range in builder.create<> calls, instead of requiring an explicit copy into a separate data structure like SmallVector/std::vector.

PiperOrigin-RevId: 284360710


  Commit: 9a4c2df480593a76c9b907f01e595c20e9281e85
      https://github.com/llvm/llvm-project/commit/9a4c2df480593a76c9b907f01e595c20e9281e85
  Author: Lei Zhang <antiagainst at google.com>
  Date:   2019-12-08 (Sun, 08 Dec 2019)

  Changed paths:
    A mlir/include/mlir/Dialect/CommonFolders.h
    M mlir/lib/Dialect/StandardOps/Ops.cpp

  Log Message:
  -----------
  NFC: Expose constFoldBinaryOp via a header

This allows other dialects to reuse the logic to support constant
folding binary operations and reduces code duplication.

PiperOrigin-RevId: 284428721


  Commit: ade58a268ca3795c72a3c8110656821894805531
      https://github.com/llvm/llvm-project/commit/ade58a268ca3795c72a3c8110656821894805531
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2019-12-08 (Sun, 08 Dec 2019)

  Changed paths:
    M mlir/include/mlir/IR/Matchers.h
    A mlir/test/IR/test-matchers.mlir
    M mlir/test/lib/IR/CMakeLists.txt
    A mlir/test/lib/IR/TestMatchers.cpp

  Log Message:
  -----------
  Add a layer of recursive matchers that compose.

This CL adds support for building matchers recursively.
The following matchers are provided:

1. `m_any()` can match any value
2. `m_val(Value *)` binds to a value and must match it
3. `RecursivePatternMatcher<OpType, Matchers...>` n-arity pattern that matches `OpType` and whose operands must be matched exactly by `Matchers...`.

This allows building expression templates for patterns, declaratively, in a very natural fashion.
For example pattern `p9` defined as follows:
```
  auto mul_of_muladd = m_Op<MulFOp>(m_Op<MulFOp>(), m_Op<AddFOp>());
  auto mul_of_anyadd = m_Op<MulFOp>(m_any(), m_Op<AddFOp>());
  auto p9 = m_Op<MulFOp>(m_Op<MulFOp>(
                     mul_of_muladd, m_Op<MulFOp>()),
                   m_Op<MulFOp>(mul_of_anyadd, mul_of_anyadd));
```

Successfully matches `%6` in:
```
  %0 = addf %a, %b: f32
  %1 = addf %a, %c: f32 // matched
  %2 = addf %c, %b: f32
  %3 = mulf %a, %2: f32 // matched
  %4 = mulf %3, %1: f32 // matched
  %5 = mulf %4, %4: f32 // matched
  %6 = mulf %5, %5: f32 // matched
```

Note that 0-ary matchers can be used as leaves in place of n-ary matchers. This alleviates from passing explicit `m_any()` leaves.

In the future, we may add extra patterns to specify that operands may be matched in any order.

PiperOrigin-RevId: 284469446


  Commit: a63f6e0bf98f63e5c18acbaf9eacd8fde6a1b001
      https://github.com/llvm/llvm-project/commit/a63f6e0bf98f63e5c18acbaf9eacd8fde6a1b001
  Author: Uday Bondhugula <uday at polymagelabs.com>
  Date:   2019-12-09 (Mon, 09 Dec 2019)

  Changed paths:
    M mlir/include/mlir/Conversion/StandardToLLVM/ConvertStandardToLLVM.h
    M mlir/include/mlir/IR/OperationSupport.h
    M mlir/lib/Analysis/AffineStructures.cpp
    M mlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp
    M mlir/lib/IR/OperationSupport.cpp
    M mlir/lib/Transforms/Utils/LoopUtils.cpp

  Log Message:
  -----------
  Replace spurious SmallVector constructions with ValueRange

Signed-off-by: Uday Bondhugula <uday at polymagelabs.com>

Closes tensorflow/mlir#305

COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/305 from bondhugula:value_range 21d1fae73f549e3c8e72b60876eff1b864cea39c
PiperOrigin-RevId: 284541027


  Commit: 7b19bd5411a68399db4bcf3c2804a67f1d0b3a62
      https://github.com/llvm/llvm-project/commit/7b19bd5411a68399db4bcf3c2804a67f1d0b3a62
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2019-12-09 (Mon, 09 Dec 2019)

  Changed paths:
    M mlir/include/mlir/IR/Matchers.h
    M mlir/test/IR/test-matchers.mlir
    M mlir/test/lib/IR/TestMatchers.cpp

  Log Message:
  -----------
  Post-submit cleanups in RecursiveMatchers

This CL addresses leftover cleanups and adds a test mixing RecursiveMatchers and m_Constant
that captures properly.

PiperOrigin-RevId: 284551567


  Commit: 70aeb4566e35541ffeef28050babc1c9580b43eb
      https://github.com/llvm/llvm-project/commit/70aeb4566e35541ffeef28050babc1c9580b43eb
  Author: Jacques Pienaar <jpienaar at google.com>
  Date:   2019-12-09 (Mon, 09 Dec 2019)

  Changed paths:
    M mlir/include/mlir/Analysis/InferTypeOpInterface.td
    M mlir/include/mlir/IR/Operation.h
    M mlir/include/mlir/IR/Region.h
    M mlir/lib/IR/Operation.cpp
    M mlir/lib/IR/Region.cpp
    M mlir/test/lib/TestDialect/TestDialect.cpp

  Log Message:
  -----------
  Add RegionRange for when need to abstract over different region iteration

Follows ValueRange in representing a generic abstraction over the different
ways to represent a range of Regions. This wrapper is not as ValueRange and only
considers the current cases of interest: MutableArrayRef<Region> and
ArrayRef<std::unique_ptr<Region>> as occurs during op construction vs op region
querying.

Note: ArrayRef<std::unique_ptr<Region>> allows for unset regions, so this range
returns a pointer to a Region instead of a Region.
PiperOrigin-RevId: 284563229


  Commit: 91c0074624a2ba7f3f56617da75afe70713b82b2
      https://github.com/llvm/llvm-project/commit/91c0074624a2ba7f3f56617da75afe70713b82b2
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2019-12-09 (Mon, 09 Dec 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/Linalg/IR/LinalgLibraryOps.td
    M mlir/include/mlir/Dialect/Linalg/Transforms/LinalgTransformPatterns.td
    M mlir/include/mlir/Dialect/Linalg/Transforms/LinalgTransforms.h
    M mlir/include/mlir/Dialect/VectorOps/VectorOps.td
    M mlir/lib/Dialect/Linalg/CMakeLists.txt
    M mlir/lib/Dialect/Linalg/Transforms/LinalgTransforms.cpp
    M mlir/lib/Dialect/VectorOps/VectorOps.cpp
    M mlir/test/Dialect/Linalg/transform-patterns.mlir
    M mlir/test/lib/DeclarativeTransforms/TestLinalgTransformPatterns.td

  Log Message:
  -----------
  [StructuredOps][Linalg] Add a primitive pattern to rewrite the linalg.generic form of matmul to vector form.

This CL uses the newly expanded matcher support to easily detect when a linalg.generic has a multiply-accumulate body. A linalg.generic with such a body is rewritten as a vector contraction.
This CL additionally limits the rewrite to the case of matrix multiplication on contiguous and statically shaped memrefs for now.

Before expanding further, we should harden the infrastructure for expressing custom ops with the structured ops abstraction.

PiperOrigin-RevId: 284566659


  Commit: ae05cf27c62ad7f656f9ac1bf76d5bfe6fec81b6
      https://github.com/llvm/llvm-project/commit/ae05cf27c62ad7f656f9ac1bf76d5bfe6fec81b6
  Author: Kazuaki Ishizaki <ishizaki at jp.ibm.com>
  Date:   2019-12-09 (Mon, 09 Dec 2019)

  Changed paths:
    M mlir/examples/toy/Ch2/include/toy/Ops.td
    M mlir/examples/toy/Ch3/include/toy/Ops.td
    M mlir/examples/toy/Ch4/include/toy/Ops.td
    M mlir/examples/toy/Ch5/include/toy/Ops.td
    M mlir/examples/toy/Ch6/include/toy/Ops.td
    M mlir/examples/toy/Ch7/include/toy/Ops.td
    M mlir/examples/toy/Ch7/include/toy/Parser.h
    M mlir/g3doc/Traits.md
    M mlir/include/mlir/Dialect/GPU/GPUOps.td
    M mlir/include/mlir/Dialect/SPIRV/LayoutUtils.h
    M mlir/include/mlir/Dialect/SPIRV/SPIRVBitOps.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVLowering.h
    M mlir/include/mlir/Dialect/SPIRV/SPIRVOps.td
    M mlir/include/mlir/Dialect/StandardOps/Ops.h
    M mlir/include/mlir/Dialect/StandardOps/Ops.td
    M mlir/include/mlir/Dialect/VectorOps/VectorOps.td
    M mlir/include/mlir/EDSC/Builders.h
    M mlir/include/mlir/IR/Dialect.h
    M mlir/include/mlir/IR/DialectHooks.h
    M mlir/include/mlir/IR/SymbolTable.h
    M mlir/include/mlir/Pass/PassManager.h
    M mlir/include/mlir/TableGen/Format.h
    M mlir/include/mlir/TableGen/Pattern.h
    M mlir/include/mlir/Translation.h
    M mlir/lib/Analysis/Utils.cpp
    M mlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp
    M mlir/lib/Dialect/SPIRV/Serialization/Serializer.cpp
    M mlir/lib/Pass/Pass.cpp
    M mlir/lib/Pass/PassStatistics.cpp
    M mlir/lib/Transforms/LoopTiling.cpp
    M mlir/lib/Transforms/Utils/LoopUtils.cpp
    M mlir/lib/Transforms/Utils/Utils.cpp
    M mlir/test/Conversion/StandardToLLVM/standard-to-llvm.mlir
    M mlir/test/Dialect/Linalg/llvm.mlir
    M mlir/test/Dialect/SPIRV/Serialization/bit-ops.mlir
    M mlir/test/Dialect/SPIRV/canonicalize.mlir
    M mlir/test/Dialect/SPIRV/ops.mlir
    M mlir/test/Transforms/loop-fusion-slice-computation.mlir
    M mlir/test/lib/TestDialect/TestOps.td
    M mlir/tools/mlir-tblgen/DocGenUtilities.h

  Log Message:
  -----------
  Minor spelling tweaks

Closes tensorflow/mlir#304

PiperOrigin-RevId: 284568358


  Commit: 312ccb1c0f6df2fb67a7ad24ab4ce70dadbcda37
      https://github.com/llvm/llvm-project/commit/312ccb1c0f6df2fb67a7ad24ab4ce70dadbcda37
  Author: Andy Davis <andydavis at google.com>
  Date:   2019-12-09 (Mon, 09 Dec 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/VectorOps/VectorOps.td
    M mlir/lib/Dialect/VectorOps/VectorToVector.cpp
    M mlir/test/Conversion/VectorConversions/vector-to-vector.mlir

  Log Message:
  -----------
  Unify vector op unrolling transformation.

Unifies vector op unrolling transformation, by using the same unrolling implementation for contraction and elementwise operations.
Removes fakefork/join operations which are non longer needed now that we have the InsertStridedSlice operation.

PiperOrigin-RevId: 284570784


  Commit: 4a62019eb88f0f8fafe8f4f7ab1c984313b0b022
      https://github.com/llvm/llvm-project/commit/4a62019eb88f0f8fafe8f4f7ab1c984313b0b022
  Author: Mahesh Ravishankar <ravishankarm at google.com>
  Date:   2019-12-09 (Mon, 09 Dec 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/SPIRV/SPIRVStructureOps.td
    M mlir/lib/Conversion/GPUToSPIRV/ConvertGPUToSPIRV.cpp
    M mlir/lib/Conversion/GPUToSPIRV/ConvertGPUToSPIRVPass.cpp
    M mlir/lib/Dialect/SPIRV/SPIRVLowering.cpp
    M mlir/lib/Dialect/SPIRV/SPIRVOps.cpp
    M mlir/test/Conversion/GPUToSPIRV/simple.mlir

  Log Message:
  -----------
  Add lowering for module with gpu.kernel_module attribute.

The existing GPU to SPIR-V lowering created a spv.module for every
function with gpu.kernel attribute. A better approach is to lower the
module that the function lives in (which has the attribute
gpu.kernel_module) to a spv.module operation. This better captures the
host-device separation modeled by GPU dialect and simplifies the
lowering as well.

PiperOrigin-RevId: 284574688


  Commit: 89cef725f4e03f73c1141edf34351489c10a8943
      https://github.com/llvm/llvm-project/commit/89cef725f4e03f73c1141edf34351489c10a8943
  Author: Jacques Pienaar <jpienaar at google.com>
  Date:   2019-12-09 (Mon, 09 Dec 2019)

  Changed paths:
    M mlir/g3doc/OpDefinitions.md
    M mlir/test/mlir-tblgen/op-attribute.td
    M mlir/test/mlir-tblgen/op-decl.td
    M mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp

  Log Message:
  -----------
  ODS: Generate named accessors for raw attributes

Currently named accessors are generated for attributes returning a consumer
friendly type. But sometimes the attributes are used while transforming an
existing op and then the returned type has to be converted back into an
attribute or the raw `getAttr` needs to be used. Generate raw named accessor
for attributes to reference the raw attributes without having to use the string
interface for better compile time verification. This allows calling
`blahAttr()` instead of `getAttr("blah")`.

Raw here refers to returning the underlying storage attribute.

PiperOrigin-RevId: 284583426


  Commit: 5a48e40a65f5307e27f575b2c91f7ef2a098a20c
      https://github.com/llvm/llvm-project/commit/5a48e40a65f5307e27f575b2c91f7ef2a098a20c
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2019-12-09 (Mon, 09 Dec 2019)

  Changed paths:
    A mlir/include/mlir/Dialect/Utils/StructuredOpsUtils.h
    M mlir/include/mlir/Dialect/VectorOps/VectorOps.td
    M mlir/lib/Dialect/VectorOps/VectorOps.cpp

  Log Message:
  -----------
  Factor out commonly reusable names across structured ops dialects

This CL starts extracting commonalities between dialects that use the structured ops abstractions. Also fixes an OSS build issue where StringRef were incorrectly used with constexpr.

PiperOrigin-RevId: 284591114


  Commit: 2c7e8ed7c6a3e8e9f8e8e9e3c18d62e347f9b2f8
      https://github.com/llvm/llvm-project/commit/2c7e8ed7c6a3e8e9f8e8e9e3c18d62e347f9b2f8
  Author: Lei Zhang <antiagainst at google.com>
  Date:   2019-12-09 (Mon, 09 Dec 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/SPIRV/SPIRVArithmeticOps.td
    M mlir/lib/Dialect/SPIRV/SPIRVOps.cpp
    M mlir/test/Dialect/SPIRV/canonicalize.mlir

  Log Message:
  -----------
  [spirv] Add spv.IAdd, spv.ISub, and spv.IMul folders

The patterns to be folded away can be commonly generated
during lowering to SPIR-V.

PiperOrigin-RevId: 284604855


  Commit: 34265dad65122f4520bd62685c56d8d5f79f3430
      https://github.com/llvm/llvm-project/commit/34265dad65122f4520bd62685c56d8d5f79f3430
  Author: Denis Khalikov <khalikov.denis at huawei.com>
  Date:   2019-12-09 (Mon, 09 Dec 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/SPIRV/SPIRVBase.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVCompositeOps.td
    M mlir/lib/Dialect/SPIRV/SPIRVOps.cpp
    M mlir/test/Dialect/SPIRV/Serialization/composite-op.mlir
    M mlir/test/Dialect/SPIRV/composite-ops.mlir

  Log Message:
  -----------
  [spirv] Add CompositeConstruct operation.

Closes tensorflow/mlir#308

COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/308 from denis0x0D:sandbox/composite_construct 9ef7180f77f9374bcd05afc4f9e6c1d2d72d02b7
PiperOrigin-RevId: 284613617


  Commit: 56da74476c48cfb6af1eb32ad191c3463a7e10e3
      https://github.com/llvm/llvm-project/commit/56da74476c48cfb6af1eb32ad191c3463a7e10e3
  Author: shanshanpt <dev.pengtao at gmail.com>
  Date:   2019-12-09 (Mon, 09 Dec 2019)

  Changed paths:
    M mlir/examples/toy/Ch2/include/toy/Ops.td
    M mlir/examples/toy/Ch3/include/toy/Ops.td
    M mlir/examples/toy/Ch4/include/toy/Ops.td
    M mlir/examples/toy/Ch5/include/toy/Ops.td
    M mlir/examples/toy/Ch6/include/toy/Ops.td
    M mlir/examples/toy/Ch7/include/toy/Ops.td

  Log Message:
  -----------
  Fix minor spelling tweaks.

Closes tensorflow/mlir#306

COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/306 from shanshanpt:master 11430c2131281d84a432f45e854e29917b336e8d
PiperOrigin-RevId: 284613648


  Commit: 7be6a40ab9b914b14ab61ae13e47e0bb8237e74d
      https://github.com/llvm/llvm-project/commit/7be6a40ab9b914b14ab61ae13e47e0bb8237e74d
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-12-09 (Mon, 09 Dec 2019)

  Changed paths:
    M mlir/include/mlir/IR/Attributes.h
    M mlir/include/mlir/IR/Block.h
    M mlir/include/mlir/IR/Operation.h
    M mlir/include/mlir/IR/Region.h
    M mlir/include/mlir/Support/STLExtras.h
    M mlir/lib/IR/Attributes.cpp
    M mlir/lib/IR/Operation.cpp
    M mlir/lib/IR/Region.cpp

  Log Message:
  -----------
  Add new indexed_accessor_range_base and indexed_accessor_range classes that simplify defining index-able ranges.

Many ranges want similar functionality from a range type(e.g. slice/drop_front/operator[]/etc.), so these classes provide a generic implementation that may be used by many different types of ranges. This removes some code duplication, and also empowers many of the existing range types in MLIR(e.g. result type ranges, operand ranges, ElementsAttr ranges, etc.). This change only updates RegionRange and ValueRange, more ranges will be updated in followup commits.

PiperOrigin-RevId: 284615679


  Commit: 3f9744a6b744b9213b0e34f4f3433db8276780f9
      https://github.com/llvm/llvm-project/commit/3f9744a6b744b9213b0e34f4f3433db8276780f9
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-12-09 (Mon, 09 Dec 2019)

  Changed paths:
    M mlir/include/mlir/IR/Block.h
    A mlir/include/mlir/IR/BlockSupport.h
    M mlir/lib/IR/Block.cpp

  Log Message:
  -----------
  Refactor the Block support classes.

Each of the support classes for Block are now moved into a new header BlockSupport.h. The successor iterator class is also reimplemented as an indexed_accessor_range. This makes the class more efficient, and expands on its available functionality.

PiperOrigin-RevId: 284646792


  Commit: 0e963b9c42b374286ccce267611766486435e358
      https://github.com/llvm/llvm-project/commit/0e963b9c42b374286ccce267611766486435e358
  Author: Aart Bik <ajcbik at google.com>
  Date:   2019-12-09 (Mon, 09 Dec 2019)

  Changed paths:
    M mlir/lib/Dialect/VectorOps/VectorOps.cpp
    M mlir/test/Dialect/VectorOps/invalid.mlir

  Log Message:
  -----------
  [VectorOps] Fix off-by-one error in insert/extract validation

PiperOrigin-RevId: 284652653


  Commit: 1fe65688d42d1dacca528a871ac8de370043f793
      https://github.com/llvm/llvm-project/commit/1fe65688d42d1dacca528a871ac8de370043f793
  Author: Aart Bik <ajcbik at google.com>
  Date:   2019-12-09 (Mon, 09 Dec 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/VectorOps/VectorOps.td
    M mlir/lib/Dialect/VectorOps/VectorOps.cpp
    M mlir/test/Conversion/VectorToLLVM/vector-to-llvm.mlir
    M mlir/test/Dialect/VectorOps/invalid.mlir
    M mlir/test/Dialect/VectorOps/ops.mlir

  Log Message:
  -----------
  [VectorOps] Add a ShuffleOp to the VectorOps dialect

For example

 %0 = vector.shuffle %x, %y [3 : i32, 2 : i32, 1 : i32, 0 : i32] : vector<2xf32>, vector<2xf32>

yields a vector<4xf32> result with a permutation of the elements of %x and %y

PiperOrigin-RevId: 284657191


  Commit: acb23ff48d959846e608368e3432c13fe21e67d5
      https://github.com/llvm/llvm-project/commit/acb23ff48d959846e608368e3432c13fe21e67d5
  Author: Jacques Pienaar <jpienaar at google.com>
  Date:   2019-12-09 (Mon, 09 Dec 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/Utils/StructuredOpsUtils.h

  Log Message:
  -----------
  Fix build breakage on gcc-5

Avoid `error: could not convert ?(const char*)"reduction"? from ?const char*? to ?llvm::StringLiteral?`. Tested with gcc-5.5.

PiperOrigin-RevId: 284677810


  Commit: ac4873322f0951a00f8591f2305337ca3d6c7762
      https://github.com/llvm/llvm-project/commit/ac4873322f0951a00f8591f2305337ca3d6c7762
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2019-12-10 (Tue, 10 Dec 2019)

  Changed paths:
    M mlir/g3doc/ConversionToLLVMDialect.md
    M mlir/g3doc/Diagnostics.md
    M mlir/g3doc/Dialects/Affine.md
    M mlir/g3doc/Dialects/GPU.md
    M mlir/g3doc/Dialects/LLVM.md
    M mlir/g3doc/Dialects/SPIR-V.md
    M mlir/g3doc/Dialects/Standard.md
    M mlir/g3doc/EDSC.md
    M mlir/g3doc/LangRef.md
    M mlir/g3doc/MLIRForGraphAlgorithms.md
    M mlir/g3doc/Rationale.md
    M mlir/g3doc/TestingGuide.md
    M mlir/g3doc/Tutorials/Toy/Ch-7.md
    M mlir/include/mlir/Dialect/GPU/GPUOps.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVArithmeticOps.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVAtomicOps.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVBitOps.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVCastOps.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVCompositeOps.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVControlFlowOps.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVGLSLOps.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVGroupOps.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVLogicalOps.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVNonUniformOps.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVOps.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVStructureOps.td
    M mlir/include/mlir/Dialect/VectorOps/VectorOps.td
    M mlir/lib/Conversion/VectorToLoops/ConvertVectorToLoops.cpp
    M mlir/utils/spirv/gen_spirv_dialect.py

  Log Message:
  -----------
  Drop Markdown style annotations

These come from a non-standard extenion that is not available on Github, so it
only clutters the documentation source with {.mlir} or {.ebnf} tags.

PiperOrigin-RevId: 284733003


  Commit: 90b72dd6169d84fddb8878d60f4ecdb80f8526a6
      https://github.com/llvm/llvm-project/commit/90b72dd6169d84fddb8878d60f4ecdb80f8526a6
  Author: Mehdi Amini <aminim at google.com>
  Date:   2019-12-10 (Tue, 10 Dec 2019)

  Changed paths:
    M mlir/g3doc/DeveloperGuide.md

  Log Message:
  -----------
  Add a doc on guidelines for contributing a new dialect to the MLIR core repo

Closes tensorflow/mlir#263

PiperOrigin-RevId: 284760931


  Commit: 04fdd33daf5e660bdc9b011ab6caa69a3dbf8a88
      https://github.com/llvm/llvm-project/commit/04fdd33daf5e660bdc9b011ab6caa69a3dbf8a88
  Author: Mahesh Ravishankar <ravishankarm at google.com>
  Date:   2019-12-10 (Tue, 10 Dec 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/SPIRV/SPIRVCompositeOps.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVStructureOps.td
    M mlir/lib/Dialect/SPIRV/SPIRVLowering.cpp
    M mlir/lib/Dialect/SPIRV/SPIRVOps.cpp

  Log Message:
  -----------
  More convenience build methods for SPIR-V ops.

Add some convenience build methods to SPIR-V ops and update the
lowering to use these methods where possible.

For SPIRV::CompositeExtractOp move the method to deduce type of
element based on base and indices into a convenience function. Some
additional functionality needed to handle differences between parsing
and verification methods.

PiperOrigin-RevId: 284794404


  Commit: 8ccb350979f8fe1f3a80867882bfb1d93fd7dc48
      https://github.com/llvm/llvm-project/commit/8ccb350979f8fe1f3a80867882bfb1d93fd7dc48
  Author: MLIR Team <no-reply at google.com>
  Date:   2019-12-10 (Tue, 10 Dec 2019)

  Changed paths:
    M mlir/bindings/python/pybind.cpp
    M mlir/bindings/python/test/test_py2and3.py

  Log Message:
  -----------
  Add Py API for composing an affine expression with a map. Also allows extracting constant values for const expressions.

PiperOrigin-RevId: 284809623


  Commit: ad38e4980642a2d9b0add2923454212eac3cd94f
      https://github.com/llvm/llvm-project/commit/ad38e4980642a2d9b0add2923454212eac3cd94f
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2019-12-10 (Tue, 10 Dec 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/VectorOps/VectorTransformPatterns.td
    M mlir/include/mlir/IR/StandardTypes.h
    M mlir/lib/Dialect/VectorOps/CMakeLists.txt
    R mlir/lib/Dialect/VectorOps/VectorToVector.cpp
    A mlir/lib/Dialect/VectorOps/VectorTransforms.cpp
    M mlir/lib/IR/StandardTypes.cpp
    R mlir/test/Conversion/VectorConversions/vector-to-vector.mlir
    A mlir/test/Dialect/VectorOps/vector-transforms.mlir
    M mlir/test/lib/DeclarativeTransforms/CMakeLists.txt
    A mlir/test/lib/DeclarativeTransforms/TestVectorTransformPatterns.td
    M mlir/test/lib/Transforms/CMakeLists.txt
    R mlir/test/lib/Transforms/TestVectorToVectorConversion.cpp
    A mlir/test/lib/Transforms/TestVectorTransforms.cpp

  Log Message:
  -----------
  Uniformize Vector transforms as patterns on the model of Linalg - NFC

This reorganizes the vector transformations to be more easily testable as patterns and more easily composable into fused passes in the future.

PiperOrigin-RevId: 284817474


  Commit: b19fed5415386b6485586fdfb176be0c57b19a54
      https://github.com/llvm/llvm-project/commit/b19fed5415386b6485586fdfb176be0c57b19a54
  Author: Jose Ignacio Gomez <jigomez at ucm.es>
  Date:   2019-12-10 (Tue, 10 Dec 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/Linalg/Transforms/LinalgTransformPatterns.td
    M mlir/include/mlir/Dialect/Linalg/Transforms/LinalgTransforms.h
    M mlir/include/mlir/Dialect/Linalg/Utils/Utils.h
    M mlir/lib/Dialect/Linalg/Transforms/LinalgTransforms.cpp
    M mlir/lib/Dialect/Linalg/Transforms/Tiling.cpp
    M mlir/test/Dialect/Linalg/transform-patterns.mlir
    M mlir/test/lib/DeclarativeTransforms/TestLinalgTransformPatterns.td

  Log Message:
  -----------
  [Linalg] Add a Linalg iterator permutation transformation

This patch closes issue tensorflow/mlir#272
We add a standalone iterator permutation transformation to Linalg.
This transformation composes a permutation map with the maps in the
"indexing_maps" attribute. It also permutes "iterator_types"
accordingly.

Change-Id: I7c1e693b8203aeecc595a7c012e738ca1100c857

Closes tensorflow/mlir#307

COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/307 from tetuante:issue272 f7908d58792f4111119721885e247045104f1131
PiperOrigin-RevId: 284824102


  Commit: 9ed22ae5b8c8f286a992bca7ef4e4b3263c01116
      https://github.com/llvm/llvm-project/commit/9ed22ae5b8c8f286a992bca7ef4e4b3263c01116
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-12-10 (Tue, 10 Dec 2019)

  Changed paths:
    M mlir/include/mlir/IR/BlockSupport.h
    M mlir/include/mlir/IR/Operation.h
    M mlir/include/mlir/IR/OperationSupport.h
    M mlir/include/mlir/IR/Region.h
    M mlir/include/mlir/IR/TypeUtilities.h
    M mlir/include/mlir/Support/STLExtras.h
    M mlir/lib/Dialect/StandardOps/Ops.cpp
    M mlir/lib/IR/Operation.cpp
    M mlir/lib/IR/OperationSupport.cpp
    M mlir/lib/IR/TypeUtilities.cpp

  Log Message:
  -----------
  Refactor the various operand/result/type iterators to use indexed_accessor_range.

This has several benefits:
* The implementation is much cleaner and more efficient.
* The ranges now have support for many useful operations: operator[], slice, drop_front, size, etc.
* Value ranges can now directly query a range for their types via 'getTypes()': e.g:
   void foo(Operation::operand_range operands) {
     auto operandTypes = operands.getTypes();
   }

PiperOrigin-RevId: 284834912


  Commit: 995048d7b7197956bb956dc165aa96d395b7e102
      https://github.com/llvm/llvm-project/commit/995048d7b7197956bb956dc165aa96d395b7e102
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2019-12-10 (Tue, 10 Dec 2019)

  Changed paths:
    R mlir/test/Dialect/Linalg/tile_permute_patterns.mlir
    M mlir/test/Dialect/Linalg/transform-patterns.mlir
    M mlir/test/lib/DeclarativeTransforms/CMakeLists.txt
    R mlir/test/lib/DeclarativeTransforms/TestLinalgTilePermutePatterns.td
    M mlir/test/lib/DeclarativeTransforms/TestLinalgTransformPatterns.td
    M mlir/test/lib/Transforms/CMakeLists.txt
    R mlir/test/lib/Transforms/TestLinalgTilePermuteTransforms.cpp

  Log Message:
  -----------
  Fold TestLinalgTilePermutePatterns into TestLinalgTransformPatterns - NFC

Centralize all patterns that test Linalg transforms in a single pass.

PiperOrigin-RevId: 284835938


  Commit: d1213ae51d2e321680a4c62c32358e3e07ff3f66
      https://github.com/llvm/llvm-project/commit/d1213ae51d2e321680a4c62c32358e3e07ff3f66
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2019-12-10 (Tue, 10 Dec 2019)

  Changed paths:
    M mlir/g3doc/Dialects/GPU.md
    M mlir/include/mlir/Dialect/GPU/GPUDialect.h
    M mlir/include/mlir/Dialect/GPU/GPUOps.td
    M mlir/include/mlir/Dialect/LLVMIR/LLVMOpBase.td
    M mlir/lib/Dialect/GPU/IR/GPUDialect.cpp

  Log Message:
  -----------
  Move gpu.launch_func to ODS. NFC

Move the definition of gpu.launch_func operation from hand-rolled C++
implementation to the ODS framework. Also move the documentation. This only
performs the move and remains a non-functional change, a follow-up will clean
up the custom functions that can be auto-generated using ODS.

PiperOrigin-RevId: 284842252


  Commit: 36a415bcc543553891af6809c5256e6e2469357d
      https://github.com/llvm/llvm-project/commit/36a415bcc543553891af6809c5256e6e2469357d
  Author: Uday Bondhugula <uday at polymagelabs.com>
  Date:   2019-12-10 (Tue, 10 Dec 2019)

  Changed paths:
    M mlir/include/mlir/IR/AffineExpr.h
    M mlir/lib/IR/AffineExpr.cpp
    M mlir/test/IR/affine-map.mlir
    M mlir/test/Transforms/Vectorize/compose_maps.mlir
    M mlir/test/Transforms/unroll.mlir

  Log Message:
  -----------
  More affine expr simplifications for floordiv and mod

Add one more simplification for floordiv and mod affine expressions.
Examples:
 (2*d0 + 1) floordiv 2 is simplified to d0
 (8*d0 + 4*d1 + d2) floordiv 4 simplified to 4*d0 + d1 + d2 floordiv 4.
 etc.

 Similarly, (4*d1 + 1) mod 2 is simplified to 1,
            (2*d0 + 8*d1) mod 8 simplified to 2*d0 mod 8.

Change getLargestKnownDivisor to return int64_t to be consistent and
to avoid casting at call sites (since the return value is used in expressions
of int64_t/index type).

Signed-off-by: Uday Bondhugula <uday at polymagelabs.com>

Closes tensorflow/mlir#202

COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/202 from bondhugula:affine b13fcb2f1c00a39ca5434613a02408e085a80e77
PiperOrigin-RevId: 284866710


  Commit: 4d8ba886103b0022b019671bf27547d55a902b54
      https://github.com/llvm/llvm-project/commit/4d8ba886103b0022b019671bf27547d55a902b54
  Author: Andy Davis <andydavis at google.com>
  Date:   2019-12-10 (Tue, 10 Dec 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/VectorOps/VectorOps.h
    M mlir/include/mlir/Dialect/VectorOps/VectorOps.td
    M mlir/lib/Dialect/VectorOps/VectorOps.cpp
    M mlir/lib/Dialect/VectorOps/VectorTransforms.cpp
    M mlir/test/Dialect/VectorOps/vector-transforms.mlir
    M mlir/test/lib/Transforms/TestVectorTransforms.cpp

  Log Message:
  -----------
  Add VectorOp transform pattern which splits vector TransferReadOps to target vector unroll size.

PiperOrigin-RevId: 284880592


  Commit: 9826fe5c9fb65da8f1d53b21348f013c58c09791
      https://github.com/llvm/llvm-project/commit/9826fe5c9fb65da8f1d53b21348f013c58c09791
  Author: Aart Bik <ajcbik at google.com>
  Date:   2019-12-10 (Tue, 10 Dec 2019)

  Changed paths:
    M mlir/lib/Conversion/VectorToLLVM/ConvertVectorToLLVM.cpp
    M mlir/test/Conversion/VectorToLLVM/vector-to-llvm.mlir

  Log Message:
  -----------
  [VectorOps] Add lowering of vector.insert to LLVM IR

For example, an insert

  %0 = vector.insert %arg0, %arg1[3 : i32] : f32 into vector<4xf32>

becomes

  %0 = llvm.mlir.constant(3 : i32) : !llvm.i32
  %1 = llvm.insertelement %arg0, %arg1[%0 : !llvm.i32] : !llvm<"<4 x float>">

A more elaborate example, inserting an element in a higher dimension
vector

  %0 = vector.insert %arg0, %arg1[3 : i32, 7 : i32, 15 : i32] : f32 into vector<4x8x16xf32>

becomes

  %0 = llvm.extractvalue %arg1[3 : i32, 7 : i32] : !llvm<"[4 x [8 x <16 x float>]]">
  %1 = llvm.mlir.constant(15 : i32) : !llvm.i32
  %2 = llvm.insertelement %arg0, %0[%1 : !llvm.i32] : !llvm<"<16 x float>">
  %3 = llvm.insertvalue %2, %arg1[3 : i32, 7 : i32] : !llvm<"[4 x [8 x <16 x float>]]">

PiperOrigin-RevId: 284882443


  Commit: 98fbf41044d3364dbaf18db81b9e8d9520d14761
      https://github.com/llvm/llvm-project/commit/98fbf41044d3364dbaf18db81b9e8d9520d14761
  Author: Marcel Koester <marcel.koester at dfki.de>
  Date:   2019-12-11 (Wed, 11 Dec 2019)

  Changed paths:
    A mlir/include/mlir/Analysis/Liveness.h
    M mlir/lib/Analysis/CMakeLists.txt
    A mlir/lib/Analysis/Liveness.cpp
    A mlir/test/Analysis/test-liveness.mlir
    M mlir/test/lib/Transforms/CMakeLists.txt
    A mlir/test/lib/Transforms/TestLiveness.cpp

  Log Message:
  -----------
  Add initial liveness analysis including test cases.

Closes tensorflow/mlir#255

PiperOrigin-RevId: 284935454


  Commit: bae8a7a724192d676234991e8ba2adc7b694f8f2
      https://github.com/llvm/llvm-project/commit/bae8a7a724192d676234991e8ba2adc7b694f8f2
  Author: Alexander Belyaev <pifon at google.com>
  Date:   2019-12-11 (Wed, 11 Dec 2019)

  Changed paths:
    M mlir/lib/Dialect/Linalg/Transforms/Tiling.cpp
    A mlir/test/Dialect/Linalg/tile_indexed_generic.mlir

  Log Message:
  -----------
  [Linalg] Add tiling for IndexedGenericOp with a region.

PiperOrigin-RevId: 284949355


  Commit: b96f86daaf8420cd61a0459de14f196c8eca871b
      https://github.com/llvm/llvm-project/commit/b96f86daaf8420cd61a0459de14f196c8eca871b
  Author: Stephan Herhut <herhut at google.com>
  Date:   2019-12-11 (Wed, 11 Dec 2019)

  Changed paths:
    M mlir/include/mlir/Conversion/GPUToNVVM/GPUToNVVMPass.h
    M mlir/lib/Conversion/GPUToNVVM/LowerGpuOpsToNVVMOps.cpp

  Log Message:
  -----------
  Add a function to get lowering patterns from GPU to NVVM.

This enables combining the patterns with other patterns into larger lowerings.

PiperOrigin-RevId: 284979271


  Commit: 984fdde269f7f9421f9cd444a5c11d7b096b711e
      https://github.com/llvm/llvm-project/commit/984fdde269f7f9421f9cd444a5c11d7b096b711e
  Author: Alexander Belyaev <pifon at google.com>
  Date:   2019-12-11 (Wed, 11 Dec 2019)

  Changed paths:
    R mlir/include/mlir/Analysis/Liveness.h
    M mlir/lib/Analysis/CMakeLists.txt
    R mlir/lib/Analysis/Liveness.cpp
    R mlir/test/Analysis/test-liveness.mlir
    M mlir/test/lib/Transforms/CMakeLists.txt
    R mlir/test/lib/Transforms/TestLiveness.cpp

  Log Message:
  -----------
  Automated rollback of commit 98fbf41044d3364dbaf18db81b9e8d9520d14761

PiperOrigin-RevId: 284979684


  Commit: 4b0198acb523ba26b8d4384f0f61ca0b755cb0c6
      https://github.com/llvm/llvm-project/commit/4b0198acb523ba26b8d4384f0f61ca0b755cb0c6
  Author: Alexander Belyaev <pifon at google.com>
  Date:   2019-12-11 (Wed, 11 Dec 2019)

  Changed paths:
    A mlir/include/mlir/Analysis/Liveness.h
    M mlir/lib/Analysis/CMakeLists.txt
    A mlir/lib/Analysis/Liveness.cpp
    A mlir/test/Analysis/test-liveness.mlir
    M mlir/test/lib/Transforms/CMakeLists.txt
    A mlir/test/lib/Transforms/TestLiveness.cpp

  Log Message:
  -----------
  Roll-forward initial liveness analysis including test cases.

Fix the usage of the map size when appending to the map with [].

PiperOrigin-RevId: 284985916


  Commit: c5fb4c1303837a41eb06b14137d3e4a5387023a3
      https://github.com/llvm/llvm-project/commit/c5fb4c1303837a41eb06b14137d3e4a5387023a3
  Author: Christian Sigg <csigg at google.com>
  Date:   2019-12-11 (Wed, 11 Dec 2019)

  Changed paths:
    M mlir/lib/Conversion/GPUToNVVM/LowerGpuOpsToNVVMOps.cpp

  Log Message:
  -----------
  NFC: Fix naming inconsistency: FuncOpLowering -> GPUFuncOpLowering.

Remove nested anonymous namespace.

PiperOrigin-RevId: 284987357


  Commit: 508d4e672e5de9b9c582fc5e96996d93bb92c74e
      https://github.com/llvm/llvm-project/commit/508d4e672e5de9b9c582fc5e96996d93bb92c74e
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2019-12-11 (Wed, 11 Dec 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/Linalg/IR/LinalgLibraryOps.td
    M mlir/include/mlir/Dialect/Linalg/IR/LinalgOps.h
    M mlir/include/mlir/Dialect/Linalg/IR/LinalgTraits.h
    M mlir/include/mlir/Dialect/Linalg/Transforms/LinalgTransformPatterns.td
    M mlir/include/mlir/Dialect/Utils/StructuredOpsUtils.h
    M mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
    M mlir/lib/Dialect/Linalg/Transforms/LinalgToLoops.cpp
    M mlir/lib/Dialect/Linalg/Transforms/LinalgTransforms.cpp
    M mlir/test/Dialect/Linalg/fusion.mlir
    M mlir/test/Dialect/Linalg/invalid.mlir
    M mlir/test/Dialect/Linalg/llvm.mlir
    M mlir/test/Dialect/Linalg/loops.mlir
    M mlir/test/Dialect/Linalg/roundtrip.mlir
    M mlir/test/Dialect/Linalg/tile.mlir
    M mlir/test/Dialect/Linalg/tile_indexed_generic.mlir
    M mlir/test/Dialect/Linalg/transform-patterns.mlir
    M mlir/test/lib/DeclarativeTransforms/TestLinalgTransformPatterns.td

  Log Message:
  -----------
  Continue refactoring StructuredOps utilities

This CL adds more common information to StructuredOpsUtils.h
The n_view attribute is retired in favor of args_in + args_out but the CL is otherwise NFC.

PiperOrigin-RevId: 285000621


  Commit: d968f9696d2ea1299d6280ca1ea94f318f912f32
      https://github.com/llvm/llvm-project/commit/d968f9696d2ea1299d6280ca1ea94f318f912f32
  Author: Denis Khalikov <khalikov.denis at huawei.com>
  Date:   2019-12-11 (Wed, 11 Dec 2019)

  Changed paths:
    M mlir/lib/Conversion/StandardToSPIRV/StandardToSPIRV.td
    M mlir/test/Conversion/StandardToSPIRV/std-to-spirv.mlir

  Log Message:
  -----------
  [spirv] Add lowering for std.fdiv, std.frem, std.fsub

Closes tensorflow/mlir#313

COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/313 from denis0x0D:sandbox/lowering_std_farith 41715070a74d13bfa9401957478978c1bb8006c0
PiperOrigin-RevId: 285023586


  Commit: 652fc261d7f2ce796a826094a20abcb50106c9ce
      https://github.com/llvm/llvm-project/commit/652fc261d7f2ce796a826094a20abcb50106c9ce
  Author: Mahesh Ravishankar <ravishankarm at google.com>
  Date:   2019-12-11 (Wed, 11 Dec 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/SPIRV/SPIRVLowering.h
    M mlir/lib/Conversion/GPUToSPIRV/ConvertGPUToSPIRV.cpp
    M mlir/lib/Dialect/SPIRV/SPIRVLowering.cpp

  Log Message:
  -----------
  Expose a convenience function to add interface attributes to a function.

PiperOrigin-RevId: 285036647


  Commit: beda0b2dc8f83ba369c0322be6d5a675eda1e390
      https://github.com/llvm/llvm-project/commit/beda0b2dc8f83ba369c0322be6d5a675eda1e390
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2019-12-11 (Wed, 11 Dec 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/Utils/StructuredOpsUtils.h

  Log Message:
  -----------
  Fix OSS build

PiperOrigin-RevId: 285036782


  Commit: b909299d205d09152776a048e8336b3e097b3785
      https://github.com/llvm/llvm-project/commit/b909299d205d09152776a048e8336b3e097b3785
  Author: Mahesh Ravishankar <ravishankarm at google.com>
  Date:   2019-12-11 (Wed, 11 Dec 2019)

  Changed paths:
    M mlir/test/lib/IR/CMakeLists.txt

  Log Message:
  -----------
  Add missing CMake dependency for MLIRTestIR.

PiperOrigin-RevId: 285039153


  Commit: 9dfa84a269e245ebaff032f698a798f71da2c1b5
      https://github.com/llvm/llvm-project/commit/9dfa84a269e245ebaff032f698a798f71da2c1b5
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2019-12-11 (Wed, 11 Dec 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
    M mlir/include/mlir/Dialect/StandardOps/Ops.td
    M mlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp
    M mlir/test/Target/llvmir-intrinsics.mlir

  Log Message:
  -----------
  Add std.log* and llvm.intr.log* that correspond to the LLVMIR intrinsics

PiperOrigin-RevId: 285073483


  Commit: 851a8516d3883088b0c02601f9c1bb269e85051c
      https://github.com/llvm/llvm-project/commit/851a8516d3883088b0c02601f9c1bb269e85051c
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-12-11 (Wed, 11 Dec 2019)

  Changed paths:
    M mlir/include/mlir/IR/Builders.h
    M mlir/include/mlir/IR/PatternMatch.h
    M mlir/include/mlir/Transforms/DialectConversion.h
    M mlir/lib/IR/Builders.cpp
    M mlir/lib/Transforms/DialectConversion.cpp
    M mlir/lib/Transforms/Utils/GreedyPatternRewriteDriver.cpp

  Log Message:
  -----------
  Make OpBuilder::insert virtual instead of OpBuilder::createOperation.

It is sometimes useful to create operations separately from the builder before insertion as it may be easier to erase them in isolation if necessary. One example use case for this is folding, as we will only want to insert newly generated constant operations on success. This has the added benefit of fixing some silent PatternRewriter failures related to cloning, as the OpBuilder 'clone' methods don't call createOperation.

PiperOrigin-RevId: 285086242


  Commit: f68ac464d818629e0fe10c23b44ac782d64a12d2
      https://github.com/llvm/llvm-project/commit/f68ac464d818629e0fe10c23b44ac782d64a12d2
  Author: Christian Sigg <csigg at google.com>
  Date:   2019-12-12 (Thu, 12 Dec 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/LLVMIR/NVVMOps.td
    M mlir/lib/Conversion/GPUToNVVM/LowerGpuOpsToNVVMOps.cpp
    M mlir/lib/Dialect/LLVMIR/IR/NVVMDialect.cpp
    M mlir/lib/Target/LLVMIR/ConvertToNVVMIR.cpp
    M mlir/test/Conversion/GPUToNVVM/gpu-to-nvvm.mlir
    M mlir/test/Dialect/LLVMIR/invalid.mlir
    M mlir/test/Dialect/LLVMIR/nvvm.mlir
    M mlir/test/Target/nvvmir.mlir

  Log Message:
  -----------
  Switch from shfl.bfly to shfl.down.

Both work for the current use case, but the latter allows implementing
prefix sums and is a little easier to understand for partial warps.

PiperOrigin-RevId: 285145287


  Commit: 9b855826824d85aff76e0e95c3983ea6fe09b9dc
      https://github.com/llvm/llvm-project/commit/9b855826824d85aff76e0e95c3983ea6fe09b9dc
  Author: Christian Sigg <csigg at google.com>
  Date:   2019-12-12 (Thu, 12 Dec 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/LLVMIR/NVVMOps.td
    M mlir/lib/Conversion/GPUToNVVM/LowerGpuOpsToNVVMOps.cpp
    M mlir/lib/Dialect/LLVMIR/IR/NVVMDialect.cpp
    M mlir/lib/Target/LLVMIR/ConvertToNVVMIR.cpp
    M mlir/test/Conversion/GPUToNVVM/gpu-to-nvvm.mlir
    M mlir/test/Dialect/LLVMIR/invalid.mlir
    M mlir/test/Dialect/LLVMIR/nvvm.mlir
    M mlir/test/Target/nvvmir.mlir

  Log Message:
  -----------
  Automated rollback of commit f68ac464d818629e0fe10c23b44ac782d64a12d2

PiperOrigin-RevId: 285162061


  Commit: 95b5a4fd675bd125086d3878df1d4cd3d47d2485
      https://github.com/llvm/llvm-project/commit/95b5a4fd675bd125086d3878df1d4cd3d47d2485
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2019-12-12 (Thu, 12 Dec 2019)

  Changed paths:
    M mlir/test/mlir-cpu-runner/include/mlir_runner_utils.h
    M mlir/test/mlir-cpu-runner/mlir_runner_utils.cpp
    M mlir/test/mlir-cpu-runner/utils.mlir

  Log Message:
  -----------
  Move cpu runner utils templates to .h

This allows reusing the implementation in various places by just including and permits more easily writing test functions without explicit template instantiations.

This also modifies UnrankedMemRefType to take a template type parameter since it cannot be type agnostic atm.

PiperOrigin-RevId: 285187711


  Commit: f7bffad5a7ccc820ba87de12c10a6a5c4dc81d6e
      https://github.com/llvm/llvm-project/commit/f7bffad5a7ccc820ba87de12c10a6a5c4dc81d6e
  Author: Ehsan Toosi <ehsan.nadjaran_toosi at dfki.de>
  Date:   2019-12-12 (Thu, 12 Dec 2019)

  Changed paths:
    M mlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp
    M mlir/test/Conversion/StandardToLLVM/convert-to-llvmir.mlir

  Log Message:
  -----------
  Added lowering of `std.tanh` to llvm function call to `tanh` and `tanhf`.

Closes tensorflow/mlir#312

COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/312 from dfki-ehna:tanh 9e89b072ff91ff390ad739501745114feb3ac856
PiperOrigin-RevId: 285205674


  Commit: 1b579d998ad5a45282e8daaf0bac26df3d3c1f29
      https://github.com/llvm/llvm-project/commit/1b579d998ad5a45282e8daaf0bac26df3d3c1f29
  Author: Alexander Belyaev <pifon at google.com>
  Date:   2019-12-12 (Thu, 12 Dec 2019)

  Changed paths:
    M mlir/test/Dialect/Linalg/fusion.mlir

  Log Message:
  -----------
  [Linalg] Add test for fusion of GenericOp with IndexedGenericOp.

PiperOrigin-RevId: 285211797


  Commit: 782ae29678598e42e6984ce3bd6c5a3914edc33e
      https://github.com/llvm/llvm-project/commit/782ae29678598e42e6984ce3bd6c5a3914edc33e
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2019-12-12 (Thu, 12 Dec 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/Linalg/IR/LinalgTypes.h
    M mlir/lib/Conversion/LinalgToLLVM/LinalgToLLVM.cpp
    M mlir/lib/Dialect/Linalg/Analysis/DependenceAnalysis.cpp
    M mlir/lib/Dialect/Linalg/IR/LinalgTypes.cpp
    M mlir/test/Conversion/LoopsToGPU/linalg_to_gpu.mlir

  Log Message:
  -----------
  Retire !linalg.buffer type - NFC

This type is not used anymore now that Linalg view and subview have graduated to std and that alignment is supported on alloc.

PiperOrigin-RevId: 285213424


  Commit: 41a73ddce8923f506eaf6e8c5a61d32add5e4c06
      https://github.com/llvm/llvm-project/commit/41a73ddce8923f506eaf6e8c5a61d32add5e4c06
  Author: Jacques Pienaar <jpienaar at google.com>
  Date:   2019-12-12 (Thu, 12 Dec 2019)

  Changed paths:
    M mlir/g3doc/OpDefinitions.md
    M mlir/test/mlir-tblgen/op-decl.td
    M mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp

  Log Message:
  -----------
  Add type inference variant for separate params builder generated

Add variant that does invoke infer type op interface where defined. Also add entry function that invokes that different separate argument builders for wrapped, unwrapped and inference variant.

PiperOrigin-RevId: 285220709


  Commit: 1c81adf362ec79750850dc5ecb0bf3e60399e54f
      https://github.com/llvm/llvm-project/commit/1c81adf362ec79750850dc5ecb0bf3e60399e54f
  Author: Aart Bik <ajcbik at google.com>
  Date:   2019-12-12 (Thu, 12 Dec 2019)

  Changed paths:
    M mlir/lib/Conversion/VectorToLLVM/ConvertVectorToLLVM.cpp
    M mlir/test/Conversion/VectorToLLVM/vector-to-llvm.mlir

  Log Message:
  -----------
  [VectorOps] Add lowering of vector.shuffle to LLVM IR

For example, a shuffle

%1 = vector.shuffle %arg0, %arg1 [0 : i32, 1 : i32] : vector<2xf32>, vector<2xf32>

becomes a direct LLVM shuffle

0 = llvm.shufflevector %arg0, %arg1 [0 : i32, 1 : i32] : !llvm<"<2 x float>">, !llvm<"<2 x float>">

but

%1 = vector.shuffle %a, %b[1 : i32, 0 : i32, 2: i32] : vector<1x4xf32>, vector<2x4xf32>

becomes the more elaborate (note the index permutation that drives
argument selection for the extract operations)

%0 = llvm.mlir.undef : !llvm<"[3 x <4 x float>]">
%1 = llvm.extractvalue %arg1[0] : !llvm<"[2 x <4 x float>]">
%2 = llvm.insertvalue %1, %0[0] : !llvm<"[3 x <4 x float>]">
%3 = llvm.extractvalue %arg0[0] : !llvm<"[1 x <4 x float>]">
%4 = llvm.insertvalue %3, %2[1] : !llvm<"[3 x <4 x float>]">
%5 = llvm.extractvalue %arg1[1] : !llvm<"[2 x <4 x float>]">
%6 = llvm.insertvalue %5, %4[2] : !llvm<"[3 x <4 x float>]">

PiperOrigin-RevId: 285268164


  Commit: a50cb184a0c5ebc342a871b2e338e2591115639f
      https://github.com/llvm/llvm-project/commit/a50cb184a0c5ebc342a871b2e338e2591115639f
  Author: Jacques Pienaar <jpienaar at google.com>
  Date:   2019-12-12 (Thu, 12 Dec 2019)

  Changed paths:
    M mlir/test/mlir-tblgen/op-attribute.td
    M mlir/test/mlir-tblgen/op-operand.td
    M mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp

  Log Message:
  -----------
  Fix logic on when to emit collective type but separate arg builder

Got the comment right but the code wrong :/

PiperOrigin-RevId: 285270561


  Commit: e7aa47ff111c53127587d8aea71b088db3a671aa
      https://github.com/llvm/llvm-project/commit/e7aa47ff111c53127587d8aea71b088db3a671aa
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-12-12 (Thu, 12 Dec 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/LLVMIR/NVVMOps.td
    M mlir/include/mlir/IR/OpImplementation.h
    M mlir/lib/Dialect/AffineOps/AffineOps.cpp
    M mlir/lib/Dialect/GPU/IR/GPUDialect.cpp
    M mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
    M mlir/lib/Dialect/LLVMIR/IR/NVVMDialect.cpp
    M mlir/lib/Dialect/LLVMIR/IR/ROCDLDialect.cpp
    M mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
    M mlir/lib/Dialect/SPIRV/SPIRVOps.cpp
    M mlir/lib/Dialect/StandardOps/Ops.cpp
    M mlir/lib/Dialect/VectorOps/VectorOps.cpp

  Log Message:
  -----------
  NFC: Cleanup the various Op::print methods.

This cleans up the implementation of the various operation print methods. This is done via a combination of code cleanup, adding new streaming methods to the printer(e.g. operand ranges), etc.

PiperOrigin-RevId: 285285181


  Commit: 8846557672d6a490b500b1c24e90a8effcb38901
      https://github.com/llvm/llvm-project/commit/8846557672d6a490b500b1c24e90a8effcb38901
  Author: Christian Sigg <csigg at google.com>
  Date:   2019-12-13 (Fri, 13 Dec 2019)

  Changed paths:
    M mlir/lib/Conversion/GPUToNVVM/LowerGpuOpsToNVVMOps.cpp

  Log Message:
  -----------
  Fix maskAndClamp in gpu.all_reduce.

The clamp value determines the returned predicate. Previously, the clamp value was fixed to 31 and the predicate was therefore always true. This is incorrect for partial warp reductions, but went unnoticed because the returned values happened to be zero (but it could be anything).

PiperOrigin-RevId: 285343160


  Commit: 7b19d736172789ce8e5ca10ae6276302004533f0
      https://github.com/llvm/llvm-project/commit/7b19d736172789ce8e5ca10ae6276302004533f0
  Author: Prakalp Srivastava <prakalps at google.com>
  Date:   2019-12-13 (Fri, 13 Dec 2019)

  Changed paths:
    M mlir/include/mlir/IR/DialectSymbolRegistry.def

  Log Message:
  -----------
  Add a type range for the XLA HLO dialect.

PiperOrigin-RevId: 285437835


  Commit: b030e4a4ec5ef47549377cc0af71a95abcf28a98
      https://github.com/llvm/llvm-project/commit/b030e4a4ec5ef47549377cc0af71a95abcf28a98
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-12-13 (Fri, 13 Dec 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/AffineOps/AffineOps.h
    M mlir/include/mlir/Dialect/StandardOps/Ops.h
    M mlir/include/mlir/Dialect/VectorOps/VectorOps.h
    M mlir/include/mlir/IR/Builders.h
    M mlir/lib/Dialect/AffineOps/AffineOps.cpp
    M mlir/lib/Dialect/StandardOps/Ops.cpp
    M mlir/lib/Dialect/VectorOps/VectorOps.cpp
    M mlir/lib/IR/Builders.cpp
    M mlir/lib/Transforms/DialectConversion.cpp
    M mlir/test/Conversion/StandardToLLVM/convert-to-llvmir.mlir
    M mlir/test/Transforms/lower-affine.mlir
    M mlir/test/Transforms/test-legalizer.mlir
    M mlir/test/lib/TestDialect/TestPatterns.cpp

  Log Message:
  -----------
  Try to fold operations in DialectConversion when trying to legalize.

This change allows for DialectConversion to attempt folding as a mechanism to legalize illegal operations. This also expands folding support in OpBuilder::createOrFold to generate new constants when folding, and also enables it to work in the context of a PatternRewriter.

PiperOrigin-RevId: 285448440


  Commit: 7923abd357b82b14d1f97c2f013f41e388f77a17
      https://github.com/llvm/llvm-project/commit/7923abd357b82b14d1f97c2f013f41e388f77a17
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2019-12-13 (Fri, 13 Dec 2019)

  Changed paths:
    M mlir/include/mlir/CMakeLists.txt
    A mlir/include/mlir/Dialect/Linalg/EDSC/Builders.h
    M mlir/include/mlir/EDSC/Builders.h
    R mlir/include/mlir/EDSC/CMakeLists.txt
    M mlir/include/mlir/EDSC/Intrinsics.h
    M mlir/include/mlir/IR/AffineExpr.h
    M mlir/lib/Conversion/VectorToLoops/ConvertVectorToLoops.cpp
    M mlir/lib/Dialect/Linalg/CMakeLists.txt
    A mlir/lib/Dialect/Linalg/EDSC/Builders.cpp
    M mlir/lib/Dialect/Linalg/Transforms/LinalgToLoops.cpp
    M mlir/lib/Dialect/Linalg/Transforms/Tiling.cpp
    M mlir/lib/EDSC/CMakeLists.txt
    M mlir/test/EDSC/CMakeLists.txt
    M mlir/test/EDSC/builder-api-test.cpp
    R mlir/test/mlir-tblgen/reference-impl.td

  Log Message:
  -----------
  Add a layer of EDSC for linalg.GenericOp

This will be evolved into a simple programming model for custom ops and custom layers in followup CLs.

This CL also deletes the obsolete tablegen's reference-impl.td that was using EDSCs.

PiperOrigin-RevId: 285459545


  Commit: 27ae92516b925e5b8e416032117ef8922fca4d37
      https://github.com/llvm/llvm-project/commit/27ae92516b925e5b8e416032117ef8922fca4d37
  Author: Jing Pu <jingpu at google.com>
  Date:   2019-12-13 (Fri, 13 Dec 2019)

  Changed paths:
    A mlir/test/mlir-tblgen/op-interface.td
    M mlir/tools/mlir-tblgen/OpInterfacesGen.cpp

  Log Message:
  -----------
  Skip generating C++ for "DeclareOpInterfaceMethods" in op interface gen.

This is needed for calling the generator on a .td file that contains both OpInterface definitions and op definitions with DeclareOpInterfaceMethods<...> Traits.

PiperOrigin-RevId: 285465784


  Commit: 7ac42fa26e5ac2c3554eb38b7456c6bd81e69cec
      https://github.com/llvm/llvm-project/commit/7ac42fa26e5ac2c3554eb38b7456c6bd81e69cec
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-12-13 (Fri, 13 Dec 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/AffineOps/AffineOps.h
    M mlir/include/mlir/Dialect/AffineOps/AffineOps.td
    M mlir/include/mlir/Dialect/QuantOps/QuantOps.td
    M mlir/include/mlir/Dialect/StandardOps/Ops.h
    M mlir/include/mlir/Dialect/StandardOps/Ops.td
    M mlir/lib/Dialect/AffineOps/AffineOps.cpp
    M mlir/lib/Dialect/QuantOps/IR/QuantOps.cpp
    M mlir/lib/Dialect/StandardOps/Ops.cpp

  Log Message:
  -----------
  Refactor various canonicalization patterns as in-place folds.

This is more efficient, and allows for these to fire in more situations: e.g. createOrFold, DialectConversion, etc.

PiperOrigin-RevId: 285476837


  Commit: 200beb84461bd249589913a3d89898a9c6e588b9
      https://github.com/llvm/llvm-project/commit/200beb84461bd249589913a3d89898a9c6e588b9
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2019-12-13 (Fri, 13 Dec 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/Linalg/EDSC/Builders.h
    M mlir/lib/Dialect/Linalg/EDSC/Builders.cpp
    M mlir/test/EDSC/builder-api-test.cpp

  Log Message:
  -----------
  Apply a level of sugaring to the linalg.generic EDSC - NFC

Make the declarative C++ builder API simpler to use so we can start chaining these ops together.

PiperOrigin-RevId: 285496266


  Commit: 3ef15a80d2b0647e62771b5adc6e6f639e58f8b3
      https://github.com/llvm/llvm-project/commit/3ef15a80d2b0647e62771b5adc6e6f639e58f8b3
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2019-12-13 (Fri, 13 Dec 2019)

  Changed paths:
    M mlir/include/mlir/Analysis/NestedMatcher.h

  Log Message:
  -----------
  Reconcile struct and class for NestedPatternMatchers - NFC

This removes a warning and fixes a potential ABI issue on Windows.

PiperOrigin-RevId: 285502010


  Commit: 2d22b1e04e7f75ecc38247fc2a5cd18058374cc0
      https://github.com/llvm/llvm-project/commit/2d22b1e04e7f75ecc38247fc2a5cd18058374cc0
  Author: Smit Hinsu <hinsu at google.com>
  Date:   2019-12-14 (Sat, 14 Dec 2019)

  Changed paths:
    M mlir/include/mlir/IR/TypeUtilities.h
    M mlir/lib/IR/TypeUtilities.cpp

  Log Message:
  -----------
  Add verifyCompatibleShape function overload with shapes

PiperOrigin-RevId: 285574334


  Commit: 97af93227283e9252d7e497bd08ea2b78ece8f92
      https://github.com/llvm/llvm-project/commit/97af93227283e9252d7e497bd08ea2b78ece8f92
  Author: Uday Bondhugula <uday at polymagelabs.com>
  Date:   2019-12-14 (Sat, 14 Dec 2019)

  Changed paths:
    M mlir/g3doc/Dialects/Standard.md
    M mlir/include/mlir/Dialect/StandardOps/Ops.td

  Log Message:
  -----------
  Splat op doc - fix misformat / update tablegen op desc. comment

- bring op description comment in sync with the doc
- fix misformat in doc

Signed-off-by: Uday Bondhugula <uday at polymagelabs.com>

Closes tensorflow/mlir#317

COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/317 from bondhugula:quickfix 7fcd945b318c973b2488b702874c87526855c8ef
PiperOrigin-RevId: 285574527


  Commit: 44fc7d72b3cb44147394e22f1f21ad36cca7bca8
      https://github.com/llvm/llvm-project/commit/44fc7d72b3cb44147394e22f1f21ad36cca7bca8
  Author: Tres Popp <tpopp at google.com>
  Date:   2019-12-16 (Mon, 16 Dec 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/LLVMIR/LLVMDialect.h
    M mlir/include/mlir/Target/LLVMIR/ModuleTranslation.h
    M mlir/include/mlir/Target/NVVMIR.h
    M mlir/include/mlir/Target/ROCDLIR.h
    M mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
    M mlir/lib/Target/LLVMIR/ConvertToNVVMIR.cpp
    M mlir/lib/Target/LLVMIR/ConvertToROCDLIR.cpp
    M mlir/lib/Target/LLVMIR/ModuleTranslation.cpp

  Log Message:
  -----------
  Remove LLVM dependency on mlir::Module and instead check Traits.

PiperOrigin-RevId: 285724678


  Commit: 0684aa9a8bcb9823ccf3f55d4e180d8a4df13201
      https://github.com/llvm/llvm-project/commit/0684aa9a8bcb9823ccf3f55d4e180d8a4df13201
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2019-12-16 (Mon, 16 Dec 2019)

  Changed paths:
    M mlir/g3doc/ConversionToLLVMDialect.md
    M mlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp
    M mlir/test/Conversion/StandardToLLVM/convert-funcs.mlir

  Log Message:
  -----------
  Make memref promotion during std->LLVM lowering the default calling convention

During the conversion from the standard dialect to the LLVM dialect,
memref-typed arguments are promoted from registers to memory and passed into
functions by pointer. This had been introduced into the lowering to work around
the abesnce of calling convention modeling in MLIR to enable better
interoperability with LLVM IR generated from C, and has been exerciced for
several months. Make this promotion the default calling covention when
converting to the LLVM dialect. This adds the documentation, simplifies the
code and makes the conversion consistent across function operations and
function types used in other places, e.g. in high-order functions or
attributes, which would not follow the same rule previously.

PiperOrigin-RevId: 285751280


  Commit: 73ec37c8bbc73632d73318c702abb78c758d93db
      https://github.com/llvm/llvm-project/commit/73ec37c8bbc73632d73318c702abb78c758d93db
  Author: Andy Davis <andydavis at google.com>
  Date:   2019-12-16 (Mon, 16 Dec 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/VectorOps/VectorOps.td
    M mlir/lib/Dialect/VectorOps/VectorOps.cpp
    M mlir/test/Dialect/VectorOps/invalid.mlir
    M mlir/test/Dialect/VectorOps/ops.mlir

  Log Message:
  -----------
  Adds ExtractSlicesOp to the VectorOps dialect.

ExtractSlicesOp extracts slices of its vector operand and with a specified tiling scheme.
This operation centralizes the tiling scheme around a single op, which simplifies vector op unrolling and subsequent pattern rewrite transformations.

PiperOrigin-RevId: 285761129


  Commit: cd5dab8ad7fccc3b3e371ff37cb20ebfb4368d3f
      https://github.com/llvm/llvm-project/commit/cd5dab8ad7fccc3b3e371ff37cb20ebfb4368d3f
  Author: Aart Bik <ajcbik at google.com>
  Date:   2019-12-16 (Mon, 16 Dec 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/VectorOps/VectorOps.td
    M mlir/lib/Conversion/VectorToLLVM/ConvertVectorToLLVM.cpp
    M mlir/lib/Dialect/VectorOps/VectorOps.cpp
    M mlir/test/Conversion/VectorToLLVM/vector-to-llvm.mlir
    M mlir/test/Dialect/VectorOps/invalid.mlir
    M mlir/test/Dialect/VectorOps/ops.mlir

  Log Message:
  -----------
  [VectorOps] Add [insert/extract]element definition together with lowering to LLVM

Similar to insert/extract vector instructions but
(1) work on 1-D vectors only
(2) allow for a dynamic index

  %c3 = constant 3 : index
  %0 = vector.insertelement %arg0, %arg1[%c : index] : vector<4xf32>
  %1 = vector.extractelement %arg0[%c3 : index] : vector<4xf32>

PiperOrigin-RevId: 285792205


  Commit: c290e993b25fba6393d860a14458a99222299e5b
      https://github.com/llvm/llvm-project/commit/c290e993b25fba6393d860a14458a99222299e5b
  Author: Mehdi Amini <aminim at google.com>
  Date:   2019-12-16 (Mon, 16 Dec 2019)

  Changed paths:
    M mlir/tools/mlir-tblgen/RewriterGen.cpp

  Log Message:
  -----------
  Remove unused variable (fix warning) NFC

PiperOrigin-RevId: 285799680


  Commit: 3ae56c4135025e5186e289be446246cdc719a5b1
      https://github.com/llvm/llvm-project/commit/3ae56c4135025e5186e289be446246cdc719a5b1
  Author: Jose Ignacio Gomez <jigomez at ucm.es>
  Date:   2019-12-16 (Mon, 16 Dec 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/Linalg/Transforms/LinalgTransformPatterns.td
    M mlir/include/mlir/Dialect/Linalg/Transforms/LinalgTransforms.h
    M mlir/include/mlir/Dialect/Linalg/Utils/Utils.h
    M mlir/lib/Dialect/Linalg/Transforms/LinalgTransforms.cpp
    M mlir/lib/Dialect/Linalg/Transforms/Promotion.cpp
    M mlir/test/Dialect/Linalg/transform-patterns.mlir
    M mlir/test/lib/DeclarativeTransforms/TestLinalgTransformPatterns.td

  Log Message:
  -----------
  [Linalg] Expose subview promotion as a declarative pattern

This PR targest issue tensorflow/mlir#295. It exposes the already existing
subiew promotion pass as a declarative pattern

Change-Id: If901ebef9fb53fcd0b12ecc536f6b174ce320b92

Closes tensorflow/mlir#315

COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/315 from tetuante:issue295 8e5f268b6d85f31015c33505329dbd7a4db97ac5
PiperOrigin-RevId: 285801463


  Commit: ed749b7689702587d369e241c596808f5d6b92cb
      https://github.com/llvm/llvm-project/commit/ed749b7689702587d369e241c596808f5d6b92cb
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2019-12-16 (Mon, 16 Dec 2019)

  Changed paths:
    M mlir/include/mlir/Conversion/LoopToStandard/ConvertLoopToStandard.h
    M mlir/lib/Conversion/LoopToStandard/ConvertLoopToStandard.cpp

  Log Message:
  -----------
  Make "LowerToCFG" an operation pass

The conversion from the Loops dialect to the Standard dialect, also known as
loop-to-cfg lowering, has been historically a function pass. It can be required
on non-Standard function Ops, in particular the recently introduced GPU
functions. Make the conversion an operation pass instead of a function pass.

PiperOrigin-RevId: 285814560


  Commit: ab610e8a9961fb19f396ee4c2065261bd12b0013
      https://github.com/llvm/llvm-project/commit/ab610e8a9961fb19f396ee4c2065261bd12b0013
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-12-16 (Mon, 16 Dec 2019)

  Changed paths:
    M mlir/include/mlir/IR/Block.h
    M mlir/lib/IR/Block.cpp
    M mlir/lib/Transforms/DialectConversion.cpp

  Log Message:
  -----------
  Insert signature-converted blocks into a region with a parent operation.

This keeps the IR valid and consistent as it is expected that each block should have a valid parent region/operation. Previously, converted blocks were kept floating without a valid parent region.

PiperOrigin-RevId: 285821687


  Commit: 6273fa0c6a85985395993e74c92a17709311fb84
      https://github.com/llvm/llvm-project/commit/6273fa0c6a85985395993e74c92a17709311fb84
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2019-12-16 (Mon, 16 Dec 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/GPU/GPUOps.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVLowering.h
    M mlir/lib/Conversion/GPUToNVVM/LowerGpuOpsToNVVMOps.cpp
    M mlir/lib/Conversion/GPUToSPIRV/ConvertGPUToSPIRV.cpp
    M mlir/lib/Dialect/GPU/IR/GPUDialect.cpp
    M mlir/lib/Dialect/GPU/Transforms/KernelOutlining.cpp
    M mlir/lib/Dialect/SPIRV/SPIRVLowering.cpp
    M mlir/test/Conversion/GPUToCUDA/lower-launch-func-to-cuda.mlir
    M mlir/test/Conversion/GPUToNVVM/gpu-to-nvvm.mlir
    M mlir/test/Conversion/GPUToSPIRV/builtins.mlir
    M mlir/test/Conversion/GPUToSPIRV/load-store.mlir
    M mlir/test/Conversion/GPUToSPIRV/loop.mlir
    M mlir/test/Conversion/GPUToSPIRV/simple.mlir
    M mlir/test/Dialect/GPU/invalid.mlir
    M mlir/test/Dialect/GPU/ops.mlir
    M mlir/test/Dialect/GPU/outlining.mlir

  Log Message:
  -----------
  Plug gpu.func into the GPU lowering pipelines

This updates the lowering pipelines from the GPU dialect to lower-level
dialects (NVVM, SPIRV) to use the recently introduced gpu.func operation
instead of a standard function annotated with an attribute. In particular, the
kernel outlining is updated to produce gpu.func instead of std.func and the
individual conversions are updated to consume gpu.funcs and disallow standard
funcs after legalization, if necessary. The attribute "gpu.kernel" is preserved
in the generic syntax, but can also be used with the custom syntax on
gpu.funcs. The special kind of function for GPU allows one to use additional
features such as memory attribution.

PiperOrigin-RevId: 285822272


  Commit: 11e92875f07261c64205c8b72038abf0d65729a0
      https://github.com/llvm/llvm-project/commit/11e92875f07261c64205c8b72038abf0d65729a0
  Author: Andy Davis <andydavis at google.com>
  Date:   2019-12-16 (Mon, 16 Dec 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/VectorOps/VectorOps.td
    M mlir/lib/Dialect/VectorOps/VectorOps.cpp
    M mlir/test/Dialect/VectorOps/invalid.mlir
    M mlir/test/Dialect/VectorOps/ops.mlir

  Log Message:
  -----------
  Add InsertSlicesOp to the VectorOps dialect.

PiperOrigin-RevId: 285830394


  Commit: 3c179b657583c4098d189a475d85f39ff230d924
      https://github.com/llvm/llvm-project/commit/3c179b657583c4098d189a475d85f39ff230d924
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2019-12-16 (Mon, 16 Dec 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/Linalg/EDSC/Builders.h
    A mlir/include/mlir/Dialect/Linalg/EDSC/Intrinsics.h
    M mlir/include/mlir/Dialect/Linalg/IR/LinalgLibraryOps.td
    M mlir/include/mlir/EDSC/Intrinsics.h
    M mlir/lib/Dialect/Linalg/EDSC/Builders.cpp
    M mlir/test/EDSC/builder-api-test.cpp

  Log Message:
  -----------
  Add edsc::ops for pointwise, conv and dilated_conv

This CL adds more Linalg EDSC ops and tests to support building pointwise operations along with conv and dilated_conv.
This also fixes a bug in the existing linalg_matmul EDSC and beefs up the test.

The current set of ops is already enough to build an interesting, albeit simple, model used internally.

PiperOrigin-RevId: 285838012


  Commit: 659150b570e873313536dc0df1f75cce912305b3
      https://github.com/llvm/llvm-project/commit/659150b570e873313536dc0df1f75cce912305b3
  Author: Lei Zhang <antiagainst at google.com>
  Date:   2019-12-16 (Mon, 16 Dec 2019)

  Changed paths:
    M mlir/test/Dialect/SPIRV/Serialization/loop.mlir

  Log Message:
  -----------
  [spirv] Re-enable nested loop (de)serialization test

PiperOrigin-RevId: 285849308


  Commit: a0557ea9d6543a1be8451a59bd697cf01523607f
      https://github.com/llvm/llvm-project/commit/a0557ea9d6543a1be8451a59bd697cf01523607f
  Author: Mahesh Ravishankar <ravishankarm at google.com>
  Date:   2019-12-16 (Mon, 16 Dec 2019)

  Changed paths:
    M mlir/tools/mlir-tblgen/SPIRVUtilsGen.cpp

  Log Message:
  -----------
  Fix (de)serialization generation for SPV_ScopeAttr, SPV_MemorySemanticsAttr.

Scope and Memory Semantics attributes need to be serialized as a
constant integer value and the <id> needs to be used to specify the
value. Fix the auto-generated SPIR-V (de)serialization to handle this.

PiperOrigin-RevId: 285849431


  Commit: 80ec474a65a29a740b2edf7cc77d493ab4013a6b
      https://github.com/llvm/llvm-project/commit/80ec474a65a29a740b2edf7cc77d493ab4013a6b
  Author: Mahesh Ravishankar <ravishankarm at google.com>
  Date:   2019-12-16 (Mon, 16 Dec 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/SPIRV/SPIRVAtomicOps.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVBase.td
    M mlir/lib/Conversion/GPUToSPIRV/ConvertGPUToSPIRV.cpp
    M mlir/lib/Dialect/SPIRV/SPIRVLowering.cpp
    M mlir/lib/Dialect/SPIRV/SPIRVOps.cpp
    M mlir/test/Dialect/SPIRV/Serialization/atomic-ops.mlir
    M mlir/test/Dialect/SPIRV/atomic-ops.mlir
    M mlir/utils/spirv/define_inst.sh
    M mlir/utils/spirv/gen_spirv_dialect.py

  Log Message:
  -----------
  Add atomic operations to SPIR-V dialect.

Some changes to the dialect generation script to allow specification
of different base class to derive from in ODS.

PiperOrigin-RevId: 285859230


  Commit: 4e825c59be48b602a4790c91df0801138f3cbb6e
      https://github.com/llvm/llvm-project/commit/4e825c59be48b602a4790c91df0801138f3cbb6e
  Author: Andy Davis <andydavis at google.com>
  Date:   2019-12-17 (Tue, 17 Dec 2019)

  Changed paths:
    M mlir/lib/Dialect/VectorOps/VectorOps.cpp
    M mlir/lib/Dialect/VectorOps/VectorTransforms.cpp
    M mlir/test/Dialect/VectorOps/vector-transforms.mlir

  Log Message:
  -----------
  Update vector op unrolling transformation to generate ExtractSlicesOp and InsertSlicesOp (instead of less structured chain of StridedSliceOps and InsertStridedSliceOps).

PiperOrigin-RevId: 285968051


  Commit: 8d68fe684e6f8a4012e4d0047df45b6e200244e2
      https://github.com/llvm/llvm-project/commit/8d68fe684e6f8a4012e4d0047df45b6e200244e2
  Author: Tres Popp <tpopp at google.com>
  Date:   2019-12-17 (Tue, 17 Dec 2019)

  Changed paths:
    M mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp

  Log Message:
  -----------
  Replace code with equivalent satisfiesLLVMModule() function call.

This is a general code cleanup and should be a NFC.

PiperOrigin-RevId: 285972718


  Commit: 038ad1d8567ae2f46294e7e7fe68e09c20a309d6
      https://github.com/llvm/llvm-project/commit/038ad1d8567ae2f46294e7e7fe68e09c20a309d6
  Author: Andy Davis <andydavis at google.com>
  Date:   2019-12-17 (Tue, 17 Dec 2019)

  Changed paths:
    M mlir/lib/Dialect/VectorOps/VectorTransforms.cpp
    M mlir/test/Dialect/VectorOps/vector-transforms.mlir

  Log Message:
  -----------
  Add pattern rewrite which splits a vector TransferReadOp into slices according to the unrolling/slicing scheme of its ExtractSlicesOp user.

PiperOrigin-RevId: 285975613


  Commit: 6e581e29a47b3005b14d8c1dac29bd9cd9c48381
      https://github.com/llvm/llvm-project/commit/6e581e29a47b3005b14d8c1dac29bd9cd9c48381
  Author: MLIR Team <no-reply at google.com>
  Date:   2019-12-17 (Tue, 17 Dec 2019)

  Changed paths:
    M mlir/lib/Target/LLVMIR/ConvertToNVVMIR.cpp
    M mlir/lib/Target/LLVMIR/ConvertToROCDLIR.cpp

  Log Message:
  -----------
  Integrate from upstream at revision e4fce659a759.

PiperOrigin-RevId: 285982330


  Commit: f44cf23297089dd4beb6f81a7fdda4e59466dcdb
      https://github.com/llvm/llvm-project/commit/f44cf23297089dd4beb6f81a7fdda4e59466dcdb
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-12-17 (Tue, 17 Dec 2019)

  Changed paths:
    A mlir/include/mlir/ADT/TypeSwitch.h
    M mlir/include/mlir/Support/STLExtras.h
    A mlir/unittests/ADT/CMakeLists.txt
    A mlir/unittests/ADT/TypeSwitchTest.cpp
    M mlir/unittests/CMakeLists.txt

  Log Message:
  -----------
  Add a new utility class TypeSwitch to ADT.

This class provides a simplified mechanism for defining a switch over a set of types using llvm casting functionality. More specifically, this allows for defining a switch over a value of type T where each case corresponds to a type(CaseT) that can be used with dyn_cast<CaseT>(...). An example is shown below:

// Traditional piece of code:
Operation *op = ...;
if (auto constant = dyn_cast<ConstantOp>(op))
  ...;
else if (auto return = dyn_cast<ReturnOp>(op))
  ...;
else
  ...;

// New piece of code:
Operation *op = ...;
TypeSwitch<Operation *>(op)
  .Case<ConstantOp>([](ConstantOp constant) { ... })
  .Case<ReturnOp>([](ReturnOp return) { ... })
  .Default([](Operation *op) { ... });

Aside from the above, TypeSwitch supports return values, void return, multiple types per case, etc. The usability is intended to be very similar to StringSwitch.

(Using c++14 template lambdas makes everything even nicer)
More complex example of how this makes certain things easier:
LogicalResult process(Constant op);
LogicalResult process(ReturnOp op);
LogicalResult process(FuncOp op);

TypeSwitch<Operation *, LogicalResult>(op)
  .Case<ConstantOp, ReturnOp, FuncOp>([](auto op) { return process(op); })
  .Default([](Operation *op) { return op->emitError() << "could not be processed"; });

PiperOrigin-RevId: 286003613


  Commit: 9f45a224412c8381de418d78935075b318352864
      https://github.com/llvm/llvm-project/commit/9f45a224412c8381de418d78935075b318352864
  Author: Jin Mingjian <jin.phd at gmail.com>
  Date:   2019-12-17 (Tue, 17 Dec 2019)

  Changed paths:
    M mlir/g3doc/OpDefinitions.md

  Log Message:
  -----------
  fix a typo in OpDefinitions doc

[{ matched with }], rather than ]}

Closes tensorflow/mlir#320

COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/320 from jinmingjian:patch-1 6b0870d02284f023bda2b28380960eb31d34f3b6
PiperOrigin-RevId: 286007638


  Commit: d1fb285b32d107e21a022f354a09f54f38421529
      https://github.com/llvm/llvm-project/commit/d1fb285b32d107e21a022f354a09f54f38421529
  Author: Andy Davis <andydavis at google.com>
  Date:   2019-12-17 (Tue, 17 Dec 2019)

  Changed paths:
    M mlir/lib/Dialect/VectorOps/VectorTransforms.cpp
    M mlir/test/Dialect/VectorOps/vector-transforms.mlir

  Log Message:
  -----------
  Add pattern rewrite to forward vector tuple elements to their users.

User(TupleGetOp(ExtractSlicesOp(InsertSlicesOp(TupleOp(Producer))) -> User(Producer)

PiperOrigin-RevId: 286020249


  Commit: 651eaa03e8cda04ffcec846d9b84f310aaeeda6e
      https://github.com/llvm/llvm-project/commit/651eaa03e8cda04ffcec846d9b84f310aaeeda6e
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2019-12-17 (Tue, 17 Dec 2019)

  Changed paths:
    M mlir/g3doc/ConversionToLLVMDialect.md

  Log Message:
  -----------
  Homogenize the description of the MemRef conversion to the LLVM dialect

The conversion procedure has been updated to reflect the most recent MemRef
descriptor proposal, but the documentation was only updated for the type
conversion, omitting the address computation section. Make sure the two
sections agree.

PiperOrigin-RevId: 286022684


  Commit: 0bdc72d2df87aec68d7a1920026bcc37422a823b
      https://github.com/llvm/llvm-project/commit/0bdc72d2df87aec68d7a1920026bcc37422a823b
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2019-12-17 (Tue, 17 Dec 2019)

  Changed paths:
    M mlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp

  Log Message:
  -----------
  StdToLLVM conversion: drop getMemRefElementType utility function

This function has become redundant with MemRefDescriptor::getElementType and is
no longer necessary. Use the MemRefDescriptor pervasively to concentrate
descriptor-related logic in one place and drop the utility function.

PiperOrigin-RevId: 286024168


  Commit: 62f498dcb75b0a2086d5426c803c29a080badddb
      https://github.com/llvm/llvm-project/commit/62f498dcb75b0a2086d5426c803c29a080badddb
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2019-12-17 (Tue, 17 Dec 2019)

  Changed paths:
    M mlir/g3doc/ConversionToLLVMDialect.md

  Log Message:
  -----------
  ConversionToLLVMDialect doc: update the syntax for LLVM types

The syntax for LLVM dialect types changed twice since this document was
introduced. First, the quoted types are only prefixed with the dialect name
`!llvm` rather than with `!llvm.type`. Second, for types that are simple enough
(e.g., MLIR identifiers), the pretty form can be used instead of the quoted
form. The relevant commits updated the dialect documentation, but not the
conversion documentation. Use the valid type names in the conversion
documentation.

PiperOrigin-RevId: 286026153


  Commit: 42b3fe833502390d44d2df126048c8310dffa9bd
      https://github.com/llvm/llvm-project/commit/42b3fe833502390d44d2df126048c8310dffa9bd
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2019-12-17 (Tue, 17 Dec 2019)

  Changed paths:
    M mlir/g3doc/ConversionToLLVMDialect.md
    M mlir/include/mlir/Conversion/StandardToLLVM/ConvertStandardToLLVMPass.h
    M mlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp

  Log Message:
  -----------
  Make it possible to override the lowering of MemRef to the LLVM dialect. NFC.

The lowering of MemRef types to the LLVM dialect is connected to the underlying
runtime representation of structured memory buffers. It has changed several
times in the past and reached the current state of a LLVM structured-typed
descriptor containing two pointers and all sizes. In several reported use
cases, a different, often simpler, lowering scheme is required. For example,
lowering statically-shaped memrefs to bare LLVM pointers to simplify aliasing
annotation. Split the pattern population functions into those include
memref-related operations and the remaining ones. Users are expected to extend
TypeConverter::convertType to handle the memref types differently.
PiperOrigin-RevId: 286030610


  Commit: 319cca3bbe69b20334caee2f93aaf6fe0318ca0d
      https://github.com/llvm/llvm-project/commit/319cca3bbe69b20334caee2f93aaf6fe0318ca0d
  Author: Mahesh Ravishankar <ravishankarm at google.com>
  Date:   2019-12-17 (Tue, 17 Dec 2019)

  Changed paths:
    M mlir/lib/Dialect/SPIRV/SPIRVDialect.cpp
    M mlir/test/Dialect/SPIRV/Transforms/inlining.mlir

  Log Message:
  -----------
  Add missing virtual inliner interface method in SPIR-V dialect.

The inline interface uses two methods to check legality of inling:
1) Can a region be inlined into another.
2) Can an operation be inlined into another.
Setting the former to true, allows the inliner to use the second for
legality checks. Add this method to the SPIR-V dialect inlining
interface.

PiperOrigin-RevId: 286041734


  Commit: 6fa3bd5b3e57806ffa34946bd36528f72bf06b58
      https://github.com/llvm/llvm-project/commit/6fa3bd5b3e57806ffa34946bd36528f72bf06b58
  Author: Andy Davis <andydavis at google.com>
  Date:   2019-12-17 (Tue, 17 Dec 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/VectorOps/VectorOps.td
    M mlir/lib/Dialect/VectorOps/VectorOps.cpp
    M mlir/lib/Dialect/VectorOps/VectorTransforms.cpp
    M mlir/test/Dialect/VectorOps/vector-transforms.mlir

  Log Message:
  -----------
  Add pattern rewrite which splits a vector TransferWriteOp into slices according to the unrolling/slicing scheme of its InsertSlicesOp operand.

PiperOrigin-RevId: 286042578


  Commit: 74278dd01e5713920a35f1c3e0731e535667c19a
      https://github.com/llvm/llvm-project/commit/74278dd01e5713920a35f1c3e0731e535667c19a
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-12-17 (Tue, 17 Dec 2019)

  Changed paths:
    M mlir/examples/toy/Ch1/parser/AST.cpp
    M mlir/examples/toy/Ch2/parser/AST.cpp
    M mlir/examples/toy/Ch3/parser/AST.cpp
    M mlir/examples/toy/Ch4/parser/AST.cpp
    M mlir/examples/toy/Ch5/parser/AST.cpp
    M mlir/examples/toy/Ch6/parser/AST.cpp
    M mlir/examples/toy/Ch7/parser/AST.cpp
    M mlir/lib/Analysis/MemRefBoundCheck.cpp
    M mlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp
    M mlir/lib/Dialect/SPIRV/Serialization/Serializer.cpp
    M mlir/lib/Transforms/Utils/Utils.cpp

  Log Message:
  -----------
  NFC: Use TypeSwitch to simplify existing code.
PiperOrigin-RevId: 286066371


  Commit: 5a0d4803f7a8de13f81203072bce4b44ebacb7a1
      https://github.com/llvm/llvm-project/commit/5a0d4803f7a8de13f81203072bce4b44ebacb7a1
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-12-17 (Tue, 17 Dec 2019)

  Changed paths:
    M mlir/examples/toy/Ch1/parser/AST.cpp
    M mlir/examples/toy/Ch2/parser/AST.cpp
    M mlir/examples/toy/Ch3/parser/AST.cpp
    M mlir/examples/toy/Ch4/parser/AST.cpp
    M mlir/examples/toy/Ch5/parser/AST.cpp
    M mlir/examples/toy/Ch6/parser/AST.cpp
    M mlir/examples/toy/Ch7/parser/AST.cpp
    M mlir/lib/Dialect/SPIRV/Serialization/Serializer.cpp

  Log Message:
  -----------
  NFC: Use this-> to appease GCC bug related to template lambda.

GCC is unable to properly implicitly capture 'this' in generic lambdas. This bug is not fixed until 7.1.0:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67274

PiperOrigin-RevId: 286083427


  Commit: c6c6a74d5557d1f373c3bb10fd8a383b0ae18182
      https://github.com/llvm/llvm-project/commit/c6c6a74d5557d1f373c3bb10fd8a383b0ae18182
  Author: MLIR Team <no-reply at google.com>
  Date:   2019-12-17 (Tue, 17 Dec 2019)

  Changed paths:
    M mlir/bindings/python/pybind.cpp
    M mlir/bindings/python/test/test_py2and3.py
    M mlir/include/mlir-c/Core.h
    M mlir/lib/EDSC/CoreAPIs.cpp

  Log Message:
  -----------
  Add support for float and string attributes to the C API and python bindings

PiperOrigin-RevId: 286115042


  Commit: 40ef46fba4a072065c04fa16ac9309b551fd7004
      https://github.com/llvm/llvm-project/commit/40ef46fba4a072065c04fa16ac9309b551fd7004
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2019-12-18 (Wed, 18 Dec 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/GPU/GPUDialect.h
    M mlir/lib/Conversion/GPUToNVVM/LowerGpuOpsToNVVMOps.cpp
    M mlir/lib/Dialect/GPU/IR/GPUDialect.cpp
    M mlir/test/Conversion/GPUToNVVM/memory-attrbution.mlir
    M mlir/test/Dialect/GPU/invalid.mlir

  Log Message:
  -----------
  Harden the requirements to memory attribution types in gpu.func

When memory attributions are present in `gpu.func`, require that they are of
memref type and live in memoryspaces 3 and 5 for workgroup and private memory
attributions, respectively. Adapt the conversion from the GPU dialect to the
NVVM dialect to drop the private memory space from attributions as NVVM is able
to model them as local `llvm.alloca`s in the default memory space.

PiperOrigin-RevId: 286161763


  Commit: abcf5ff0cc6813764cf9a18789bdef96f369eb3c
      https://github.com/llvm/llvm-project/commit/abcf5ff0cc6813764cf9a18789bdef96f369eb3c
  Author: Jacques Pienaar <jpienaar at google.com>
  Date:   2019-12-18 (Wed, 18 Dec 2019)

  Changed paths:
    M mlir/g3doc/LangRef.md

  Log Message:
  -----------
  Fix line break in LangRef

This was munging up the example with the text.

PiperOrigin-RevId: 286201762


  Commit: 24ab8362f2099ed42f2e05f09fb9323ad0c5ab27
      https://github.com/llvm/llvm-project/commit/24ab8362f2099ed42f2e05f09fb9323ad0c5ab27
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2019-12-18 (Wed, 18 Dec 2019)

  Changed paths:
    M mlir/include/mlir/Target/LLVMIR/ModuleTranslation.h
    M mlir/lib/Target/LLVMIR/ModuleTranslation.cpp

  Log Message:
  -----------
  Move function template definition to the header file. NFC

The definition of the function template LLVM::ModuleTranslation::lookupValues
has been located in a source file. As long as it has been the only file that
actually called into the function, this did not cause any problem. However, it
creates linking issues if the function is used from other translation units.

PiperOrigin-RevId: 286203078


  Commit: 4562e389a43caa2e30ebf277c12743edafe6a0ac
      https://github.com/llvm/llvm-project/commit/4562e389a43caa2e30ebf277c12743edafe6a0ac
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-12-18 (Wed, 18 Dec 2019)

  Changed paths:
    M mlir/include/mlir/Analysis/AffineAnalysis.h
    M mlir/include/mlir/Analysis/AffineStructures.h
    M mlir/include/mlir/Analysis/CallInterfaces.h
    M mlir/include/mlir/Analysis/Dominance.h
    M mlir/include/mlir/Analysis/InferTypeOpInterface.td
    M mlir/include/mlir/Analysis/LoopAnalysis.h
    M mlir/include/mlir/Dialect/AffineOps/AffineOps.h
    M mlir/include/mlir/Dialect/CommonFolders.h
    M mlir/include/mlir/Dialect/GPU/GPUOps.td
    M mlir/include/mlir/Dialect/LLVMIR/LLVMDialect.h
    M mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
    M mlir/include/mlir/Dialect/Linalg/Analysis/DependenceAnalysis.h
    M mlir/include/mlir/Dialect/Linalg/EDSC/Builders.h
    M mlir/include/mlir/Dialect/Linalg/IR/LinalgLibraryOps.td
    M mlir/include/mlir/Dialect/Linalg/IR/LinalgOps.td
    M mlir/include/mlir/Dialect/Linalg/IR/LinalgTraits.h
    M mlir/include/mlir/Dialect/Linalg/Transforms/LinalgTransforms.h
    M mlir/include/mlir/Dialect/Linalg/Utils/Utils.h
    M mlir/include/mlir/Dialect/QuantOps/QuantTypes.h
    M mlir/include/mlir/Dialect/QuantOps/UniformSupport.h
    M mlir/include/mlir/Dialect/SDBM/SDBM.h
    M mlir/include/mlir/Dialect/SPIRV/SPIRVOps.h
    M mlir/include/mlir/Dialect/StandardOps/Ops.h
    M mlir/include/mlir/Dialect/VectorOps/Utils.h
    M mlir/include/mlir/EDSC/Builders.h
    M mlir/include/mlir/EDSC/Helpers.h
    M mlir/include/mlir/EDSC/Intrinsics.h
    M mlir/include/mlir/ExecutionEngine/ExecutionEngine.h
    M mlir/include/mlir/IR/AffineExpr.h
    M mlir/include/mlir/IR/AffineMap.h
    M mlir/include/mlir/IR/Attributes.h
    M mlir/include/mlir/IR/Block.h
    M mlir/include/mlir/IR/BlockAndValueMapping.h
    M mlir/include/mlir/IR/Diagnostics.h
    M mlir/include/mlir/IR/Function.h
    M mlir/include/mlir/IR/FunctionImplementation.h
    M mlir/include/mlir/IR/FunctionSupport.h
    M mlir/include/mlir/IR/IntegerSet.h
    M mlir/include/mlir/IR/Module.h
    M mlir/include/mlir/IR/OpDefinition.h
    M mlir/include/mlir/IR/Operation.h
    M mlir/include/mlir/IR/OperationSupport.h
    M mlir/include/mlir/IR/PatternMatch.h
    M mlir/include/mlir/IR/Region.h
    M mlir/include/mlir/IR/StandardTypes.h
    M mlir/include/mlir/IR/TypeUtilities.h
    M mlir/include/mlir/IR/UseDefLists.h
    M mlir/include/mlir/IR/Value.h
    M mlir/include/mlir/IR/Visitors.h
    M mlir/include/mlir/Pass/AnalysisManager.h
    M mlir/include/mlir/Pass/Pass.h
    M mlir/include/mlir/Pass/PassInstrumentation.h
    M mlir/include/mlir/Pass/PassManager.h
    M mlir/include/mlir/Quantizer/Support/Configuration.h
    M mlir/include/mlir/Quantizer/Support/ConstraintAnalysisGraph.h
    M mlir/include/mlir/Quantizer/Support/Metadata.h
    M mlir/include/mlir/Quantizer/Support/Statistics.h
    M mlir/include/mlir/Support/Functional.h
    M mlir/include/mlir/Support/MlirOptMain.h
    M mlir/include/mlir/Support/StorageUniquer.h
    M mlir/include/mlir/Support/ToolUtilities.h
    M mlir/include/mlir/TableGen/Pattern.h
    M mlir/include/mlir/Target/LLVMIR/ModuleTranslation.h
    M mlir/include/mlir/Transforms/DialectConversion.h
    M mlir/include/mlir/Transforms/FoldUtils.h
    M mlir/include/mlir/Transforms/InliningUtils.h
    M mlir/include/mlir/Transforms/LoopFusionUtils.h
    M mlir/include/mlir/Transforms/Passes.h
    M mlir/include/mlir/Transforms/RegionUtils.h
    M mlir/include/mlir/Transforms/ViewOpGraph.h
    M mlir/include/mlir/Transforms/ViewRegionGraph.h
    M mlir/lib/Analysis/AffineAnalysis.cpp
    M mlir/lib/Analysis/AffineStructures.cpp
    M mlir/lib/Analysis/LoopAnalysis.cpp
    M mlir/lib/Analysis/OpStats.cpp
    M mlir/lib/Analysis/TestMemRefDependenceCheck.cpp
    M mlir/lib/Conversion/GPUCommon/OpToFuncCallLowering.h
    M mlir/lib/Conversion/GPUToNVVM/LowerGpuOpsToNVVMOps.cpp
    M mlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp
    M mlir/lib/Conversion/VectorToLoops/ConvertVectorToLoops.cpp
    M mlir/lib/Dialect/AffineOps/AffineOps.cpp
    M mlir/lib/Dialect/FxpMathOps/Transforms/UniformKernelUtils.h
    M mlir/lib/Dialect/GPU/IR/GPUDialect.cpp
    M mlir/lib/Dialect/GPU/Transforms/KernelOutlining.cpp
    M mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
    M mlir/lib/Dialect/Linalg/EDSC/Builders.cpp
    M mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
    M mlir/lib/Dialect/Linalg/Transforms/LinalgTransforms.cpp
    M mlir/lib/Dialect/Linalg/Transforms/Tiling.cpp
    M mlir/lib/Dialect/SDBM/SDBM.cpp
    M mlir/lib/Dialect/SDBM/SDBMExpr.cpp
    M mlir/lib/Dialect/SPIRV/LayoutUtils.cpp
    M mlir/lib/Dialect/SPIRV/SPIRVDialect.cpp
    M mlir/lib/Dialect/SPIRV/SPIRVOps.cpp
    M mlir/lib/Dialect/SPIRV/Serialization/Deserializer.cpp
    M mlir/lib/Dialect/SPIRV/Serialization/Serializer.cpp
    M mlir/lib/Dialect/SPIRV/Serialization/TranslateRegistration.cpp
    M mlir/lib/Dialect/StandardOps/Ops.cpp
    M mlir/lib/Dialect/Traits.cpp
    M mlir/lib/Dialect/VectorOps/VectorTransforms.cpp
    M mlir/lib/EDSC/Builders.cpp
    M mlir/lib/EDSC/CoreAPIs.cpp
    M mlir/lib/ExecutionEngine/ExecutionEngine.cpp
    M mlir/lib/IR/AffineExpr.cpp
    M mlir/lib/IR/AffineMap.cpp
    M mlir/lib/IR/AsmPrinter.cpp
    M mlir/lib/IR/Attributes.cpp
    M mlir/lib/IR/Block.cpp
    M mlir/lib/IR/Diagnostics.cpp
    M mlir/lib/IR/Function.cpp
    M mlir/lib/IR/FunctionImplementation.cpp
    M mlir/lib/IR/IntegerSet.cpp
    M mlir/lib/IR/Module.cpp
    M mlir/lib/IR/Operation.cpp
    M mlir/lib/IR/Region.cpp
    M mlir/lib/IR/StandardTypes.cpp
    M mlir/lib/Parser/Parser.cpp
    M mlir/lib/Pass/Pass.cpp
    M mlir/lib/Pass/PassManagerOptions.cpp
    M mlir/lib/Pass/PassRegistry.cpp
    M mlir/lib/Pass/PassStatistics.cpp
    M mlir/lib/Pass/PassTiming.cpp
    M mlir/lib/Quantizer/Support/ConstraintAnalysisGraph.cpp
    M mlir/lib/Quantizer/Support/Metadata.cpp
    M mlir/lib/Quantizer/Support/Statistics.cpp
    M mlir/lib/Quantizer/Support/UniformConstraints.cpp
    M mlir/lib/Quantizer/Support/UniformSolvers.cpp
    M mlir/lib/Quantizer/Transforms/InferQuantizedTypesPass.cpp
    M mlir/lib/Support/JitRunner.cpp
    M mlir/lib/Support/StorageUniquer.cpp
    M mlir/lib/Support/TranslateClParser.cpp
    M mlir/lib/Target/LLVMIR/ConvertToLLVMIR.cpp
    M mlir/lib/Target/LLVMIR/ConvertToNVVMIR.cpp
    M mlir/lib/Target/LLVMIR/ConvertToROCDLIR.cpp
    M mlir/lib/Target/LLVMIR/ModuleTranslation.cpp
    M mlir/lib/Transforms/DialectConversion.cpp
    M mlir/lib/Transforms/Inliner.cpp
    M mlir/lib/Transforms/LoopInvariantCodeMotion.cpp
    M mlir/lib/Transforms/Utils/FoldUtils.cpp
    M mlir/lib/Transforms/Utils/InliningUtils.cpp
    M mlir/lib/Transforms/Utils/LoopUtils.cpp
    M mlir/lib/Transforms/Utils/RegionUtils.cpp
    M mlir/lib/Transforms/Vectorize.cpp
    M mlir/lib/Transforms/ViewOpGraph.cpp
    M mlir/lib/Transforms/ViewRegionGraph.cpp

  Log Message:
  -----------
  NFC: Remove unnecessary 'llvm::' prefix from uses of llvm symbols declared in `mlir` namespace.

Aside from being cleaner, this also makes the codebase more consistent.

PiperOrigin-RevId: 286206974


  Commit: 47034c4bc509f727051ff172c2bf3367a60e2c01
      https://github.com/llvm/llvm-project/commit/47034c4bc509f727051ff172c2bf3367a60e2c01
  Author: Uday Bondhugula <uday at polymagelabs.com>
  Date:   2019-12-18 (Wed, 18 Dec 2019)

  Changed paths:
    M mlir/g3doc/OpDefinitions.md
    M mlir/include/mlir/Dialect/AffineOps/AffineOps.td
    M mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
    M mlir/include/mlir/Dialect/StandardOps/Ops.td
    M mlir/include/mlir/IR/OpBase.td
    M mlir/include/mlir/IR/OpImplementation.h
    M mlir/lib/Conversion/AffineToStandard/AffineToStandard.cpp
    M mlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp
    M mlir/lib/Dialect/AffineOps/AffineOps.cpp
    M mlir/lib/Dialect/StandardOps/Ops.cpp
    M mlir/lib/Parser/Parser.cpp
    M mlir/lib/Transforms/Utils/Utils.cpp
    M mlir/test/AffineOps/load-store-invalid.mlir
    M mlir/test/AffineOps/load-store.mlir
    M mlir/test/Conversion/StandardToLLVM/convert-memref-ops.mlir
    M mlir/test/IR/core-ops.mlir
    M mlir/test/IR/invalid-ops.mlir
    M mlir/test/Target/llvmir-intrinsics.mlir
    M mlir/test/Transforms/lower-affine.mlir
    M mlir/test/mlir-tblgen/predicate.td
    M mlir/utils/vim/syntax/mlir.vim

  Log Message:
  -----------
  Introduce prefetch op: affine -> std -> llvm intrinsic

Introduce affine.prefetch: op to prefetch using a multi-dimensional
subscript on a memref; similar to affine.load but has no effect on
semantics, but only on performance.

Provide lowering through std.prefetch, llvm.prefetch and map to llvm's
prefetch instrinsic. All attributes reflected through the lowering -
locality hint, rw, and instr/data cache.

  affine.prefetch %0[%i, %j + 5], false, 3, true : memref<400x400xi32>

Signed-off-by: Uday Bondhugula <uday at polymagelabs.com>

Closes tensorflow/mlir#225

COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/225 from bondhugula:prefetch 4c3b4e93bc64d9a5719504e6d6e1657818a2ead0
PiperOrigin-RevId: 286212997


  Commit: 2666b97314ad1b50f88fcc4376ae941f601f67ea
      https://github.com/llvm/llvm-project/commit/2666b97314ad1b50f88fcc4376ae941f601f67ea
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-12-18 (Wed, 18 Dec 2019)

  Changed paths:
    M mlir/lib/Conversion/GPUToSPIRV/ConvertGPUToSPIRV.cpp
    M mlir/lib/Conversion/VectorToLoops/ConvertVectorToLoops.cpp
    M mlir/lib/Dialect/QuantOps/Utils/FakeQuantSupport.cpp
    M mlir/lib/Dialect/QuantOps/Utils/QuantizeUtils.cpp
    M mlir/lib/Dialect/SDBM/SDBMExpr.cpp
    M mlir/lib/Dialect/SPIRV/Transforms/DecorateSPIRVCompositeTypeLayoutPass.cpp
    M mlir/lib/ExecutionEngine/ExecutionEngine.cpp
    M mlir/lib/Quantizer/Support/Statistics.cpp
    M mlir/lib/Quantizer/Support/UniformSolvers.cpp
    M mlir/lib/Target/LLVMIR/ConvertToNVVMIR.cpp
    M mlir/lib/Target/LLVMIR/ConvertToROCDLIR.cpp
    M mlir/lib/Target/LLVMIR/ModuleTranslation.cpp
    M mlir/lib/Transforms/LoopFusion.cpp

  Log Message:
  -----------
  NFC: Cleanup non-conforming usages of namespaces.

* Fixes use of anonymous namespace for static methods.
* Uses explicit qualifiers(mlir::) instead of wrapping the definition with the namespace.

PiperOrigin-RevId: 286222654


  Commit: d7e2cc9bd1d17cbc7182bd904a9173817745525a
      https://github.com/llvm/llvm-project/commit/d7e2cc9bd1d17cbc7182bd904a9173817745525a
  Author: Jacques Pienaar <jpienaar at google.com>
  Date:   2019-12-18 (Wed, 18 Dec 2019)

  Changed paths:
    M mlir/g3doc/Dialects/SPIR-V.md
    M mlir/g3doc/Dialects/Standard.md
    M mlir/g3doc/QuickstartRewrites.md
    M mlir/g3doc/Traits.md
    M mlir/g3doc/Tutorials/Toy/Ch-3.md
    M mlir/g3doc/Tutorials/Toy/Ch-4.md
    M mlir/g3doc/Tutorials/Toy/Ch-5.md
    M mlir/g3doc/Tutorials/Toy/Ch-6.md
    M mlir/g3doc/Tutorials/Toy/Ch-7.md
    R mlir/g3doc/includes/style.css
    M mlir/include/mlir/Dialect/Linalg/IR/LinalgOps.h
    M mlir/include/mlir/Dialect/Linalg/IR/LinalgTypes.h
    M mlir/include/mlir/IR/AffineMap.h
    M mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp

  Log Message:
  -----------
  Update code block designations

'```mlir' is used to indicate the code block is MLIR code/should use MLIR syntax
highlighting, while '{.mlir}' was a markdown extension that used a style file
to color the background differently of the code block. The background color
extension was a custom one that we can retire given we have syntax
highlighting.

Also change '```td' to '```tablegen' to match chroma syntax highlighting
designation.

PiperOrigin-RevId: 286222976


  Commit: 29807ff5e4636b0300cd5a3182eb54254e2714d3
      https://github.com/llvm/llvm-project/commit/29807ff5e4636b0300cd5a3182eb54254e2714d3
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-12-18 (Wed, 18 Dec 2019)

  Changed paths:
    M mlir/g3doc/OpDefinitions.md
    M mlir/include/mlir/Analysis/InferTypeOpInterface.td
    M mlir/include/mlir/IR/OpBase.td
    M mlir/include/mlir/TableGen/OpInterfaces.h
    M mlir/lib/TableGen/OpInterfaces.cpp
    M mlir/test/lib/TestDialect/TestOps.td
    M mlir/tools/mlir-tblgen/OpInterfacesGen.cpp

  Log Message:
  -----------
  Add support for providing a default implementation for an interface method.

This enables providing a default implementation of an interface method. This method is defined on the Trait that is attached to the operation, and thus has all of the same constraints and properties as any other interface method. This allows for interface authors to provide a conservative default implementation for certain methods, without requiring that all users explicitly define it. The default implementation can be specified via the argument directly after the interface method body:

  StaticInterfaceMethod<
    /*desc=*/"Returns whether two array of types are compatible result types for an op.",
    /*retTy=*/"bool",
    /*methodName=*/"isCompatibleReturnTypes",
    /*args=*/(ins "ArrayRef<Type>":$lhs, "ArrayRef<Type>":$rhs),
    /*methodBody=*/[{
      return ConcreteOp::isCompatibleReturnTypes(lhs, rhs);
    }],
    /*defaultImplementation=*/[{
      /// Returns whether two arrays are equal as strongest check for
      /// compatibility by default.
      return lhs == rhs;
    }]

PiperOrigin-RevId: 286226054


  Commit: c169852fc5c5efb4b01600477da00e6ef2517231
      https://github.com/llvm/llvm-project/commit/c169852fc5c5efb4b01600477da00e6ef2517231
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-12-18 (Wed, 18 Dec 2019)

  Changed paths:
    M mlir/lib/Target/LLVMIR/ConvertToROCDLIR.cpp

  Log Message:
  -----------
  NFC: Remove forbidden include of <iostream>

See: https://llvm.org/docs/CodingStandards.html#include-iostream-is-forbidden
PiperOrigin-RevId: 286226467


  Commit: d9b500d3bb151bfb96073b0d66e8338a5c0186d5
      https://github.com/llvm/llvm-project/commit/d9b500d3bb151bfb96073b0d66e8338a5c0186d5
  Author: Aart Bik <ajcbik at google.com>
  Date:   2019-12-18 (Wed, 18 Dec 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/VectorOps/VectorOps.td
    M mlir/lib/Conversion/VectorToLLVM/ConvertVectorToLLVM.cpp
    M mlir/lib/Dialect/VectorOps/VectorOps.cpp
    M mlir/test/Conversion/VectorToLLVM/vector-to-llvm.mlir
    M mlir/test/Dialect/VectorOps/invalid.mlir
    M mlir/test/Dialect/VectorOps/ops.mlir
    M mlir/test/mlir-cpu-runner/include/mlir_runner_utils.h
    M mlir/test/mlir-cpu-runner/mlir_runner_utils.cpp

  Log Message:
  -----------
  [VectorOps] Add vector.print definition, with lowering support

Examples:

  vector.print %f : f32
  vector.print %x : vector<4xf32>
  vector.print %y : vector<3x4xf32>
  vector.print %z : vector<2x3x4xf32>

LLVM lowering replaces these with fully unrolled calls
into a small runtime support library that provides some
basic printing operations (single value, opening closing
bracket, comma, newline).

PiperOrigin-RevId: 286230325


  Commit: 6054610bbe0fcec5b9c71fded7c342b7bcaf3513
      https://github.com/llvm/llvm-project/commit/6054610bbe0fcec5b9c71fded7c342b7bcaf3513
  Author: Marcel Koester <marcel.koester at dfki.de>
  Date:   2019-12-18 (Wed, 18 Dec 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
    M mlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp
    M mlir/test/Target/llvmir-intrinsics.mlir

  Log Message:
  -----------
  Added LLVM ops and lowering phases from standard dialect for FAbs, FCeil, Cos, FNeg, CopySign.

Added test cases for the newly added LLVM operations and lowering features.

Closes tensorflow/mlir#300

COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/300 from dfki-jugr:std_to_llvm da6168bbc1a369ae2e99ad3881fdddd82f075dd4
PiperOrigin-RevId: 286231169


  Commit: 7b3adda8f4f16cce0d7e4675b559620a7f68e57c
      https://github.com/llvm/llvm-project/commit/7b3adda8f4f16cce0d7e4675b559620a7f68e57c
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-12-18 (Wed, 18 Dec 2019)

  Changed paths:
    M mlir/lib/Conversion/VectorToLoops/ConvertVectorToLoops.cpp

  Log Message:
  -----------
  Move the specializations of VectorTransferRewriter::matchAndRewrite back into the anonymous namespace.

This appeases the GCC bug related to specializations in a different namespace.

PiperOrigin-RevId: 286234667


  Commit: 553f794b6fce497d2950b7fcbfd32707dbedd745
      https://github.com/llvm/llvm-project/commit/553f794b6fce497d2950b7fcbfd32707dbedd745
  Author: Sean Silva <silvasean at google.com>
  Date:   2019-12-18 (Wed, 18 Dec 2019)

  Changed paths:
    M mlir/lib/Transforms/Inliner.cpp
    M mlir/lib/Transforms/Utils/InliningUtils.cpp

  Log Message:
  -----------
  Add a couple useful LLVM_DEBUG's to the inliner.

This makes it easier to narrow down on ops that are preventing inlining.

PiperOrigin-RevId: 286243868


  Commit: a1e84db66ee1dea2d7c1d57113a715c6856e4a1a
      https://github.com/llvm/llvm-project/commit/a1e84db66ee1dea2d7c1d57113a715c6856e4a1a
  Author: Aart Bik <ajcbik at google.com>
  Date:   2019-12-18 (Wed, 18 Dec 2019)

  Changed paths:
    M mlir/test/mlir-cpu-runner/mlir_runner_utils.cpp

  Log Message:
  -----------
  [VectorOps] Replace iostream with stdio in support lib for vector.print

PiperOrigin-RevId: 286252829


  Commit: 50f9be6d2d62d36a5c7d6d11d8ed413dc91a4fca
      https://github.com/llvm/llvm-project/commit/50f9be6d2d62d36a5c7d6d11d8ed413dc91a4fca
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2019-12-18 (Wed, 18 Dec 2019)

  Changed paths:
    M mlir/test/mlir-cpu-runner/include/mlir_runner_utils.h
    M mlir/test/mlir-cpu-runner/mlir_runner_utils.cpp
    M mlir/test/mlir-cpu-runner/unranked_memref.mlir

  Log Message:
  -----------
  Add runtime utils support for print_memref_i8

This CL adds print_memref_i8 along with a unit test.

PiperOrigin-RevId: 286299237


  Commit: efadb6b8388344bcf13b739fdc22dd8812df5b3b
      https://github.com/llvm/llvm-project/commit/efadb6b8388344bcf13b739fdc22dd8812df5b3b
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2019-12-19 (Thu, 19 Dec 2019)

  Changed paths:
    M mlir/include/mlir/Target/LLVMIR/ModuleTranslation.h
    M mlir/lib/Target/LLVMIR/ModuleTranslation.cpp

  Log Message:
  -----------
  Detemplatize ModuleTranslation::lookupValues

This function template has been introduced in the early days of MLIR to work
around the absence of common type for ranges of values (operands, block
argumeents, vectors, etc). Core IR now provides ValueRange for exactly this
purpose. Use it instead of the template parameter.

PiperOrigin-RevId: 286431338


  Commit: 15f800f4bc71733c9f47f0dc4d44799be900bc00
      https://github.com/llvm/llvm-project/commit/15f800f4bc71733c9f47f0dc4d44799be900bc00
  Author: Aart Bik <ajcbik at google.com>
  Date:   2019-12-19 (Thu, 19 Dec 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/VectorOps/VectorOps.h
    M mlir/include/mlir/Dialect/VectorOps/VectorOps.td
    M mlir/lib/Dialect/VectorOps/VectorOps.cpp
    M mlir/test/Conversion/VectorToLLVM/vector-to-llvm.mlir
    M mlir/test/Dialect/VectorOps/invalid.mlir
    M mlir/test/Dialect/VectorOps/ops.mlir

  Log Message:
  -----------
  [VectorOps] minor cleanup: vector dialect "subscripts" are i32

Introduces some centralized methods to move towards
consistent use of i32 as vector subscripts.

Note: sizes/strides/offsets attributes are still i64
PiperOrigin-RevId: 286434133


  Commit: 1bcd8ef32f8104cc4bbe9e7003cf8a23c51ae24f
      https://github.com/llvm/llvm-project/commit/1bcd8ef32f8104cc4bbe9e7003cf8a23c51ae24f
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2019-12-19 (Thu, 19 Dec 2019)

  Changed paths:
    M mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp

  Log Message:
  -----------
  LLVMFuncOp: implement addEntryBlock

This function has been declared as a part of the LLVMFuncOp interface but never
implemented.

Closes tensorflow/mlir#325.

PiperOrigin-RevId: 286439619


  Commit: 1d798b1d27fb150de47266b009a414db46344f5a
      https://github.com/llvm/llvm-project/commit/1d798b1d27fb150de47266b009a414db46344f5a
  Author: Andy Davis <andydavis at google.com>
  Date:   2019-12-19 (Thu, 19 Dec 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/VectorOps/VectorOps.td
    M mlir/lib/Dialect/VectorOps/VectorOps.cpp
    M mlir/test/Dialect/VectorOps/invalid.mlir
    M mlir/test/Dialect/VectorOps/ops.mlir

  Log Message:
  -----------
  [VectorOps] Add vector ReshapeOp to the VectorOps dialect.

Adds vector ReshapeOp to the VectorOps dialect. An aggregate vector reshape operation, which aggregates multiple hardware vectors, can enable optimizations during decomposition (e.g. loading one input hardware vector and performing multiple rotate and scatter store operations to the vector output).

PiperOrigin-RevId: 286440658


  Commit: 6685282253c33fa2c5dc7487b04fc92d47082e78
      https://github.com/llvm/llvm-project/commit/6685282253c33fa2c5dc7487b04fc92d47082e78
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2019-12-19 (Thu, 19 Dec 2019)

  Changed paths:
    M mlir/CMakeLists.txt
    A mlir/g3doc/Dialects/Linalg.md
    M mlir/include/mlir/Dialect/AffineOps/CMakeLists.txt
    M mlir/include/mlir/Dialect/FxpMathOps/CMakeLists.txt
    M mlir/include/mlir/Dialect/GPU/CMakeLists.txt
    M mlir/include/mlir/Dialect/LLVMIR/CMakeLists.txt
    M mlir/include/mlir/Dialect/Linalg/IR/CMakeLists.txt
    M mlir/include/mlir/Dialect/Linalg/IR/LinalgBase.td
    A mlir/include/mlir/Dialect/Linalg/IR/LinalgDoc.td
    M mlir/include/mlir/Dialect/Linalg/IR/LinalgOps.h
    A mlir/include/mlir/Dialect/Linalg/IR/LinalgStructuredOps.td
    M mlir/include/mlir/Dialect/Linalg/Transforms/LinalgTransformPatterns.td
    M mlir/include/mlir/Dialect/LoopOps/CMakeLists.txt
    M mlir/include/mlir/Dialect/QuantOps/CMakeLists.txt
    M mlir/include/mlir/Dialect/SPIRV/CMakeLists.txt
    M mlir/include/mlir/Dialect/VectorOps/CMakeLists.txt
    M mlir/lib/Dialect/Linalg/CMakeLists.txt
    M mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
    M mlir/lib/Dialect/Linalg/IR/LinalgTypes.cpp
    M mlir/lib/Dialect/Linalg/Transforms/LinalgToLoops.cpp

  Log Message:
  -----------
  Restructure and update Linalg ODS and documentation - NFC

This CL allows specifying an additional name for specifying the .td file that is used to generate the doc for a dialect. This is necessary for a dialect like Linalg which has different "types" of ops that are used in different contexts.

This CL also restructures the Linalg documentation and renames LinalgLibraryOps -> LinalgStructuredOps but is otherwise NFC.

PiperOrigin-RevId: 286450414


  Commit: 8020ad3e396bcca8dba94cea397cece81b76b119
      https://github.com/llvm/llvm-project/commit/8020ad3e396bcca8dba94cea397cece81b76b119
  Author: Andy Davis <andydavis at google.com>
  Date:   2019-12-19 (Thu, 19 Dec 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/VectorOps/VectorOps.td
    M mlir/lib/Dialect/VectorOps/VectorOps.cpp
    M mlir/test/Dialect/VectorOps/invalid.mlir
    M mlir/test/Dialect/VectorOps/ops.mlir

  Log Message:
  -----------
  [VectorOps] Update vector transfer_read/write ops to operatate on memrefs with vector element type.

Update vector transfer_read/write ops to operatate on memrefs with vector element type.
This handle cases where the memref vector element type represents the minimal memory transfer unit (or multiple of the minimal memory transfer unit).

PiperOrigin-RevId: 286482115


  Commit: b6d54a1ba3f73aab629f73be1844674abc604294
      https://github.com/llvm/llvm-project/commit/b6d54a1ba3f73aab629f73be1844674abc604294
  Author: Jacques Pienaar <jpienaar at google.com>
  Date:   2019-12-19 (Thu, 19 Dec 2019)

  Changed paths:
    M mlir/include/mlir/IR/OpBase.td
    M mlir/lib/TableGen/Operator.cpp
    M mlir/test/mlir-tblgen/op-decl.td

  Log Message:
  -----------
  Unique trait list during ODS Operator trait construction

Concatting lists in TableGen is easy, creating unique lists less so. There is no reason for duplicated op traits so we could throw an error instead but duplicates could occur due to concatting different list of traits in ODS (e.g., for convenience reasons), so just dedup them during Operator trait construction instead.

PiperOrigin-RevId: 286488423


  Commit: 7811ad3c2b312fb5eda5ed5f3a1d15b8e6085b24
      https://github.com/llvm/llvm-project/commit/7811ad3c2b312fb5eda5ed5f3a1d15b8e6085b24
  Author: Frank Laub <frank.laub at intel.com>
  Date:   2019-12-19 (Thu, 19 Dec 2019)

  Changed paths:
    M mlir/include/mlir/IR/OpImplementation.h
    M mlir/lib/IR/AsmPrinter.cpp
    A mlir/test/IR/pretty-region-args.mlir
    M mlir/test/lib/TestDialect/TestDialect.cpp

  Log Message:
  -----------
  Allow dialect to create friendly names for region arguments

This is the block argument equivalent of the existing `getAsmResultNames` hook.

Closes tensorflow/mlir#329

COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/329 from plaidml:flaub-region-arg-names fc7876f2d1335024e441083cd25263fd6247eb7d
PiperOrigin-RevId: 286523299


  Commit: 42d46b4efa9d7b596c74c101a777f4464a8f1fd0
      https://github.com/llvm/llvm-project/commit/42d46b4efa9d7b596c74c101a777f4464a8f1fd0
  Author: Christian Sigg <csigg at google.com>
  Date:   2019-12-20 (Fri, 20 Dec 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/GPU/GPUDialect.h
    M mlir/include/mlir/Dialect/GPU/GPUOps.td
    M mlir/lib/Conversion/GPUToNVVM/LowerGpuOpsToNVVMOps.cpp
    M mlir/lib/Dialect/GPU/IR/GPUDialect.cpp
    M mlir/test/Conversion/GPUToNVVM/gpu-to-nvvm.mlir
    M mlir/test/Dialect/GPU/invalid.mlir
    M mlir/test/Dialect/GPU/ops.mlir
    A mlir/test/mlir-cuda-runner/shuffle.mlir

  Log Message:
  -----------
  Add gpu.shuffle op.

This will allow us to lower most of gpu.all_reduce (when all_reduce
doesn't exist in the target dialect) within the GPU dialect, and only do
target-specific lowering for the shuffle op.

PiperOrigin-RevId: 286548256


  Commit: e5691c512f7335fe90093bb9989da1760d80701b
      https://github.com/llvm/llvm-project/commit/e5691c512f7335fe90093bb9989da1760d80701b
  Author: Uday Bondhugula <uday at polymagelabs.com>
  Date:   2019-12-20 (Fri, 20 Dec 2019)

  Changed paths:
    M mlir/lib/Dialect/AffineOps/AffineOps.cpp
    M mlir/test/AffineOps/invalid.mlir
    M mlir/test/Transforms/slicing-utils.mlir

  Log Message:
  -----------
  fix isValidDim for block arg case

- a block argument associated with an arbitrary op can't be a valid
  dimensional identifier; it has to be the block argument of either
  a function op or an affine.for.

Signed-off-by: Uday Bondhugula <uday at polymagelabs.com>

Closes tensorflow/mlir#331

COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/331 from bondhugula:valid_dim 3273b4fcbaa31fb7b6671d93c9e42a6b2a6a4e4c
PiperOrigin-RevId: 286593693


  Commit: 67c019ddac3954cdb8297448195ded1231a9c069
      https://github.com/llvm/llvm-project/commit/67c019ddac3954cdb8297448195ded1231a9c069
  Author: Aart Bik <ajcbik at google.com>
  Date:   2019-12-20 (Fri, 20 Dec 2019)

  Changed paths:
    M mlir/test/Dialect/VectorOps/invalid.mlir

  Log Message:
  -----------
  [VectorOps] remove redundant returns from invalid ops test

PiperOrigin-RevId: 286640660


  Commit: 1d47564a53b0110d0aff51360c9fad0b6c767908
      https://github.com/llvm/llvm-project/commit/1d47564a53b0110d0aff51360c9fad0b6c767908
  Author: Aart Bik <ajcbik at google.com>
  Date:   2019-12-20 (Fri, 20 Dec 2019)

  Changed paths:
    M mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
    M mlir/include/mlir/Dialect/VectorOps/VectorOps.h
    M mlir/include/mlir/Dialect/VectorOps/VectorOps.td
    M mlir/lib/Conversion/VectorToLLVM/ConvertVectorToLLVM.cpp
    M mlir/lib/Dialect/VectorOps/VectorOps.cpp
    M mlir/test/Conversion/VectorToLLVM/vector-to-llvm.mlir
    M mlir/test/Dialect/VectorOps/invalid.mlir
    M mlir/test/Dialect/VectorOps/ops.mlir

  Log Message:
  -----------
  [VectorOps] unify vector dialect "subscripts"

PiperOrigin-RevId: 286650682


  Commit: ee71ca1d5c01f2cfee6b27d6c162039917caef0f
      https://github.com/llvm/llvm-project/commit/ee71ca1d5c01f2cfee6b27d6c162039917caef0f
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-12-20 (Fri, 20 Dec 2019)

  Changed paths:
    A mlir/include/mlir/Pass/PassOptions.h
    M mlir/include/mlir/Pass/PassRegistry.h

  Log Message:
  -----------
  NFC: Move the classes related to Pass options into a new header file PassOptions.h

This will make refactoring and adding additional features to the pass options infrastructure simpler in followup commits.

PiperOrigin-RevId: 286687564


  Commit: dcc14f08656a82aadd326aeca54b95b5b866fc86
      https://github.com/llvm/llvm-project/commit/dcc14f08656a82aadd326aeca54b95b5b866fc86
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2019-12-21 (Sat, 21 Dec 2019)

  Changed paths:
    M mlir/include/mlir/IR/Attributes.h
    M mlir/include/mlir/IR/Types.h

  Log Message:
  -----------
  Make Type and Attribute classes trivially copyable

This requires using explicitly default copy constructor and copy assignment
operator instead of hand-rolled ones. These classes are indeed cheap to copy
since they are wrappers around a pointer to the implementation. This change
makes sure templated code can use standard type traits to understand that
copying such objects is cheap and appeases analysis tools such as clang-tidy.

PiperOrigin-RevId: 286725565


  Commit: 22954a0e408afde1d8686dffb3a3dcab107a2cd3
      https://github.com/llvm/llvm-project/commit/22954a0e408afde1d8686dffb3a3dcab107a2cd3
  Author: Manuel Freiberger <manuel.freiberger at gmail.com>
  Date:   2019-12-22 (Sun, 22 Dec 2019)

  Changed paths:
    M mlir/bindings/python/test/test_py2and3.py
    M mlir/include/mlir/Dialect/StandardOps/Ops.td
    M mlir/lib/Conversion/AffineToStandard/AffineToStandard.cpp
    M mlir/lib/Conversion/LoopsToGPU/LoopsToGPU.cpp
    M mlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp
    M mlir/lib/Conversion/StandardToSPIRV/ConvertStandardToSPIRV.cpp
    M mlir/lib/Dialect/StandardOps/Ops.cpp
    M mlir/lib/EDSC/Builders.cpp
    M mlir/lib/Transforms/Utils/LoopUtils.cpp
    M mlir/test/Conversion/LoopsToGPU/imperfect_3D.mlir
    M mlir/test/Conversion/LoopsToGPU/imperfect_4D.mlir
    M mlir/test/Conversion/LoopsToGPU/linalg_to_gpu.mlir
    M mlir/test/Conversion/LoopsToGPU/step_positive.mlir
    M mlir/test/Conversion/StandardToLLVM/convert-to-llvmir.mlir
    M mlir/test/Conversion/StandardToSPIRV/std-to-spirv.mlir
    M mlir/test/EDSC/builder-api-test.cpp
    M mlir/test/IR/core-ops.mlir
    M mlir/test/Target/llvmir.mlir
    M mlir/test/Transforms/canonicalize.mlir
    M mlir/test/Transforms/constant-fold.mlir
    M mlir/test/Transforms/loop-coalescing.mlir
    M mlir/test/Transforms/lower-affine.mlir
    M mlir/test/Transforms/parametric-tiling.mlir

  Log Message:
  -----------
  Add integer bit-shift operations to the standard dialect.

Rename the 'shlis' operation in the standard dialect to 'shift_left'. Add tests
for this operation (these have been missing so far) and add a lowering to the
'shl' operation in the LLVM dialect.

Add also 'shift_right_signed' (lowered to LLVM's 'ashr') and 'shift_right_unsigned'
(lowered to 'lshr').

The original plan was to name these operations 'shift.left', 'shift.right.signed'
and 'shift.right.unsigned'. This works if the operations are prefixed with 'std.'
in MLIR assembly. Unfortunately during import the short form is ambigous with
operations from a hypothetical 'shift' dialect. The best solution seems to omit
dots in standard operations for now.

Closes tensorflow/mlir#226

PiperOrigin-RevId: 286803388


  Commit: 35807bc4c5c9d8abc31ba0b2f955a82abf276e12
      https://github.com/llvm/llvm-project/commit/35807bc4c5c9d8abc31ba0b2f955a82abf276e12
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-12-22 (Sun, 22 Dec 2019)

  Changed paths:
    M mlir/bindings/python/pybind.cpp
    M mlir/examples/toy/Ch2/include/toy/Ops.td
    M mlir/examples/toy/Ch2/mlir/Dialect.cpp
    M mlir/examples/toy/Ch2/mlir/MLIRGen.cpp
    M mlir/examples/toy/Ch3/include/toy/Ops.td
    M mlir/examples/toy/Ch3/mlir/Dialect.cpp
    M mlir/examples/toy/Ch3/mlir/MLIRGen.cpp
    M mlir/examples/toy/Ch3/mlir/ToyCombine.cpp
    M mlir/examples/toy/Ch4/include/toy/Ops.td
    M mlir/examples/toy/Ch4/mlir/Dialect.cpp
    M mlir/examples/toy/Ch4/mlir/MLIRGen.cpp
    M mlir/examples/toy/Ch4/mlir/ToyCombine.cpp
    M mlir/examples/toy/Ch5/include/toy/Ops.td
    M mlir/examples/toy/Ch5/mlir/Dialect.cpp
    M mlir/examples/toy/Ch5/mlir/LowerToAffineLoops.cpp
    M mlir/examples/toy/Ch5/mlir/MLIRGen.cpp
    M mlir/examples/toy/Ch5/mlir/ToyCombine.cpp
    M mlir/examples/toy/Ch6/include/toy/Ops.td
    M mlir/examples/toy/Ch6/mlir/Dialect.cpp
    M mlir/examples/toy/Ch6/mlir/LowerToAffineLoops.cpp
    M mlir/examples/toy/Ch6/mlir/LowerToLLVM.cpp
    M mlir/examples/toy/Ch6/mlir/MLIRGen.cpp
    M mlir/examples/toy/Ch6/mlir/ToyCombine.cpp
    M mlir/examples/toy/Ch7/include/toy/Ops.td
    M mlir/examples/toy/Ch7/mlir/Dialect.cpp
    M mlir/examples/toy/Ch7/mlir/LowerToAffineLoops.cpp
    M mlir/examples/toy/Ch7/mlir/LowerToLLVM.cpp
    M mlir/examples/toy/Ch7/mlir/MLIRGen.cpp
    M mlir/examples/toy/Ch7/mlir/ToyCombine.cpp
    M mlir/g3doc/DeclarativeRewrites.md
    M mlir/g3doc/DialectConversion.md
    M mlir/g3doc/EDSC.md
    M mlir/g3doc/GenericDAGRewriter.md
    M mlir/g3doc/OpDefinitions.md
    M mlir/g3doc/QuickstartRewrites.md
    M mlir/g3doc/Rationale.md
    M mlir/g3doc/Tutorials/Toy/Ch-3.md
    M mlir/g3doc/Tutorials/Toy/Ch-4.md
    M mlir/g3doc/Tutorials/Toy/Ch-5.md
    M mlir/g3doc/UsageOfConst.md
    M mlir/include/mlir/Analysis/AffineAnalysis.h
    M mlir/include/mlir/Analysis/AffineStructures.h
    M mlir/include/mlir/Analysis/CallInterfaces.h
    M mlir/include/mlir/Analysis/Dominance.h
    M mlir/include/mlir/Analysis/Liveness.h
    M mlir/include/mlir/Analysis/LoopAnalysis.h
    M mlir/include/mlir/Analysis/Utils.h
    M mlir/include/mlir/Conversion/AffineToStandard/AffineToStandard.h
    M mlir/include/mlir/Conversion/LoopsToGPU/LoopsToGPU.h
    M mlir/include/mlir/Conversion/StandardToLLVM/ConvertStandardToLLVM.h
    M mlir/include/mlir/Dialect/AffineOps/AffineOps.h
    M mlir/include/mlir/Dialect/AffineOps/AffineOps.td
    M mlir/include/mlir/Dialect/GPU/GPUDialect.h
    M mlir/include/mlir/Dialect/GPU/GPUOps.td
    M mlir/include/mlir/Dialect/LLVMIR/LLVMDialect.h
    M mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
    M mlir/include/mlir/Dialect/Linalg/Analysis/DependenceAnalysis.h
    M mlir/include/mlir/Dialect/Linalg/EDSC/Builders.h
    M mlir/include/mlir/Dialect/Linalg/IR/LinalgLibraryOps.td
    M mlir/include/mlir/Dialect/Linalg/IR/LinalgOps.td
    M mlir/include/mlir/Dialect/Linalg/IR/LinalgStructuredOps.td
    M mlir/include/mlir/Dialect/Linalg/IR/LinalgTraits.h
    M mlir/include/mlir/Dialect/Linalg/Transforms/LinalgTransformPatterns.td
    M mlir/include/mlir/Dialect/Linalg/Transforms/LinalgTransforms.h
    M mlir/include/mlir/Dialect/Linalg/Utils/Utils.h
    M mlir/include/mlir/Dialect/LoopOps/LoopOps.h
    M mlir/include/mlir/Dialect/LoopOps/LoopOps.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVCompositeOps.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVControlFlowOps.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVLogicalOps.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVLowering.h
    M mlir/include/mlir/Dialect/SPIRV/SPIRVOps.td
    M mlir/include/mlir/Dialect/StandardOps/Ops.h
    M mlir/include/mlir/Dialect/StandardOps/Ops.td
    M mlir/include/mlir/Dialect/VectorOps/Utils.h
    M mlir/include/mlir/Dialect/VectorOps/VectorOps.td
    M mlir/include/mlir/Dialect/VectorOps/VectorTransforms.h
    M mlir/include/mlir/EDSC/Builders.h
    M mlir/include/mlir/EDSC/Helpers.h
    M mlir/include/mlir/EDSC/Intrinsics.h
    M mlir/include/mlir/IR/Block.h
    M mlir/include/mlir/IR/BlockAndValueMapping.h
    M mlir/include/mlir/IR/Builders.h
    M mlir/include/mlir/IR/FunctionSupport.h
    M mlir/include/mlir/IR/Matchers.h
    M mlir/include/mlir/IR/OpDefinition.h
    M mlir/include/mlir/IR/OpImplementation.h
    M mlir/include/mlir/IR/Operation.h
    M mlir/include/mlir/IR/OperationSupport.h
    M mlir/include/mlir/IR/TypeUtilities.h
    M mlir/include/mlir/IR/Value.h
    M mlir/include/mlir/Quantizer/Support/ConstraintAnalysisGraph.h
    M mlir/include/mlir/Target/LLVMIR/ModuleTranslation.h
    M mlir/include/mlir/Transforms/DialectConversion.h
    M mlir/include/mlir/Transforms/FoldUtils.h
    M mlir/include/mlir/Transforms/InliningUtils.h
    M mlir/include/mlir/Transforms/LoopLikeInterface.td
    M mlir/include/mlir/Transforms/LoopUtils.h
    M mlir/include/mlir/Transforms/RegionUtils.h
    M mlir/include/mlir/Transforms/Utils.h
    M mlir/lib/Analysis/AffineAnalysis.cpp
    M mlir/lib/Analysis/AffineStructures.cpp
    M mlir/lib/Analysis/CallGraph.cpp
    M mlir/lib/Analysis/Dominance.cpp
    M mlir/lib/Analysis/Liveness.cpp
    M mlir/lib/Analysis/LoopAnalysis.cpp
    M mlir/lib/Analysis/SliceAnalysis.cpp
    M mlir/lib/Analysis/Utils.cpp
    M mlir/lib/Analysis/VectorAnalysis.cpp
    M mlir/lib/Analysis/Verifier.cpp
    M mlir/lib/Conversion/AffineToStandard/AffineToStandard.cpp
    M mlir/lib/Conversion/GPUCommon/IndexIntrinsicsOpLowering.h
    M mlir/lib/Conversion/GPUCommon/OpToFuncCallLowering.h
    M mlir/lib/Conversion/GPUToCUDA/ConvertLaunchFuncToCudaCalls.cpp
    M mlir/lib/Conversion/GPUToNVVM/LowerGpuOpsToNVVMOps.cpp
    M mlir/lib/Conversion/GPUToSPIRV/ConvertGPUToSPIRV.cpp
    M mlir/lib/Conversion/LinalgToLLVM/LinalgToLLVM.cpp
    M mlir/lib/Conversion/LoopToStandard/ConvertLoopToStandard.cpp
    M mlir/lib/Conversion/LoopsToGPU/LoopsToGPU.cpp
    M mlir/lib/Conversion/LoopsToGPU/LoopsToGPUPass.cpp
    M mlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp
    M mlir/lib/Conversion/StandardToSPIRV/ConvertStandardToSPIRV.cpp
    M mlir/lib/Conversion/StandardToSPIRV/ConvertStandardToSPIRVPass.cpp
    M mlir/lib/Conversion/StandardToSPIRV/LegalizeStandardForSPIRV.cpp
    M mlir/lib/Conversion/VectorToLLVM/ConvertVectorToLLVM.cpp
    M mlir/lib/Dialect/AffineOps/AffineOps.cpp
    M mlir/lib/Dialect/FxpMathOps/Transforms/LowerUniformRealMath.cpp
    M mlir/lib/Dialect/FxpMathOps/Transforms/UniformKernelUtils.h
    M mlir/lib/Dialect/GPU/IR/GPUDialect.cpp
    M mlir/lib/Dialect/GPU/Transforms/KernelOutlining.cpp
    M mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
    M mlir/lib/Dialect/Linalg/Analysis/DependenceAnalysis.cpp
    M mlir/lib/Dialect/Linalg/EDSC/Builders.cpp
    M mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
    M mlir/lib/Dialect/Linalg/Transforms/Fusion.cpp
    M mlir/lib/Dialect/Linalg/Transforms/LinalgToLoops.cpp
    M mlir/lib/Dialect/Linalg/Transforms/LinalgTransforms.cpp
    M mlir/lib/Dialect/Linalg/Transforms/Promotion.cpp
    M mlir/lib/Dialect/Linalg/Transforms/Tiling.cpp
    M mlir/lib/Dialect/Linalg/Utils/Utils.cpp
    M mlir/lib/Dialect/LoopOps/LoopOps.cpp
    M mlir/lib/Dialect/SPIRV/SPIRVDialect.cpp
    M mlir/lib/Dialect/SPIRV/SPIRVLowering.cpp
    M mlir/lib/Dialect/SPIRV/SPIRVOps.cpp
    M mlir/lib/Dialect/SPIRV/Serialization/Deserializer.cpp
    M mlir/lib/Dialect/SPIRV/Serialization/Serializer.cpp
    M mlir/lib/Dialect/SPIRV/Transforms/LowerABIAttributesPass.cpp
    M mlir/lib/Dialect/StandardOps/Ops.cpp
    M mlir/lib/Dialect/VectorOps/VectorOps.cpp
    M mlir/lib/Dialect/VectorOps/VectorTransforms.cpp
    M mlir/lib/EDSC/Builders.cpp
    M mlir/lib/EDSC/Helpers.cpp
    M mlir/lib/EDSC/Intrinsics.cpp
    M mlir/lib/IR/AsmPrinter.cpp
    M mlir/lib/IR/Block.cpp
    M mlir/lib/IR/Builders.cpp
    M mlir/lib/IR/Operation.cpp
    M mlir/lib/IR/OperationSupport.cpp
    M mlir/lib/IR/Region.cpp
    M mlir/lib/IR/TypeUtilities.cpp
    M mlir/lib/IR/Value.cpp
    M mlir/lib/Parser/Parser.cpp
    M mlir/lib/Pass/IRPrinting.cpp
    M mlir/lib/Quantizer/Support/ConstraintAnalysisGraph.cpp
    M mlir/lib/Quantizer/Transforms/AddDefaultStatsTestPass.cpp
    M mlir/lib/Quantizer/Transforms/InferQuantizedTypesPass.cpp
    M mlir/lib/TableGen/Pattern.cpp
    M mlir/lib/Target/LLVMIR/ConvertFromLLVMIR.cpp
    M mlir/lib/Target/LLVMIR/ModuleTranslation.cpp
    M mlir/lib/Transforms/AffineDataCopyGeneration.cpp
    M mlir/lib/Transforms/AffineLoopInvariantCodeMotion.cpp
    M mlir/lib/Transforms/DialectConversion.cpp
    M mlir/lib/Transforms/LoopFusion.cpp
    M mlir/lib/Transforms/LoopInvariantCodeMotion.cpp
    M mlir/lib/Transforms/LoopTiling.cpp
    M mlir/lib/Transforms/LoopUnrollAndJam.cpp
    M mlir/lib/Transforms/MemRefDataFlowOpt.cpp
    M mlir/lib/Transforms/PipelineDataTransfer.cpp
    M mlir/lib/Transforms/Utils/FoldUtils.cpp
    M mlir/lib/Transforms/Utils/GreedyPatternRewriteDriver.cpp
    M mlir/lib/Transforms/Utils/InliningUtils.cpp
    M mlir/lib/Transforms/Utils/LoopFusionUtils.cpp
    M mlir/lib/Transforms/Utils/LoopUtils.cpp
    M mlir/lib/Transforms/Utils/RegionUtils.cpp
    M mlir/lib/Transforms/Utils/Utils.cpp
    M mlir/lib/Transforms/Vectorize.cpp
    M mlir/test/EDSC/builder-api-test.cpp
    M mlir/test/lib/TestDialect/TestDialect.cpp
    M mlir/test/lib/TestDialect/TestOps.td
    M mlir/test/lib/TestDialect/TestPatterns.cpp
    M mlir/test/lib/Transforms/TestLoopMapping.cpp
    M mlir/test/lib/Transforms/TestVectorizationUtils.cpp
    M mlir/test/mlir-tblgen/op-attribute.td
    M mlir/test/mlir-tblgen/op-decl.td
    M mlir/test/mlir-tblgen/op-operand.td
    M mlir/test/mlir-tblgen/op-result.td
    M mlir/test/mlir-tblgen/predicate.td
    M mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
    M mlir/tools/mlir-tblgen/RewriterGen.cpp
    M mlir/tools/mlir-tblgen/SPIRVUtilsGen.cpp
    M mlir/unittests/IR/OperationSupportTest.cpp

  Log Message:
  -----------
  NFC: Introduce new ValuePtr/ValueRef typedefs to simplify the transition to Value being value-typed.

This is an initial step to refactoring the representation of OpResult as proposed in: https://groups.google.com/a/tensorflow.org/g/mlir/c/XXzzKhqqF_0/m/v6bKb08WCgAJ

This change will make it much simpler to incrementally transition all of the existing code to use value-typed semantics.

PiperOrigin-RevId: 286844725


  Commit: 56222a0694e4caf35e892d70591417c39fef1185
      https://github.com/llvm/llvm-project/commit/56222a0694e4caf35e892d70591417c39fef1185
  Author: Mehdi Amini <aminim at google.com>
  Date:   2019-12-23 (Mon, 23 Dec 2019)

  Changed paths:
    M mlir/LICENSE.TXT
    M mlir/bindings/python/pybind.cpp
    M mlir/examples/toy/Ch1/include/toy/AST.h
    M mlir/examples/toy/Ch1/include/toy/Lexer.h
    M mlir/examples/toy/Ch1/include/toy/Parser.h
    M mlir/examples/toy/Ch1/parser/AST.cpp
    M mlir/examples/toy/Ch1/toyc.cpp
    M mlir/examples/toy/Ch2/include/toy/AST.h
    M mlir/examples/toy/Ch2/include/toy/Dialect.h
    M mlir/examples/toy/Ch2/include/toy/Lexer.h
    M mlir/examples/toy/Ch2/include/toy/MLIRGen.h
    M mlir/examples/toy/Ch2/include/toy/Ops.td
    M mlir/examples/toy/Ch2/include/toy/Parser.h
    M mlir/examples/toy/Ch2/mlir/Dialect.cpp
    M mlir/examples/toy/Ch2/mlir/MLIRGen.cpp
    M mlir/examples/toy/Ch2/parser/AST.cpp
    M mlir/examples/toy/Ch2/toyc.cpp
    M mlir/examples/toy/Ch3/include/toy/AST.h
    M mlir/examples/toy/Ch3/include/toy/Dialect.h
    M mlir/examples/toy/Ch3/include/toy/Lexer.h
    M mlir/examples/toy/Ch3/include/toy/MLIRGen.h
    M mlir/examples/toy/Ch3/include/toy/Ops.td
    M mlir/examples/toy/Ch3/include/toy/Parser.h
    M mlir/examples/toy/Ch3/mlir/Dialect.cpp
    M mlir/examples/toy/Ch3/mlir/MLIRGen.cpp
    M mlir/examples/toy/Ch3/mlir/ToyCombine.cpp
    M mlir/examples/toy/Ch3/mlir/ToyCombine.td
    M mlir/examples/toy/Ch3/parser/AST.cpp
    M mlir/examples/toy/Ch3/toyc.cpp
    M mlir/examples/toy/Ch4/include/toy/AST.h
    M mlir/examples/toy/Ch4/include/toy/Dialect.h
    M mlir/examples/toy/Ch4/include/toy/Lexer.h
    M mlir/examples/toy/Ch4/include/toy/MLIRGen.h
    M mlir/examples/toy/Ch4/include/toy/Ops.td
    M mlir/examples/toy/Ch4/include/toy/Parser.h
    M mlir/examples/toy/Ch4/include/toy/Passes.h
    M mlir/examples/toy/Ch4/include/toy/ShapeInferenceInterface.h
    M mlir/examples/toy/Ch4/include/toy/ShapeInferenceInterface.td
    M mlir/examples/toy/Ch4/mlir/DeadFunctionEliminationPass.cpp
    M mlir/examples/toy/Ch4/mlir/Dialect.cpp
    M mlir/examples/toy/Ch4/mlir/MLIRGen.cpp
    M mlir/examples/toy/Ch4/mlir/ShapeInferencePass.cpp
    M mlir/examples/toy/Ch4/mlir/ToyCombine.cpp
    M mlir/examples/toy/Ch4/mlir/ToyCombine.td
    M mlir/examples/toy/Ch4/parser/AST.cpp
    M mlir/examples/toy/Ch4/toyc.cpp
    M mlir/examples/toy/Ch5/include/toy/AST.h
    M mlir/examples/toy/Ch5/include/toy/Dialect.h
    M mlir/examples/toy/Ch5/include/toy/Lexer.h
    M mlir/examples/toy/Ch5/include/toy/MLIRGen.h
    M mlir/examples/toy/Ch5/include/toy/Ops.td
    M mlir/examples/toy/Ch5/include/toy/Parser.h
    M mlir/examples/toy/Ch5/include/toy/Passes.h
    M mlir/examples/toy/Ch5/include/toy/ShapeInferenceInterface.h
    M mlir/examples/toy/Ch5/include/toy/ShapeInferenceInterface.td
    M mlir/examples/toy/Ch5/mlir/DeadFunctionEliminationPass.cpp
    M mlir/examples/toy/Ch5/mlir/Dialect.cpp
    M mlir/examples/toy/Ch5/mlir/LowerToAffineLoops.cpp
    M mlir/examples/toy/Ch5/mlir/MLIRGen.cpp
    M mlir/examples/toy/Ch5/mlir/ShapeInferencePass.cpp
    M mlir/examples/toy/Ch5/mlir/ToyCombine.cpp
    M mlir/examples/toy/Ch5/mlir/ToyCombine.td
    M mlir/examples/toy/Ch5/parser/AST.cpp
    M mlir/examples/toy/Ch5/toyc.cpp
    M mlir/examples/toy/Ch6/include/toy/AST.h
    M mlir/examples/toy/Ch6/include/toy/Dialect.h
    M mlir/examples/toy/Ch6/include/toy/Lexer.h
    M mlir/examples/toy/Ch6/include/toy/MLIRGen.h
    M mlir/examples/toy/Ch6/include/toy/Ops.td
    M mlir/examples/toy/Ch6/include/toy/Parser.h
    M mlir/examples/toy/Ch6/include/toy/Passes.h
    M mlir/examples/toy/Ch6/include/toy/ShapeInferenceInterface.h
    M mlir/examples/toy/Ch6/include/toy/ShapeInferenceInterface.td
    M mlir/examples/toy/Ch6/mlir/DeadFunctionEliminationPass.cpp
    M mlir/examples/toy/Ch6/mlir/Dialect.cpp
    M mlir/examples/toy/Ch6/mlir/LowerToAffineLoops.cpp
    M mlir/examples/toy/Ch6/mlir/LowerToLLVM.cpp
    M mlir/examples/toy/Ch6/mlir/MLIRGen.cpp
    M mlir/examples/toy/Ch6/mlir/ShapeInferencePass.cpp
    M mlir/examples/toy/Ch6/mlir/ToyCombine.cpp
    M mlir/examples/toy/Ch6/mlir/ToyCombine.td
    M mlir/examples/toy/Ch6/parser/AST.cpp
    M mlir/examples/toy/Ch6/toyc.cpp
    M mlir/examples/toy/Ch7/include/toy/AST.h
    M mlir/examples/toy/Ch7/include/toy/Dialect.h
    M mlir/examples/toy/Ch7/include/toy/Lexer.h
    M mlir/examples/toy/Ch7/include/toy/MLIRGen.h
    M mlir/examples/toy/Ch7/include/toy/Ops.td
    M mlir/examples/toy/Ch7/include/toy/Parser.h
    M mlir/examples/toy/Ch7/include/toy/Passes.h
    M mlir/examples/toy/Ch7/include/toy/ShapeInferenceInterface.h
    M mlir/examples/toy/Ch7/include/toy/ShapeInferenceInterface.td
    M mlir/examples/toy/Ch7/mlir/DeadFunctionEliminationPass.cpp
    M mlir/examples/toy/Ch7/mlir/Dialect.cpp
    M mlir/examples/toy/Ch7/mlir/LowerToAffineLoops.cpp
    M mlir/examples/toy/Ch7/mlir/LowerToLLVM.cpp
    M mlir/examples/toy/Ch7/mlir/MLIRGen.cpp
    M mlir/examples/toy/Ch7/mlir/ShapeInferencePass.cpp
    M mlir/examples/toy/Ch7/mlir/ToyCombine.cpp
    M mlir/examples/toy/Ch7/mlir/ToyCombine.td
    M mlir/examples/toy/Ch7/parser/AST.cpp
    M mlir/examples/toy/Ch7/toyc.cpp
    M mlir/include/mlir-c/Core.h
    M mlir/include/mlir/ADT/TypeSwitch.h
    M mlir/include/mlir/Analysis/AffineAnalysis.h
    M mlir/include/mlir/Analysis/AffineStructures.h
    M mlir/include/mlir/Analysis/CallGraph.h
    M mlir/include/mlir/Analysis/CallInterfaces.h
    M mlir/include/mlir/Analysis/CallInterfaces.td
    M mlir/include/mlir/Analysis/Dominance.h
    M mlir/include/mlir/Analysis/InferTypeOpInterface.h
    M mlir/include/mlir/Analysis/InferTypeOpInterface.td
    M mlir/include/mlir/Analysis/Liveness.h
    M mlir/include/mlir/Analysis/LoopAnalysis.h
    M mlir/include/mlir/Analysis/NestedMatcher.h
    M mlir/include/mlir/Analysis/Passes.h
    M mlir/include/mlir/Analysis/SliceAnalysis.h
    M mlir/include/mlir/Analysis/Utils.h
    M mlir/include/mlir/Analysis/Verifier.h
    M mlir/include/mlir/Conversion/AffineToStandard/AffineToStandard.h
    M mlir/include/mlir/Conversion/GPUToCUDA/GPUToCUDAPass.h
    M mlir/include/mlir/Conversion/GPUToNVVM/GPUToNVVMPass.h
    M mlir/include/mlir/Conversion/GPUToROCDL/GPUToROCDLPass.h
    M mlir/include/mlir/Conversion/GPUToSPIRV/ConvertGPUToSPIRV.h
    M mlir/include/mlir/Conversion/GPUToSPIRV/ConvertGPUToSPIRVPass.h
    M mlir/include/mlir/Conversion/LinalgToLLVM/LinalgToLLVM.h
    M mlir/include/mlir/Conversion/LoopToStandard/ConvertLoopToStandard.h
    M mlir/include/mlir/Conversion/LoopsToGPU/LoopsToGPU.h
    M mlir/include/mlir/Conversion/LoopsToGPU/LoopsToGPUPass.h
    M mlir/include/mlir/Conversion/StandardToLLVM/ConvertStandardToLLVM.h
    M mlir/include/mlir/Conversion/StandardToLLVM/ConvertStandardToLLVMPass.h
    M mlir/include/mlir/Conversion/StandardToSPIRV/ConvertStandardToSPIRV.h
    M mlir/include/mlir/Conversion/StandardToSPIRV/ConvertStandardToSPIRVPass.h
    M mlir/include/mlir/Conversion/VectorToLLVM/ConvertVectorToLLVM.h
    M mlir/include/mlir/Conversion/VectorToLoops/ConvertVectorToLoops.h
    M mlir/include/mlir/Dialect/AffineOps/AffineOps.h
    M mlir/include/mlir/Dialect/AffineOps/AffineOps.td
    M mlir/include/mlir/Dialect/AffineOps/AffineOpsBase.td
    M mlir/include/mlir/Dialect/CommonFolders.h
    M mlir/include/mlir/Dialect/FxpMathOps/FxpMathOps.h
    M mlir/include/mlir/Dialect/FxpMathOps/FxpMathOps.td
    M mlir/include/mlir/Dialect/FxpMathOps/Passes.h
    M mlir/include/mlir/Dialect/GPU/GPUDialect.h
    M mlir/include/mlir/Dialect/GPU/GPUOps.td
    M mlir/include/mlir/Dialect/GPU/Passes.h
    M mlir/include/mlir/Dialect/LLVMIR/LLVMDialect.h
    M mlir/include/mlir/Dialect/LLVMIR/LLVMOpBase.td
    M mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
    M mlir/include/mlir/Dialect/LLVMIR/NVVMDialect.h
    M mlir/include/mlir/Dialect/LLVMIR/NVVMOps.td
    M mlir/include/mlir/Dialect/LLVMIR/ROCDLDialect.h
    M mlir/include/mlir/Dialect/LLVMIR/ROCDLOps.td
    M mlir/include/mlir/Dialect/Linalg/Analysis/DependenceAnalysis.h
    M mlir/include/mlir/Dialect/Linalg/EDSC/Builders.h
    M mlir/include/mlir/Dialect/Linalg/EDSC/Intrinsics.h
    M mlir/include/mlir/Dialect/Linalg/IR/LinalgBase.td
    M mlir/include/mlir/Dialect/Linalg/IR/LinalgDoc.td
    M mlir/include/mlir/Dialect/Linalg/IR/LinalgLibraryOps.td
    M mlir/include/mlir/Dialect/Linalg/IR/LinalgOps.h
    M mlir/include/mlir/Dialect/Linalg/IR/LinalgOps.td
    M mlir/include/mlir/Dialect/Linalg/IR/LinalgStructuredOps.td
    M mlir/include/mlir/Dialect/Linalg/IR/LinalgTraits.h
    M mlir/include/mlir/Dialect/Linalg/IR/LinalgTypes.h
    M mlir/include/mlir/Dialect/Linalg/Passes.h
    M mlir/include/mlir/Dialect/Linalg/Transforms/LinalgTransformPatterns.td
    M mlir/include/mlir/Dialect/Linalg/Transforms/LinalgTransforms.h
    M mlir/include/mlir/Dialect/Linalg/Utils/Intrinsics.h
    M mlir/include/mlir/Dialect/Linalg/Utils/Utils.h
    M mlir/include/mlir/Dialect/LoopOps/LoopOps.h
    M mlir/include/mlir/Dialect/LoopOps/LoopOps.td
    M mlir/include/mlir/Dialect/QuantOps/FakeQuantSupport.h
    M mlir/include/mlir/Dialect/QuantOps/Passes.h
    M mlir/include/mlir/Dialect/QuantOps/QuantOps.h
    M mlir/include/mlir/Dialect/QuantOps/QuantOps.td
    M mlir/include/mlir/Dialect/QuantOps/QuantPredicates.td
    M mlir/include/mlir/Dialect/QuantOps/QuantTypes.h
    M mlir/include/mlir/Dialect/QuantOps/QuantizeUtils.h
    M mlir/include/mlir/Dialect/QuantOps/UniformSupport.h
    M mlir/include/mlir/Dialect/SDBM/SDBM.h
    M mlir/include/mlir/Dialect/SDBM/SDBMDialect.h
    M mlir/include/mlir/Dialect/SDBM/SDBMExpr.h
    M mlir/include/mlir/Dialect/SPIRV/LayoutUtils.h
    M mlir/include/mlir/Dialect/SPIRV/Passes.h
    M mlir/include/mlir/Dialect/SPIRV/SPIRVArithmeticOps.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVAtomicOps.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVBase.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVBinaryUtils.h
    M mlir/include/mlir/Dialect/SPIRV/SPIRVBitOps.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVCastOps.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVCompositeOps.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVControlFlowOps.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVDialect.h
    M mlir/include/mlir/Dialect/SPIRV/SPIRVGLSLOps.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVGroupOps.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVLogicalOps.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVLowering.h
    M mlir/include/mlir/Dialect/SPIRV/SPIRVLowering.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVNonUniformOps.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVOps.h
    M mlir/include/mlir/Dialect/SPIRV/SPIRVOps.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVStructureOps.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVTypes.h
    M mlir/include/mlir/Dialect/SPIRV/Serialization.h
    M mlir/include/mlir/Dialect/StandardOps/Ops.h
    M mlir/include/mlir/Dialect/StandardOps/Ops.td
    M mlir/include/mlir/Dialect/Traits.h
    M mlir/include/mlir/Dialect/Utils/StructuredOpsUtils.h
    M mlir/include/mlir/Dialect/VectorOps/Utils.h
    M mlir/include/mlir/Dialect/VectorOps/VectorOps.h
    M mlir/include/mlir/Dialect/VectorOps/VectorOps.td
    M mlir/include/mlir/Dialect/VectorOps/VectorTransformPatterns.td
    M mlir/include/mlir/Dialect/VectorOps/VectorTransforms.h
    M mlir/include/mlir/EDSC/Builders.h
    M mlir/include/mlir/EDSC/Helpers.h
    M mlir/include/mlir/EDSC/Intrinsics.h
    M mlir/include/mlir/ExecutionEngine/ExecutionEngine.h
    M mlir/include/mlir/ExecutionEngine/OptUtils.h
    M mlir/include/mlir/IR/AffineExpr.h
    M mlir/include/mlir/IR/AffineExprVisitor.h
    M mlir/include/mlir/IR/AffineMap.h
    M mlir/include/mlir/IR/AttributeSupport.h
    M mlir/include/mlir/IR/Attributes.h
    M mlir/include/mlir/IR/Block.h
    M mlir/include/mlir/IR/BlockAndValueMapping.h
    M mlir/include/mlir/IR/BlockSupport.h
    M mlir/include/mlir/IR/Builders.h
    M mlir/include/mlir/IR/Diagnostics.h
    M mlir/include/mlir/IR/Dialect.h
    M mlir/include/mlir/IR/DialectHooks.h
    M mlir/include/mlir/IR/DialectImplementation.h
    M mlir/include/mlir/IR/DialectInterface.h
    M mlir/include/mlir/IR/DialectSymbolRegistry.def
    M mlir/include/mlir/IR/Function.h
    M mlir/include/mlir/IR/FunctionImplementation.h
    M mlir/include/mlir/IR/FunctionSupport.h
    M mlir/include/mlir/IR/Identifier.h
    M mlir/include/mlir/IR/IntegerSet.h
    M mlir/include/mlir/IR/Location.h
    M mlir/include/mlir/IR/MLIRContext.h
    M mlir/include/mlir/IR/Matchers.h
    M mlir/include/mlir/IR/Module.h
    M mlir/include/mlir/IR/OpAsmInterface.td
    M mlir/include/mlir/IR/OpBase.td
    M mlir/include/mlir/IR/OpDefinition.h
    M mlir/include/mlir/IR/OpImplementation.h
    M mlir/include/mlir/IR/Operation.h
    M mlir/include/mlir/IR/OperationSupport.h
    M mlir/include/mlir/IR/PatternMatch.h
    M mlir/include/mlir/IR/Region.h
    M mlir/include/mlir/IR/RegionGraphTraits.h
    M mlir/include/mlir/IR/StandardTypes.h
    M mlir/include/mlir/IR/StorageUniquerSupport.h
    M mlir/include/mlir/IR/SymbolTable.h
    M mlir/include/mlir/IR/TypeSupport.h
    M mlir/include/mlir/IR/TypeUtilities.h
    M mlir/include/mlir/IR/Types.h
    M mlir/include/mlir/IR/UseDefLists.h
    M mlir/include/mlir/IR/Value.h
    M mlir/include/mlir/IR/Visitors.h
    M mlir/include/mlir/Parser.h
    M mlir/include/mlir/Pass/AnalysisManager.h
    M mlir/include/mlir/Pass/Pass.h
    M mlir/include/mlir/Pass/PassInstrumentation.h
    M mlir/include/mlir/Pass/PassManager.h
    M mlir/include/mlir/Pass/PassOptions.h
    M mlir/include/mlir/Pass/PassRegistry.h
    M mlir/include/mlir/Quantizer/Configurations/FxpMathConfig.h
    M mlir/include/mlir/Quantizer/Support/Configuration.h
    M mlir/include/mlir/Quantizer/Support/ConstraintAnalysisGraph.h
    M mlir/include/mlir/Quantizer/Support/ConstraintAnalysisGraphTraits.h
    M mlir/include/mlir/Quantizer/Support/Metadata.h
    M mlir/include/mlir/Quantizer/Support/Rules.h
    M mlir/include/mlir/Quantizer/Support/Statistics.h
    M mlir/include/mlir/Quantizer/Support/TypeUtils.h
    M mlir/include/mlir/Quantizer/Support/UniformConstraints.h
    M mlir/include/mlir/Quantizer/Support/UniformSolvers.h
    M mlir/include/mlir/Quantizer/Transforms/Passes.h
    M mlir/include/mlir/Support/DebugStringHelper.h
    M mlir/include/mlir/Support/FileUtilities.h
    M mlir/include/mlir/Support/Functional.h
    M mlir/include/mlir/Support/JitRunner.h
    M mlir/include/mlir/Support/LLVM.h
    M mlir/include/mlir/Support/LogicalResult.h
    M mlir/include/mlir/Support/MathExtras.h
    M mlir/include/mlir/Support/MlirOptMain.h
    M mlir/include/mlir/Support/STLExtras.h
    M mlir/include/mlir/Support/StorageUniquer.h
    M mlir/include/mlir/Support/StringExtras.h
    M mlir/include/mlir/Support/ToolUtilities.h
    M mlir/include/mlir/Support/TranslateClParser.h
    M mlir/include/mlir/TableGen/Argument.h
    M mlir/include/mlir/TableGen/Attribute.h
    M mlir/include/mlir/TableGen/Constraint.h
    M mlir/include/mlir/TableGen/Dialect.h
    M mlir/include/mlir/TableGen/Format.h
    M mlir/include/mlir/TableGen/GenInfo.h
    M mlir/include/mlir/TableGen/GenNameParser.h
    M mlir/include/mlir/TableGen/OpInterfaces.h
    M mlir/include/mlir/TableGen/OpTrait.h
    M mlir/include/mlir/TableGen/Operator.h
    M mlir/include/mlir/TableGen/Pattern.h
    M mlir/include/mlir/TableGen/Predicate.h
    M mlir/include/mlir/TableGen/Region.h
    M mlir/include/mlir/TableGen/Type.h
    M mlir/include/mlir/Target/LLVMIR.h
    M mlir/include/mlir/Target/LLVMIR/ModuleTranslation.h
    M mlir/include/mlir/Target/NVVMIR.h
    M mlir/include/mlir/Target/ROCDLIR.h
    M mlir/include/mlir/Transforms/DialectConversion.h
    M mlir/include/mlir/Transforms/FoldUtils.h
    M mlir/include/mlir/Transforms/InliningUtils.h
    M mlir/include/mlir/Transforms/LoopFusionUtils.h
    M mlir/include/mlir/Transforms/LoopLikeInterface.h
    M mlir/include/mlir/Transforms/LoopLikeInterface.td
    M mlir/include/mlir/Transforms/LoopUtils.h
    M mlir/include/mlir/Transforms/Passes.h
    M mlir/include/mlir/Transforms/RegionUtils.h
    M mlir/include/mlir/Transforms/SideEffectsInterface.h
    M mlir/include/mlir/Transforms/Utils.h
    M mlir/include/mlir/Transforms/ViewOpGraph.h
    M mlir/include/mlir/Transforms/ViewRegionGraph.h
    M mlir/include/mlir/Translation.h
    M mlir/lib/Analysis/AffineAnalysis.cpp
    M mlir/lib/Analysis/AffineStructures.cpp
    M mlir/lib/Analysis/CallGraph.cpp
    M mlir/lib/Analysis/Dominance.cpp
    M mlir/lib/Analysis/InferTypeOpInterface.cpp
    M mlir/lib/Analysis/Liveness.cpp
    M mlir/lib/Analysis/LoopAnalysis.cpp
    M mlir/lib/Analysis/MemRefBoundCheck.cpp
    M mlir/lib/Analysis/NestedMatcher.cpp
    M mlir/lib/Analysis/OpStats.cpp
    M mlir/lib/Analysis/SliceAnalysis.cpp
    M mlir/lib/Analysis/TestMemRefDependenceCheck.cpp
    M mlir/lib/Analysis/TestParallelismDetection.cpp
    M mlir/lib/Analysis/Utils.cpp
    M mlir/lib/Analysis/VectorAnalysis.cpp
    M mlir/lib/Analysis/Verifier.cpp
    M mlir/lib/Conversion/AffineToStandard/AffineToStandard.cpp
    M mlir/lib/Conversion/GPUCommon/IndexIntrinsicsOpLowering.h
    M mlir/lib/Conversion/GPUCommon/OpToFuncCallLowering.h
    M mlir/lib/Conversion/GPUToCUDA/ConvertKernelFuncToCubin.cpp
    M mlir/lib/Conversion/GPUToCUDA/ConvertLaunchFuncToCudaCalls.cpp
    M mlir/lib/Conversion/GPUToNVVM/GPUToNVVM.td
    M mlir/lib/Conversion/GPUToNVVM/LowerGpuOpsToNVVMOps.cpp
    M mlir/lib/Conversion/GPUToROCDL/LowerGpuOpsToROCDLOps.cpp
    M mlir/lib/Conversion/GPUToSPIRV/ConvertGPUToSPIRV.cpp
    M mlir/lib/Conversion/GPUToSPIRV/ConvertGPUToSPIRVPass.cpp
    M mlir/lib/Conversion/LinalgToLLVM/LinalgToLLVM.cpp
    M mlir/lib/Conversion/LoopToStandard/ConvertLoopToStandard.cpp
    M mlir/lib/Conversion/LoopsToGPU/LoopsToGPU.cpp
    M mlir/lib/Conversion/LoopsToGPU/LoopsToGPUPass.cpp
    M mlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp
    M mlir/lib/Conversion/StandardToSPIRV/ConvertStandardToSPIRV.cpp
    M mlir/lib/Conversion/StandardToSPIRV/ConvertStandardToSPIRVPass.cpp
    M mlir/lib/Conversion/StandardToSPIRV/LegalizeStandardForSPIRV.cpp
    M mlir/lib/Conversion/VectorToLLVM/ConvertVectorToLLVM.cpp
    M mlir/lib/Conversion/VectorToLoops/ConvertVectorToLoops.cpp
    M mlir/lib/Dialect/AffineOps/AffineOps.cpp
    M mlir/lib/Dialect/AffineOps/DialectRegistration.cpp
    M mlir/lib/Dialect/FxpMathOps/IR/DialectRegistration.cpp
    M mlir/lib/Dialect/FxpMathOps/IR/FxpMathOps.cpp
    M mlir/lib/Dialect/FxpMathOps/Transforms/LowerUniformRealMath.cpp
    M mlir/lib/Dialect/FxpMathOps/Transforms/UniformKernelUtils.h
    M mlir/lib/Dialect/GPU/IR/DialectRegistration.cpp
    M mlir/lib/Dialect/GPU/IR/GPUDialect.cpp
    M mlir/lib/Dialect/GPU/Transforms/KernelOutlining.cpp
    M mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
    M mlir/lib/Dialect/LLVMIR/IR/NVVMDialect.cpp
    M mlir/lib/Dialect/LLVMIR/IR/ROCDLDialect.cpp
    M mlir/lib/Dialect/Linalg/Analysis/DependenceAnalysis.cpp
    M mlir/lib/Dialect/Linalg/EDSC/Builders.cpp
    M mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
    M mlir/lib/Dialect/Linalg/IR/LinalgTypes.cpp
    M mlir/lib/Dialect/Linalg/LinalgRegistration.cpp
    M mlir/lib/Dialect/Linalg/Transforms/Fusion.cpp
    M mlir/lib/Dialect/Linalg/Transforms/LinalgToLoops.cpp
    M mlir/lib/Dialect/Linalg/Transforms/LinalgTransforms.cpp
    M mlir/lib/Dialect/Linalg/Transforms/Promotion.cpp
    M mlir/lib/Dialect/Linalg/Transforms/Tiling.cpp
    M mlir/lib/Dialect/Linalg/Utils/Utils.cpp
    M mlir/lib/Dialect/LoopOps/DialectRegistration.cpp
    M mlir/lib/Dialect/LoopOps/LoopOps.cpp
    M mlir/lib/Dialect/QuantOps/IR/DialectRegistration.cpp
    M mlir/lib/Dialect/QuantOps/IR/QuantOps.cpp
    M mlir/lib/Dialect/QuantOps/IR/QuantTypes.cpp
    M mlir/lib/Dialect/QuantOps/IR/TypeDetail.h
    M mlir/lib/Dialect/QuantOps/IR/TypeParser.cpp
    M mlir/lib/Dialect/QuantOps/Transforms/ConvertConst.cpp
    M mlir/lib/Dialect/QuantOps/Transforms/ConvertSimQuant.cpp
    M mlir/lib/Dialect/QuantOps/Utils/FakeQuantSupport.cpp
    M mlir/lib/Dialect/QuantOps/Utils/QuantizeUtils.cpp
    M mlir/lib/Dialect/QuantOps/Utils/UniformSupport.cpp
    M mlir/lib/Dialect/SDBM/SDBM.cpp
    M mlir/lib/Dialect/SDBM/SDBMDialect.cpp
    M mlir/lib/Dialect/SDBM/SDBMExpr.cpp
    M mlir/lib/Dialect/SDBM/SDBMExprDetail.h
    M mlir/lib/Dialect/SPIRV/DialectRegistration.cpp
    M mlir/lib/Dialect/SPIRV/LayoutUtils.cpp
    M mlir/lib/Dialect/SPIRV/SPIRVLowering.cpp
    M mlir/lib/Dialect/SPIRV/SPIRVOps.cpp
    M mlir/lib/Dialect/SPIRV/SPIRVTypes.cpp
    M mlir/lib/Dialect/SPIRV/Serialization/Deserializer.cpp
    M mlir/lib/Dialect/SPIRV/Serialization/SPIRVBinaryUtils.cpp
    M mlir/lib/Dialect/SPIRV/Serialization/Serializer.cpp
    M mlir/lib/Dialect/SPIRV/Serialization/TranslateRegistration.cpp
    M mlir/lib/Dialect/SPIRV/Transforms/DecorateSPIRVCompositeTypeLayoutPass.cpp
    M mlir/lib/Dialect/SPIRV/Transforms/LowerABIAttributesPass.cpp
    M mlir/lib/Dialect/StandardOps/DialectRegistration.cpp
    M mlir/lib/Dialect/StandardOps/Ops.cpp
    M mlir/lib/Dialect/Traits.cpp
    M mlir/lib/Dialect/VectorOps/DialectRegistration.cpp
    M mlir/lib/Dialect/VectorOps/VectorOps.cpp
    M mlir/lib/Dialect/VectorOps/VectorTransforms.cpp
    M mlir/lib/EDSC/Builders.cpp
    M mlir/lib/EDSC/CoreAPIs.cpp
    M mlir/lib/EDSC/Helpers.cpp
    M mlir/lib/EDSC/Intrinsics.cpp
    M mlir/lib/ExecutionEngine/ExecutionEngine.cpp
    M mlir/lib/ExecutionEngine/OptUtils.cpp
    M mlir/lib/IR/AffineExpr.cpp
    M mlir/lib/IR/AffineExprDetail.h
    M mlir/lib/IR/AffineMap.cpp
    M mlir/lib/IR/AffineMapDetail.h
    M mlir/lib/IR/AsmPrinter.cpp
    M mlir/lib/IR/AttributeDetail.h
    M mlir/lib/IR/Attributes.cpp
    M mlir/lib/IR/Block.cpp
    M mlir/lib/IR/Builders.cpp
    M mlir/lib/IR/Diagnostics.cpp
    M mlir/lib/IR/Dialect.cpp
    M mlir/lib/IR/Function.cpp
    M mlir/lib/IR/FunctionImplementation.cpp
    M mlir/lib/IR/IntegerSet.cpp
    M mlir/lib/IR/IntegerSetDetail.h
    M mlir/lib/IR/Location.cpp
    M mlir/lib/IR/LocationDetail.h
    M mlir/lib/IR/MLIRContext.cpp
    M mlir/lib/IR/Module.cpp
    M mlir/lib/IR/Operation.cpp
    M mlir/lib/IR/OperationSupport.cpp
    M mlir/lib/IR/PatternMatch.cpp
    M mlir/lib/IR/Region.cpp
    M mlir/lib/IR/StandardTypes.cpp
    M mlir/lib/IR/SymbolTable.cpp
    M mlir/lib/IR/TypeDetail.h
    M mlir/lib/IR/TypeUtilities.cpp
    M mlir/lib/IR/Types.cpp
    M mlir/lib/IR/Value.cpp
    M mlir/lib/IR/Visitors.cpp
    M mlir/lib/Parser/Lexer.cpp
    M mlir/lib/Parser/Lexer.h
    M mlir/lib/Parser/Parser.cpp
    M mlir/lib/Parser/Token.cpp
    M mlir/lib/Parser/Token.h
    M mlir/lib/Parser/TokenKinds.def
    M mlir/lib/Pass/IRPrinting.cpp
    M mlir/lib/Pass/Pass.cpp
    M mlir/lib/Pass/PassDetail.h
    M mlir/lib/Pass/PassManagerOptions.cpp
    M mlir/lib/Pass/PassRegistry.cpp
    M mlir/lib/Pass/PassStatistics.cpp
    M mlir/lib/Pass/PassTiming.cpp
    M mlir/lib/Quantizer/Configurations/FxpMathConfig.cpp
    M mlir/lib/Quantizer/Support/Configuration.cpp
    M mlir/lib/Quantizer/Support/ConstraintAnalysisGraph.cpp
    M mlir/lib/Quantizer/Support/Metadata.cpp
    M mlir/lib/Quantizer/Support/Statistics.cpp
    M mlir/lib/Quantizer/Support/TypeUtils.cpp
    M mlir/lib/Quantizer/Support/UniformConstraints.cpp
    M mlir/lib/Quantizer/Support/UniformSolvers.cpp
    M mlir/lib/Quantizer/Transforms/AddDefaultStatsTestPass.cpp
    M mlir/lib/Quantizer/Transforms/InferQuantizedTypesPass.cpp
    M mlir/lib/Quantizer/Transforms/RemoveInstrumentationPass.cpp
    M mlir/lib/Support/FileUtilities.cpp
    M mlir/lib/Support/JitRunner.cpp
    M mlir/lib/Support/MlirOptMain.cpp
    M mlir/lib/Support/StorageUniquer.cpp
    M mlir/lib/Support/ToolUtilities.cpp
    M mlir/lib/Support/TranslateClParser.cpp
    M mlir/lib/TableGen/Argument.cpp
    M mlir/lib/TableGen/Attribute.cpp
    M mlir/lib/TableGen/Constraint.cpp
    M mlir/lib/TableGen/Dialect.cpp
    M mlir/lib/TableGen/Format.cpp
    M mlir/lib/TableGen/OpInterfaces.cpp
    M mlir/lib/TableGen/OpTrait.cpp
    M mlir/lib/TableGen/Operator.cpp
    M mlir/lib/TableGen/Pattern.cpp
    M mlir/lib/TableGen/Predicate.cpp
    M mlir/lib/TableGen/Type.cpp
    M mlir/lib/Target/LLVMIR/ConvertFromLLVMIR.cpp
    M mlir/lib/Target/LLVMIR/ConvertToLLVMIR.cpp
    M mlir/lib/Target/LLVMIR/ConvertToNVVMIR.cpp
    M mlir/lib/Target/LLVMIR/ConvertToROCDLIR.cpp
    M mlir/lib/Target/LLVMIR/ModuleTranslation.cpp
    M mlir/lib/Transforms/AffineDataCopyGeneration.cpp
    M mlir/lib/Transforms/AffineLoopInvariantCodeMotion.cpp
    M mlir/lib/Transforms/CSE.cpp
    M mlir/lib/Transforms/Canonicalizer.cpp
    M mlir/lib/Transforms/DialectConversion.cpp
    M mlir/lib/Transforms/Inliner.cpp
    M mlir/lib/Transforms/LoopCoalescing.cpp
    M mlir/lib/Transforms/LoopFusion.cpp
    M mlir/lib/Transforms/LoopInvariantCodeMotion.cpp
    M mlir/lib/Transforms/LoopTiling.cpp
    M mlir/lib/Transforms/LoopUnroll.cpp
    M mlir/lib/Transforms/LoopUnrollAndJam.cpp
    M mlir/lib/Transforms/MemRefDataFlowOpt.cpp
    M mlir/lib/Transforms/PipelineDataTransfer.cpp
    M mlir/lib/Transforms/SimplifyAffineStructures.cpp
    M mlir/lib/Transforms/StripDebugInfo.cpp
    M mlir/lib/Transforms/Utils/FoldUtils.cpp
    M mlir/lib/Transforms/Utils/GreedyPatternRewriteDriver.cpp
    M mlir/lib/Transforms/Utils/InliningUtils.cpp
    M mlir/lib/Transforms/Utils/LoopFusionUtils.cpp
    M mlir/lib/Transforms/Utils/LoopUtils.cpp
    M mlir/lib/Transforms/Utils/RegionUtils.cpp
    M mlir/lib/Transforms/Utils/Utils.cpp
    M mlir/lib/Transforms/Vectorize.cpp
    M mlir/lib/Transforms/ViewOpGraph.cpp
    M mlir/lib/Transforms/ViewRegionGraph.cpp
    M mlir/lib/Translation/Translation.cpp
    M mlir/test/APITest.h
    M mlir/test/EDSC/builder-api-test.cpp
    M mlir/test/SDBM/sdbm-api-test.cpp
    M mlir/test/lib/DeclarativeTransforms/TestLinalgTransformPatterns.td
    M mlir/test/lib/DeclarativeTransforms/TestVectorTransformPatterns.td
    M mlir/test/lib/IR/TestFunc.cpp
    M mlir/test/lib/IR/TestMatchers.cpp
    M mlir/test/lib/IR/TestSymbolUses.cpp
    M mlir/test/lib/Pass/TestPassManager.cpp
    M mlir/test/lib/TestDialect/TestDialect.cpp
    M mlir/test/lib/TestDialect/TestDialect.h
    M mlir/test/lib/TestDialect/TestOps.td
    M mlir/test/lib/TestDialect/TestPatterns.cpp
    M mlir/test/lib/Transforms/TestCallGraph.cpp
    M mlir/test/lib/Transforms/TestConstantFold.cpp
    M mlir/test/lib/Transforms/TestInlining.cpp
    M mlir/test/lib/Transforms/TestLinalgTransforms.cpp
    M mlir/test/lib/Transforms/TestLiveness.cpp
    M mlir/test/lib/Transforms/TestLoopFusion.cpp
    M mlir/test/lib/Transforms/TestLoopMapping.cpp
    M mlir/test/lib/Transforms/TestLoopParametricTiling.cpp
    M mlir/test/lib/Transforms/TestMemRefStrideCalculation.cpp
    M mlir/test/lib/Transforms/TestOpaqueLoc.cpp
    M mlir/test/lib/Transforms/TestVectorToLoopsConversion.cpp
    M mlir/test/lib/Transforms/TestVectorTransforms.cpp
    M mlir/test/lib/Transforms/TestVectorizationUtils.cpp
    M mlir/test/mlir-cpu-runner/cblas.cpp
    M mlir/test/mlir-cpu-runner/cblas_interface.cpp
    M mlir/test/mlir-cpu-runner/include/cblas.h
    M mlir/test/mlir-cpu-runner/include/mlir_runner_utils.h
    M mlir/test/mlir-cpu-runner/mlir_runner_utils.cpp
    M mlir/tools/mlir-cpu-runner/mlir-cpu-runner.cpp
    M mlir/tools/mlir-cuda-runner/cuda-runtime-wrappers.cpp
    M mlir/tools/mlir-cuda-runner/mlir-cuda-runner.cpp
    M mlir/tools/mlir-opt/mlir-opt.cpp
    M mlir/tools/mlir-tblgen/DocGenUtilities.h
    M mlir/tools/mlir-tblgen/EnumsGen.cpp
    M mlir/tools/mlir-tblgen/LLVMIRConversionGen.cpp
    M mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
    M mlir/tools/mlir-tblgen/OpDocGen.cpp
    M mlir/tools/mlir-tblgen/OpInterfacesGen.cpp
    M mlir/tools/mlir-tblgen/ReferenceImplGen.cpp
    M mlir/tools/mlir-tblgen/RewriterGen.cpp
    M mlir/tools/mlir-tblgen/SPIRVUtilsGen.cpp
    M mlir/tools/mlir-tblgen/StructsGen.cpp
    M mlir/tools/mlir-tblgen/mlir-tblgen.cpp
    M mlir/tools/mlir-translate/mlir-translate.cpp
    M mlir/unittests/ADT/TypeSwitchTest.cpp
    M mlir/unittests/Dialect/BroadcastShapeTest.cpp
    M mlir/unittests/Dialect/QuantOps/QuantizationUtilsTest.cpp
    M mlir/unittests/Dialect/SPIRV/DeserializationTest.cpp
    M mlir/unittests/Dialect/SPIRV/SerializationTest.cpp
    M mlir/unittests/IR/AttributeTest.cpp
    M mlir/unittests/IR/DialectTest.cpp
    M mlir/unittests/IR/OperationSupportTest.cpp
    M mlir/unittests/IR/StringExtrasTest.cpp
    M mlir/unittests/Pass/AnalysisManagerTest.cpp
    M mlir/unittests/Quantizer/Support/RulesTest.cpp
    M mlir/unittests/Quantizer/Support/UniformSolversTest.cpp
    M mlir/unittests/SDBM/SDBMTest.cpp
    M mlir/unittests/TableGen/EnumsGenTest.cpp
    M mlir/unittests/TableGen/FormatTest.cpp
    M mlir/unittests/TableGen/StructsGenTest.cpp
    M mlir/unittests/TableGen/enums.td
    M mlir/unittests/TableGen/structs.td
    M mlir/utils/generate-test-checks.py
    M mlir/utils/spirv/define_enum.sh
    M mlir/utils/spirv/define_inst.sh
    M mlir/utils/spirv/define_opcodes.sh
    M mlir/utils/spirv/gen_spirv_dialect.py

  Log Message:
  -----------
  Adjust License.txt file to use the LLVM license

PiperOrigin-RevId: 286906740


  Commit: f603a50109107b447b835dac11f0eb541288393e
      https://github.com/llvm/llvm-project/commit/f603a50109107b447b835dac11f0eb541288393e
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-12-23 (Mon, 23 Dec 2019)

  Changed paths:
    M mlir/bindings/python/pybind.cpp
    M mlir/include/mlir/Analysis/AffineAnalysis.h
    M mlir/include/mlir/Analysis/Liveness.h
    M mlir/include/mlir/Analysis/LoopAnalysis.h
    M mlir/include/mlir/Conversion/AffineToStandard/AffineToStandard.h
    M mlir/include/mlir/Conversion/LoopsToGPU/LoopsToGPU.h
    M mlir/include/mlir/Dialect/VectorOps/Utils.h
    M mlir/include/mlir/EDSC/Builders.h
    M mlir/include/mlir/IR/Block.h
    M mlir/include/mlir/IR/BlockAndValueMapping.h
    M mlir/include/mlir/IR/OpImplementation.h
    M mlir/include/mlir/IR/Operation.h
    M mlir/include/mlir/IR/OperationSupport.h
    M mlir/include/mlir/IR/TypeUtilities.h
    M mlir/include/mlir/IR/UseDefLists.h
    M mlir/include/mlir/IR/Value.h
    M mlir/lib/Analysis/AffineStructures.cpp
    M mlir/lib/Analysis/Dominance.cpp
    M mlir/lib/Analysis/Liveness.cpp
    M mlir/lib/Analysis/SliceAnalysis.cpp
    M mlir/lib/Dialect/AffineOps/AffineOps.cpp
    M mlir/lib/Dialect/Linalg/Analysis/DependenceAnalysis.cpp
    M mlir/lib/Dialect/LoopOps/LoopOps.cpp
    M mlir/lib/Dialect/SPIRV/Serialization/Serializer.cpp
    M mlir/lib/IR/AsmPrinter.cpp
    M mlir/lib/IR/Block.cpp
    M mlir/lib/IR/Operation.cpp
    M mlir/lib/IR/OperationSupport.cpp
    M mlir/lib/IR/TypeUtilities.cpp
    M mlir/lib/IR/Value.cpp

  Log Message:
  -----------
  ReImplement the Value classes as value-typed objects wrapping an internal pointer storage.

This will enable future commits to reimplement the internal implementation of OpResult without needing to change all of the existing users. This is part of a chain of commits optimizing the size of operation results.

PiperOrigin-RevId: 286919966


  Commit: 268365ab01dc7629b9c0bfeb71516478e40751fc
      https://github.com/llvm/llvm-project/commit/268365ab01dc7629b9c0bfeb71516478e40751fc
  Author: MLIR Team <no-reply at google.com>
  Date:   2019-12-23 (Mon, 23 Dec 2019)

  Changed paths:
    M mlir/bindings/python/pybind.cpp
    M mlir/include/mlir/Analysis/AffineAnalysis.h
    M mlir/include/mlir/Analysis/Liveness.h
    M mlir/include/mlir/Analysis/LoopAnalysis.h
    M mlir/include/mlir/Conversion/AffineToStandard/AffineToStandard.h
    M mlir/include/mlir/Conversion/LoopsToGPU/LoopsToGPU.h
    M mlir/include/mlir/Dialect/VectorOps/Utils.h
    M mlir/include/mlir/EDSC/Builders.h
    M mlir/include/mlir/IR/Block.h
    M mlir/include/mlir/IR/BlockAndValueMapping.h
    M mlir/include/mlir/IR/OpImplementation.h
    M mlir/include/mlir/IR/Operation.h
    M mlir/include/mlir/IR/OperationSupport.h
    M mlir/include/mlir/IR/TypeUtilities.h
    M mlir/include/mlir/IR/UseDefLists.h
    M mlir/include/mlir/IR/Value.h
    M mlir/lib/Analysis/AffineStructures.cpp
    M mlir/lib/Analysis/Dominance.cpp
    M mlir/lib/Analysis/Liveness.cpp
    M mlir/lib/Analysis/SliceAnalysis.cpp
    M mlir/lib/Dialect/AffineOps/AffineOps.cpp
    M mlir/lib/Dialect/Linalg/Analysis/DependenceAnalysis.cpp
    M mlir/lib/Dialect/LoopOps/LoopOps.cpp
    M mlir/lib/Dialect/SPIRV/Serialization/Serializer.cpp
    M mlir/lib/IR/AsmPrinter.cpp
    M mlir/lib/IR/Block.cpp
    M mlir/lib/IR/Operation.cpp
    M mlir/lib/IR/OperationSupport.cpp
    M mlir/lib/IR/TypeUtilities.cpp
    M mlir/lib/IR/Value.cpp

  Log Message:
  -----------
  Automated rollback of commit f603a50109107b447b835dac11f0eb541288393e

PiperOrigin-RevId: 286924059


  Commit: ab46543cebbd8845262a50291f296e453d110a14
      https://github.com/llvm/llvm-project/commit/ab46543cebbd8845262a50291f296e453d110a14
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-12-23 (Mon, 23 Dec 2019)

  Changed paths:
    M mlir/bindings/python/pybind.cpp
    M mlir/include/mlir/Analysis/AffineAnalysis.h
    M mlir/include/mlir/Analysis/Liveness.h
    M mlir/include/mlir/Analysis/LoopAnalysis.h
    M mlir/include/mlir/Conversion/AffineToStandard/AffineToStandard.h
    M mlir/include/mlir/Conversion/LoopsToGPU/LoopsToGPU.h
    M mlir/include/mlir/Dialect/VectorOps/Utils.h
    M mlir/include/mlir/EDSC/Builders.h
    M mlir/include/mlir/IR/Block.h
    M mlir/include/mlir/IR/BlockAndValueMapping.h
    M mlir/include/mlir/IR/OpImplementation.h
    M mlir/include/mlir/IR/Operation.h
    M mlir/include/mlir/IR/OperationSupport.h
    M mlir/include/mlir/IR/TypeUtilities.h
    M mlir/include/mlir/IR/UseDefLists.h
    M mlir/include/mlir/IR/Value.h
    M mlir/lib/Analysis/AffineStructures.cpp
    M mlir/lib/Analysis/Dominance.cpp
    M mlir/lib/Analysis/Liveness.cpp
    M mlir/lib/Analysis/SliceAnalysis.cpp
    M mlir/lib/Dialect/AffineOps/AffineOps.cpp
    M mlir/lib/Dialect/Linalg/Analysis/DependenceAnalysis.cpp
    M mlir/lib/Dialect/LoopOps/LoopOps.cpp
    M mlir/lib/Dialect/SPIRV/Serialization/Serializer.cpp
    M mlir/lib/IR/AsmPrinter.cpp
    M mlir/lib/IR/Block.cpp
    M mlir/lib/IR/Operation.cpp
    M mlir/lib/IR/OperationSupport.cpp
    M mlir/lib/IR/TypeUtilities.cpp
    M mlir/lib/IR/Value.cpp

  Log Message:
  -----------
  Resubmit: ReImplement the Value classes as value-typed objects wrapping an internal pointer storage.

This will enable future commits to reimplement the internal implementation of OpResult without needing to change all of the existing users. This is part of a chain of commits optimizing the size of operation results.

PiperOrigin-RevId: 286930047


  Commit: a5d5d2912506322b224eff0428de796a5ef7c1a4
      https://github.com/llvm/llvm-project/commit/a5d5d2912506322b224eff0428de796a5ef7c1a4
  Author: Lei Zhang <antiagainst at google.com>
  Date:   2019-12-23 (Mon, 23 Dec 2019)

  Changed paths:
    M mlir/g3doc/Dialects/SPIR-V.md
    M mlir/utils/spirv/define_inst.sh

  Log Message:
  -----------
  Update SPIR-V.md

This CL updates SPIR-V.md to reflect recent developments
in the SPIR-V dialect and its conversions.

Along the way, also updates the doc for define_inst.sh.

PiperOrigin-RevId: 286933546


  Commit: 5d5bd2e1da29d976cb125dbb3cd097a5e42b2be4
      https://github.com/llvm/llvm-project/commit/5d5bd2e1da29d976cb125dbb3cd097a5e42b2be4
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-12-23 (Mon, 23 Dec 2019)

  Changed paths:
    M mlir/include/mlir/IR/BlockSupport.h
    M mlir/include/mlir/IR/Operation.h
    M mlir/include/mlir/IR/PatternMatch.h
    M mlir/include/mlir/Transforms/DialectConversion.h
    M mlir/lib/Conversion/StandardToSPIRV/ConvertStandardToSPIRVPass.cpp
    M mlir/lib/Dialect/GPU/IR/GPUDialect.cpp
    M mlir/lib/Dialect/SPIRV/Transforms/LowerABIAttributesPass.cpp
    M mlir/lib/IR/Block.cpp
    M mlir/lib/IR/PatternMatch.cpp
    M mlir/lib/Transforms/DialectConversion.cpp

  Log Message:
  -----------
  Change the `notifyRootUpdated` API to be transaction based.

This means that in-place, or root, updates need to use explicit calls to `startRootUpdate`, `finalizeRootUpdate`, and `cancelRootUpdate`. The major benefit of this change is that it enables in-place updates in DialectConversion, which simplifies the FuncOp pattern for example. The major downside to this is that the cases that *may* modify an operation in-place will need an explicit cancel on the failure branches(assuming that they started an update before attempting the transformation).

PiperOrigin-RevId: 286933674


  Commit: e62a69561fb9d7b1013d2853da68d79a7907fead
      https://github.com/llvm/llvm-project/commit/e62a69561fb9d7b1013d2853da68d79a7907fead
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-12-23 (Mon, 23 Dec 2019)

  Changed paths:
    M mlir/bindings/python/pybind.cpp
    M mlir/examples/toy/Ch2/include/toy/Ops.td
    M mlir/examples/toy/Ch2/mlir/Dialect.cpp
    M mlir/examples/toy/Ch2/mlir/MLIRGen.cpp
    M mlir/examples/toy/Ch3/include/toy/Ops.td
    M mlir/examples/toy/Ch3/mlir/Dialect.cpp
    M mlir/examples/toy/Ch3/mlir/MLIRGen.cpp
    M mlir/examples/toy/Ch3/mlir/ToyCombine.cpp
    M mlir/examples/toy/Ch4/include/toy/Ops.td
    M mlir/examples/toy/Ch4/mlir/Dialect.cpp
    M mlir/examples/toy/Ch4/mlir/MLIRGen.cpp
    M mlir/examples/toy/Ch4/mlir/ToyCombine.cpp
    M mlir/examples/toy/Ch5/include/toy/Ops.td
    M mlir/examples/toy/Ch5/mlir/Dialect.cpp
    M mlir/examples/toy/Ch5/mlir/LowerToAffineLoops.cpp
    M mlir/examples/toy/Ch5/mlir/MLIRGen.cpp
    M mlir/examples/toy/Ch5/mlir/ToyCombine.cpp
    M mlir/examples/toy/Ch6/include/toy/Ops.td
    M mlir/examples/toy/Ch6/mlir/Dialect.cpp
    M mlir/examples/toy/Ch6/mlir/LowerToAffineLoops.cpp
    M mlir/examples/toy/Ch6/mlir/LowerToLLVM.cpp
    M mlir/examples/toy/Ch6/mlir/MLIRGen.cpp
    M mlir/examples/toy/Ch6/mlir/ToyCombine.cpp
    M mlir/examples/toy/Ch7/include/toy/Ops.td
    M mlir/examples/toy/Ch7/mlir/Dialect.cpp
    M mlir/examples/toy/Ch7/mlir/LowerToAffineLoops.cpp
    M mlir/examples/toy/Ch7/mlir/LowerToLLVM.cpp
    M mlir/examples/toy/Ch7/mlir/MLIRGen.cpp
    M mlir/examples/toy/Ch7/mlir/ToyCombine.cpp
    M mlir/g3doc/DeclarativeRewrites.md
    M mlir/g3doc/DialectConversion.md
    M mlir/g3doc/GenericDAGRewriter.md
    M mlir/g3doc/OpDefinitions.md
    M mlir/g3doc/Tutorials/Toy/Ch-3.md
    M mlir/g3doc/Tutorials/Toy/Ch-4.md
    M mlir/g3doc/Tutorials/Toy/Ch-5.md
    M mlir/g3doc/UsageOfConst.md
    M mlir/include/mlir/Analysis/AffineAnalysis.h
    M mlir/include/mlir/Analysis/AffineStructures.h
    M mlir/include/mlir/Analysis/CallInterfaces.h
    M mlir/include/mlir/Analysis/Dominance.h
    M mlir/include/mlir/Analysis/Liveness.h
    M mlir/include/mlir/Analysis/LoopAnalysis.h
    M mlir/include/mlir/Analysis/Utils.h
    M mlir/include/mlir/Conversion/AffineToStandard/AffineToStandard.h
    M mlir/include/mlir/Conversion/LoopsToGPU/LoopsToGPU.h
    M mlir/include/mlir/Conversion/StandardToLLVM/ConvertStandardToLLVM.h
    M mlir/include/mlir/Dialect/AffineOps/AffineOps.h
    M mlir/include/mlir/Dialect/AffineOps/AffineOps.td
    M mlir/include/mlir/Dialect/GPU/GPUDialect.h
    M mlir/include/mlir/Dialect/GPU/GPUOps.td
    M mlir/include/mlir/Dialect/LLVMIR/LLVMDialect.h
    M mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
    M mlir/include/mlir/Dialect/Linalg/Analysis/DependenceAnalysis.h
    M mlir/include/mlir/Dialect/Linalg/EDSC/Builders.h
    M mlir/include/mlir/Dialect/Linalg/IR/LinalgLibraryOps.td
    M mlir/include/mlir/Dialect/Linalg/IR/LinalgOps.td
    M mlir/include/mlir/Dialect/Linalg/IR/LinalgStructuredOps.td
    M mlir/include/mlir/Dialect/Linalg/IR/LinalgTraits.h
    M mlir/include/mlir/Dialect/Linalg/Transforms/LinalgTransformPatterns.td
    M mlir/include/mlir/Dialect/Linalg/Transforms/LinalgTransforms.h
    M mlir/include/mlir/Dialect/Linalg/Utils/Utils.h
    M mlir/include/mlir/Dialect/LoopOps/LoopOps.h
    M mlir/include/mlir/Dialect/LoopOps/LoopOps.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVCompositeOps.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVControlFlowOps.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVLogicalOps.td
    M mlir/include/mlir/Dialect/SPIRV/SPIRVLowering.h
    M mlir/include/mlir/Dialect/SPIRV/SPIRVOps.td
    M mlir/include/mlir/Dialect/StandardOps/Ops.h
    M mlir/include/mlir/Dialect/StandardOps/Ops.td
    M mlir/include/mlir/Dialect/VectorOps/Utils.h
    M mlir/include/mlir/Dialect/VectorOps/VectorOps.td
    M mlir/include/mlir/Dialect/VectorOps/VectorTransforms.h
    M mlir/include/mlir/EDSC/Builders.h
    M mlir/include/mlir/EDSC/Helpers.h
    M mlir/include/mlir/EDSC/Intrinsics.h
    M mlir/include/mlir/IR/Block.h
    M mlir/include/mlir/IR/Builders.h
    M mlir/include/mlir/IR/FunctionSupport.h
    M mlir/include/mlir/IR/Matchers.h
    M mlir/include/mlir/IR/OpDefinition.h
    M mlir/include/mlir/IR/OpImplementation.h
    M mlir/include/mlir/IR/Operation.h
    M mlir/include/mlir/IR/OperationSupport.h
    M mlir/include/mlir/IR/TypeUtilities.h
    M mlir/include/mlir/IR/Value.h
    M mlir/include/mlir/Quantizer/Support/ConstraintAnalysisGraph.h
    M mlir/include/mlir/Target/LLVMIR/ModuleTranslation.h
    M mlir/include/mlir/Transforms/DialectConversion.h
    M mlir/include/mlir/Transforms/FoldUtils.h
    M mlir/include/mlir/Transforms/InliningUtils.h
    M mlir/include/mlir/Transforms/LoopLikeInterface.td
    M mlir/include/mlir/Transforms/LoopUtils.h
    M mlir/include/mlir/Transforms/RegionUtils.h
    M mlir/include/mlir/Transforms/Utils.h
    M mlir/lib/Analysis/AffineAnalysis.cpp
    M mlir/lib/Analysis/AffineStructures.cpp
    M mlir/lib/Analysis/CallGraph.cpp
    M mlir/lib/Analysis/Dominance.cpp
    M mlir/lib/Analysis/Liveness.cpp
    M mlir/lib/Analysis/LoopAnalysis.cpp
    M mlir/lib/Analysis/Utils.cpp
    M mlir/lib/Analysis/VectorAnalysis.cpp
    M mlir/lib/Conversion/AffineToStandard/AffineToStandard.cpp
    M mlir/lib/Conversion/GPUCommon/IndexIntrinsicsOpLowering.h
    M mlir/lib/Conversion/GPUCommon/OpToFuncCallLowering.h
    M mlir/lib/Conversion/GPUToCUDA/ConvertLaunchFuncToCudaCalls.cpp
    M mlir/lib/Conversion/GPUToNVVM/LowerGpuOpsToNVVMOps.cpp
    M mlir/lib/Conversion/GPUToSPIRV/ConvertGPUToSPIRV.cpp
    M mlir/lib/Conversion/LinalgToLLVM/LinalgToLLVM.cpp
    M mlir/lib/Conversion/LoopToStandard/ConvertLoopToStandard.cpp
    M mlir/lib/Conversion/LoopsToGPU/LoopsToGPU.cpp
    M mlir/lib/Conversion/LoopsToGPU/LoopsToGPUPass.cpp
    M mlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp
    M mlir/lib/Conversion/StandardToSPIRV/ConvertStandardToSPIRV.cpp
    M mlir/lib/Conversion/StandardToSPIRV/ConvertStandardToSPIRVPass.cpp
    M mlir/lib/Conversion/StandardToSPIRV/LegalizeStandardForSPIRV.cpp
    M mlir/lib/Conversion/VectorToLLVM/ConvertVectorToLLVM.cpp
    M mlir/lib/Dialect/AffineOps/AffineOps.cpp
    M mlir/lib/Dialect/FxpMathOps/Transforms/LowerUniformRealMath.cpp
    M mlir/lib/Dialect/FxpMathOps/Transforms/UniformKernelUtils.h
    M mlir/lib/Dialect/GPU/IR/GPUDialect.cpp
    M mlir/lib/Dialect/GPU/Transforms/KernelOutlining.cpp
    M mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
    M mlir/lib/Dialect/Linalg/Analysis/DependenceAnalysis.cpp
    M mlir/lib/Dialect/Linalg/EDSC/Builders.cpp
    M mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
    M mlir/lib/Dialect/Linalg/Transforms/Fusion.cpp
    M mlir/lib/Dialect/Linalg/Transforms/LinalgToLoops.cpp
    M mlir/lib/Dialect/Linalg/Transforms/LinalgTransforms.cpp
    M mlir/lib/Dialect/Linalg/Transforms/Promotion.cpp
    M mlir/lib/Dialect/Linalg/Transforms/Tiling.cpp
    M mlir/lib/Dialect/Linalg/Utils/Utils.cpp
    M mlir/lib/Dialect/LoopOps/LoopOps.cpp
    M mlir/lib/Dialect/SPIRV/SPIRVDialect.cpp
    M mlir/lib/Dialect/SPIRV/SPIRVLowering.cpp
    M mlir/lib/Dialect/SPIRV/SPIRVOps.cpp
    M mlir/lib/Dialect/SPIRV/Serialization/Deserializer.cpp
    M mlir/lib/Dialect/SPIRV/Serialization/Serializer.cpp
    M mlir/lib/Dialect/SPIRV/Transforms/LowerABIAttributesPass.cpp
    M mlir/lib/Dialect/StandardOps/Ops.cpp
    M mlir/lib/Dialect/VectorOps/VectorOps.cpp
    M mlir/lib/Dialect/VectorOps/VectorTransforms.cpp
    M mlir/lib/EDSC/Builders.cpp
    M mlir/lib/EDSC/Helpers.cpp
    M mlir/lib/EDSC/Intrinsics.cpp
    M mlir/lib/IR/AsmPrinter.cpp
    M mlir/lib/IR/Block.cpp
    M mlir/lib/IR/Builders.cpp
    M mlir/lib/IR/Operation.cpp
    M mlir/lib/IR/Region.cpp
    M mlir/lib/IR/TypeUtilities.cpp
    M mlir/lib/Parser/Parser.cpp
    M mlir/lib/Pass/IRPrinting.cpp
    M mlir/lib/Quantizer/Support/ConstraintAnalysisGraph.cpp
    M mlir/lib/Quantizer/Transforms/InferQuantizedTypesPass.cpp
    M mlir/lib/TableGen/Pattern.cpp
    M mlir/lib/Target/LLVMIR/ConvertFromLLVMIR.cpp
    M mlir/lib/Target/LLVMIR/ModuleTranslation.cpp
    M mlir/lib/Transforms/AffineDataCopyGeneration.cpp
    M mlir/lib/Transforms/AffineLoopInvariantCodeMotion.cpp
    M mlir/lib/Transforms/DialectConversion.cpp
    M mlir/lib/Transforms/LoopFusion.cpp
    M mlir/lib/Transforms/LoopInvariantCodeMotion.cpp
    M mlir/lib/Transforms/LoopTiling.cpp
    M mlir/lib/Transforms/LoopUnrollAndJam.cpp
    M mlir/lib/Transforms/MemRefDataFlowOpt.cpp
    M mlir/lib/Transforms/PipelineDataTransfer.cpp
    M mlir/lib/Transforms/Utils/FoldUtils.cpp
    M mlir/lib/Transforms/Utils/GreedyPatternRewriteDriver.cpp
    M mlir/lib/Transforms/Utils/InliningUtils.cpp
    M mlir/lib/Transforms/Utils/LoopFusionUtils.cpp
    M mlir/lib/Transforms/Utils/LoopUtils.cpp
    M mlir/lib/Transforms/Utils/RegionUtils.cpp
    M mlir/lib/Transforms/Utils/Utils.cpp
    M mlir/lib/Transforms/Vectorize.cpp
    M mlir/test/EDSC/builder-api-test.cpp
    M mlir/test/lib/TestDialect/TestDialect.cpp
    M mlir/test/lib/TestDialect/TestOps.td
    M mlir/test/lib/TestDialect/TestPatterns.cpp
    M mlir/test/lib/Transforms/TestLoopMapping.cpp
    M mlir/test/lib/Transforms/TestVectorizationUtils.cpp
    M mlir/test/mlir-tblgen/op-attribute.td
    M mlir/test/mlir-tblgen/op-decl.td
    M mlir/test/mlir-tblgen/op-operand.td
    M mlir/test/mlir-tblgen/op-result.td
    M mlir/test/mlir-tblgen/predicate.td
    M mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
    M mlir/tools/mlir-tblgen/RewriterGen.cpp
    M mlir/tools/mlir-tblgen/SPIRVUtilsGen.cpp
    M mlir/unittests/IR/OperationSupportTest.cpp

  Log Message:
  -----------
  NFC: Replace ValuePtr with Value and remove it now that Value is value-typed.

ValuePtr was a temporary typedef during the transition to a value-typed Value.

PiperOrigin-RevId: 286945714


  Commit: 21610e6651682a21a7ea8b81d65fa7271447fa31
      https://github.com/llvm/llvm-project/commit/21610e6651682a21a7ea8b81d65fa7271447fa31
  Author: River Riddle <riverriddle at google.com>
  Date:   2019-12-23 (Mon, 23 Dec 2019)

  Changed paths:
    M mlir/g3doc/WritingAPass.md
    M mlir/include/mlir/Pass/Pass.h
    M mlir/include/mlir/Pass/PassOptions.h
    M mlir/include/mlir/Pass/PassRegistry.h
    M mlir/lib/Conversion/GPUToSPIRV/ConvertGPUToSPIRVPass.cpp
    M mlir/lib/Pass/Pass.cpp
    M mlir/lib/Pass/PassRegistry.cpp
    M mlir/test/Pass/pipeline-options-parsing.mlir
    M mlir/test/lib/Pass/TestPassManager.cpp
    M mlir/test/lib/Transforms/TestLoopParametricTiling.cpp

  Log Message:
  -----------
  Refactor the way that pass options are specified.

This change refactors pass options to be more similar to how statistics are modeled. More specifically, the options are specified directly on the pass instead of in a separate options class. (Note that the behavior and specification for pass pipelines remains the same.) This brings about several benefits:
* The specification of options is much simpler
* The round-trip format of a pass can be generated automatically
* This gives a somewhat deeper integration with "configuring" a pass, which we could potentially expose to users in the future.

PiperOrigin-RevId: 286953824


  Commit: ac6dce12e0307a81b519b6735d1f70e597815d1a
      https://github.com/llvm/llvm-project/commit/ac6dce12e0307a81b519b6735d1f70e597815d1a
  Author: Mehdi Amini <aminim at google.com>
  Date:   2019-12-23 (Mon, 23 Dec 2019)

  Changed paths:
    M mlir/CONTRIBUTING.md
    R mlir/bindings/python/pybind.cpp
    R mlir/bindings/python/test/test_py2and3.py

  Log Message:
  -----------
  Remove pybind11-based bindings

These bindings were added as an experiment, and never had a CMake configuration.
We will bring back python bindings after picking carefully our dependency and the kind
of layering we expect to expose for these bindings.

PiperOrigin-RevId: 286963717


  Commit: 5b4a01d4a63cb66ab981e52548f940813393bf42
      https://github.com/llvm/llvm-project/commit/5b4a01d4a63cb66ab981e52548f940813393bf42
  Author: Mehdi Amini <aminim at google.com>
  Date:   2019-12-24 (Tue, 24 Dec 2019)

  Changed paths:
    R mlir/CONTRIBUTING.md
    R mlir/LICENSE.TXT
    M mlir/README.md
    A mlir/docs/Canonicalization.md
    A mlir/docs/ConversionToLLVMDialect.md
    A mlir/docs/DeclarativeRewrites.md
    A mlir/docs/DefiningAttributesAndTypes.md
    A mlir/docs/DeveloperGuide.md
    A mlir/docs/Diagnostics.md
    A mlir/docs/DialectConversion.md
    A mlir/docs/Dialects/Affine.md
    A mlir/docs/Dialects/GPU.md
    A mlir/docs/Dialects/LLVM.md
    A mlir/docs/Dialects/Linalg.md
    A mlir/docs/Dialects/SPIR-V.md
    A mlir/docs/Dialects/Standard.md
    A mlir/docs/Dialects/Vector.md
    A mlir/docs/EDSC.md
    A mlir/docs/GenericDAGRewriter.md
    A mlir/docs/Glossary.md
    A mlir/docs/Interfaces.md
    A mlir/docs/LangRef.md
    A mlir/docs/MLIRForGraphAlgorithms.md
    A mlir/docs/OpDefinitions.md
    A mlir/docs/Passes.md
    A mlir/docs/Quantization.md
    A mlir/docs/QuickstartRewrites.md
    A mlir/docs/Rationale.md
    A mlir/docs/RationaleSimplifiedPolyhedralForm.md
    A mlir/docs/TestingGuide.md
    A mlir/docs/Traits.md
    A mlir/docs/Tutorials/Toy/Ch-1.md
    A mlir/docs/Tutorials/Toy/Ch-2.md
    A mlir/docs/Tutorials/Toy/Ch-3.md
    A mlir/docs/Tutorials/Toy/Ch-4.md
    A mlir/docs/Tutorials/Toy/Ch-5.md
    A mlir/docs/Tutorials/Toy/Ch-6.md
    A mlir/docs/Tutorials/Toy/Ch-7.md
    A mlir/docs/UsageOfConst.md
    A mlir/docs/WritingAPass.md
    A mlir/docs/includes/img/index-map.svg
    A mlir/docs/includes/img/view-operation.svg
    R mlir/g3doc/Canonicalization.md
    R mlir/g3doc/ConversionToLLVMDialect.md
    R mlir/g3doc/DeclarativeRewrites.md
    R mlir/g3doc/DefiningAttributesAndTypes.md
    R mlir/g3doc/DeveloperGuide.md
    R mlir/g3doc/Diagnostics.md
    R mlir/g3doc/DialectConversion.md
    R mlir/g3doc/Dialects/Affine.md
    R mlir/g3doc/Dialects/GPU.md
    R mlir/g3doc/Dialects/LLVM.md
    R mlir/g3doc/Dialects/Linalg.md
    R mlir/g3doc/Dialects/SPIR-V.md
    R mlir/g3doc/Dialects/Standard.md
    R mlir/g3doc/Dialects/Vector.md
    R mlir/g3doc/EDSC.md
    R mlir/g3doc/GenericDAGRewriter.md
    R mlir/g3doc/Glossary.md
    R mlir/g3doc/Interfaces.md
    R mlir/g3doc/LangRef.md
    R mlir/g3doc/MLIRForGraphAlgorithms.md
    R mlir/g3doc/OpDefinitions.md
    R mlir/g3doc/Passes.md
    R mlir/g3doc/Quantization.md
    R mlir/g3doc/QuickstartRewrites.md
    R mlir/g3doc/Rationale.md
    R mlir/g3doc/RationaleSimplifiedPolyhedralForm.md
    R mlir/g3doc/TestingGuide.md
    R mlir/g3doc/Traits.md
    R mlir/g3doc/Tutorials/Toy/Ch-1.md
    R mlir/g3doc/Tutorials/Toy/Ch-2.md
    R mlir/g3doc/Tutorials/Toy/Ch-3.md
    R mlir/g3doc/Tutorials/Toy/Ch-4.md
    R mlir/g3doc/Tutorials/Toy/Ch-5.md
    R mlir/g3doc/Tutorials/Toy/Ch-6.md
    R mlir/g3doc/Tutorials/Toy/Ch-7.md
    R mlir/g3doc/UsageOfConst.md
    R mlir/g3doc/WritingAPass.md
    R mlir/g3doc/includes/img/index-map.svg
    R mlir/g3doc/includes/img/view-operation.svg

  Log Message:
  -----------
  Adjust some MLIR paths and docs


  Commit: 0f0d0ed1c78f1a80139a1f2133fad5284691a121
      https://github.com/llvm/llvm-project/commit/0f0d0ed1c78f1a80139a1f2133fad5284691a121
  Author: Mehdi Amini <aminim at google.com>
  Date:   2019-12-24 (Tue, 24 Dec 2019)

  Changed paths:
    A mlir/.clang-format
    A mlir/CMakeLists.txt
    A mlir/README.md
    A mlir/docs/Canonicalization.md
    A mlir/docs/ConversionToLLVMDialect.md
    A mlir/docs/DeclarativeRewrites.md
    A mlir/docs/DefiningAttributesAndTypes.md
    A mlir/docs/DeveloperGuide.md
    A mlir/docs/Diagnostics.md
    A mlir/docs/DialectConversion.md
    A mlir/docs/Dialects/Affine.md
    A mlir/docs/Dialects/GPU.md
    A mlir/docs/Dialects/LLVM.md
    A mlir/docs/Dialects/Linalg.md
    A mlir/docs/Dialects/SPIR-V.md
    A mlir/docs/Dialects/Standard.md
    A mlir/docs/Dialects/Vector.md
    A mlir/docs/EDSC.md
    A mlir/docs/GenericDAGRewriter.md
    A mlir/docs/Glossary.md
    A mlir/docs/Interfaces.md
    A mlir/docs/LangRef.md
    A mlir/docs/MLIRForGraphAlgorithms.md
    A mlir/docs/OpDefinitions.md
    A mlir/docs/Passes.md
    A mlir/docs/Quantization.md
    A mlir/docs/QuickstartRewrites.md
    A mlir/docs/Rationale.md
    A mlir/docs/RationaleSimplifiedPolyhedralForm.md
    A mlir/docs/TestingGuide.md
    A mlir/docs/Traits.md
    A mlir/docs/Tutorials/Toy/Ch-1.md
    A mlir/docs/Tutorials/Toy/Ch-2.md
    A mlir/docs/Tutorials/Toy/Ch-3.md
    A mlir/docs/Tutorials/Toy/Ch-4.md
    A mlir/docs/Tutorials/Toy/Ch-5.md
    A mlir/docs/Tutorials/Toy/Ch-6.md
    A mlir/docs/Tutorials/Toy/Ch-7.md
    A mlir/docs/UsageOfConst.md
    A mlir/docs/WritingAPass.md
    A mlir/docs/includes/img/index-map.svg
    A mlir/docs/includes/img/view-operation.svg
    A mlir/examples/CMakeLists.txt
    A mlir/examples/toy/CMakeLists.txt
    A mlir/examples/toy/Ch1/CMakeLists.txt
    A mlir/examples/toy/Ch1/include/toy/AST.h
    A mlir/examples/toy/Ch1/include/toy/Lexer.h
    A mlir/examples/toy/Ch1/include/toy/Parser.h
    A mlir/examples/toy/Ch1/parser/AST.cpp
    A mlir/examples/toy/Ch1/toyc.cpp
    A mlir/examples/toy/Ch2/CMakeLists.txt
    A mlir/examples/toy/Ch2/include/CMakeLists.txt
    A mlir/examples/toy/Ch2/include/toy/AST.h
    A mlir/examples/toy/Ch2/include/toy/CMakeLists.txt
    A mlir/examples/toy/Ch2/include/toy/Dialect.h
    A mlir/examples/toy/Ch2/include/toy/Lexer.h
    A mlir/examples/toy/Ch2/include/toy/MLIRGen.h
    A mlir/examples/toy/Ch2/include/toy/Ops.td
    A mlir/examples/toy/Ch2/include/toy/Parser.h
    A mlir/examples/toy/Ch2/mlir/Dialect.cpp
    A mlir/examples/toy/Ch2/mlir/MLIRGen.cpp
    A mlir/examples/toy/Ch2/parser/AST.cpp
    A mlir/examples/toy/Ch2/toyc.cpp
    A mlir/examples/toy/Ch3/CMakeLists.txt
    A mlir/examples/toy/Ch3/include/CMakeLists.txt
    A mlir/examples/toy/Ch3/include/toy/AST.h
    A mlir/examples/toy/Ch3/include/toy/CMakeLists.txt
    A mlir/examples/toy/Ch3/include/toy/Dialect.h
    A mlir/examples/toy/Ch3/include/toy/Lexer.h
    A mlir/examples/toy/Ch3/include/toy/MLIRGen.h
    A mlir/examples/toy/Ch3/include/toy/Ops.td
    A mlir/examples/toy/Ch3/include/toy/Parser.h
    A mlir/examples/toy/Ch3/mlir/Dialect.cpp
    A mlir/examples/toy/Ch3/mlir/MLIRGen.cpp
    A mlir/examples/toy/Ch3/mlir/ToyCombine.cpp
    A mlir/examples/toy/Ch3/mlir/ToyCombine.td
    A mlir/examples/toy/Ch3/parser/AST.cpp
    A mlir/examples/toy/Ch3/toyc.cpp
    A mlir/examples/toy/Ch4/CMakeLists.txt
    A mlir/examples/toy/Ch4/include/CMakeLists.txt
    A mlir/examples/toy/Ch4/include/toy/AST.h
    A mlir/examples/toy/Ch4/include/toy/CMakeLists.txt
    A mlir/examples/toy/Ch4/include/toy/Dialect.h
    A mlir/examples/toy/Ch4/include/toy/Lexer.h
    A mlir/examples/toy/Ch4/include/toy/MLIRGen.h
    A mlir/examples/toy/Ch4/include/toy/Ops.td
    A mlir/examples/toy/Ch4/include/toy/Parser.h
    A mlir/examples/toy/Ch4/include/toy/Passes.h
    A mlir/examples/toy/Ch4/include/toy/ShapeInferenceInterface.h
    A mlir/examples/toy/Ch4/include/toy/ShapeInferenceInterface.td
    A mlir/examples/toy/Ch4/mlir/DeadFunctionEliminationPass.cpp
    A mlir/examples/toy/Ch4/mlir/Dialect.cpp
    A mlir/examples/toy/Ch4/mlir/MLIRGen.cpp
    A mlir/examples/toy/Ch4/mlir/ShapeInferencePass.cpp
    A mlir/examples/toy/Ch4/mlir/ToyCombine.cpp
    A mlir/examples/toy/Ch4/mlir/ToyCombine.td
    A mlir/examples/toy/Ch4/parser/AST.cpp
    A mlir/examples/toy/Ch4/toyc.cpp
    A mlir/examples/toy/Ch5/CMakeLists.txt
    A mlir/examples/toy/Ch5/include/CMakeLists.txt
    A mlir/examples/toy/Ch5/include/toy/AST.h
    A mlir/examples/toy/Ch5/include/toy/CMakeLists.txt
    A mlir/examples/toy/Ch5/include/toy/Dialect.h
    A mlir/examples/toy/Ch5/include/toy/Lexer.h
    A mlir/examples/toy/Ch5/include/toy/MLIRGen.h
    A mlir/examples/toy/Ch5/include/toy/Ops.td
    A mlir/examples/toy/Ch5/include/toy/Parser.h
    A mlir/examples/toy/Ch5/include/toy/Passes.h
    A mlir/examples/toy/Ch5/include/toy/ShapeInferenceInterface.h
    A mlir/examples/toy/Ch5/include/toy/ShapeInferenceInterface.td
    A mlir/examples/toy/Ch5/mlir/DeadFunctionEliminationPass.cpp
    A mlir/examples/toy/Ch5/mlir/Dialect.cpp
    A mlir/examples/toy/Ch5/mlir/LowerToAffineLoops.cpp
    A mlir/examples/toy/Ch5/mlir/MLIRGen.cpp
    A mlir/examples/toy/Ch5/mlir/ShapeInferencePass.cpp
    A mlir/examples/toy/Ch5/mlir/ToyCombine.cpp
    A mlir/examples/toy/Ch5/mlir/ToyCombine.td
    A mlir/examples/toy/Ch5/parser/AST.cpp
    A mlir/examples/toy/Ch5/toyc.cpp
    A mlir/examples/toy/Ch6/CMakeLists.txt
    A mlir/examples/toy/Ch6/include/CMakeLists.txt
    A mlir/examples/toy/Ch6/include/toy/AST.h
    A mlir/examples/toy/Ch6/include/toy/CMakeLists.txt
    A mlir/examples/toy/Ch6/include/toy/Dialect.h
    A mlir/examples/toy/Ch6/include/toy/Lexer.h
    A mlir/examples/toy/Ch6/include/toy/MLIRGen.h
    A mlir/examples/toy/Ch6/include/toy/Ops.td
    A mlir/examples/toy/Ch6/include/toy/Parser.h
    A mlir/examples/toy/Ch6/include/toy/Passes.h
    A mlir/examples/toy/Ch6/include/toy/ShapeInferenceInterface.h
    A mlir/examples/toy/Ch6/include/toy/ShapeInferenceInterface.td
    A mlir/examples/toy/Ch6/mlir/DeadFunctionEliminationPass.cpp
    A mlir/examples/toy/Ch6/mlir/Dialect.cpp
    A mlir/examples/toy/Ch6/mlir/LowerToAffineLoops.cpp
    A mlir/examples/toy/Ch6/mlir/LowerToLLVM.cpp
    A mlir/examples/toy/Ch6/mlir/MLIRGen.cpp
    A mlir/examples/toy/Ch6/mlir/ShapeInferencePass.cpp
    A mlir/examples/toy/Ch6/mlir/ToyCombine.cpp
    A mlir/examples/toy/Ch6/mlir/ToyCombine.td
    A mlir/examples/toy/Ch6/parser/AST.cpp
    A mlir/examples/toy/Ch6/toyc.cpp
    A mlir/examples/toy/Ch7/CMakeLists.txt
    A mlir/examples/toy/Ch7/include/CMakeLists.txt
    A mlir/examples/toy/Ch7/include/toy/AST.h
    A mlir/examples/toy/Ch7/include/toy/CMakeLists.txt
    A mlir/examples/toy/Ch7/include/toy/Dialect.h
    A mlir/examples/toy/Ch7/include/toy/Lexer.h
    A mlir/examples/toy/Ch7/include/toy/MLIRGen.h
    A mlir/examples/toy/Ch7/include/toy/Ops.td
    A mlir/examples/toy/Ch7/include/toy/Parser.h
    A mlir/examples/toy/Ch7/include/toy/Passes.h
    A mlir/examples/toy/Ch7/include/toy/ShapeInferenceInterface.h
    A mlir/examples/toy/Ch7/include/toy/ShapeInferenceInterface.td
    A mlir/examples/toy/Ch7/mlir/DeadFunctionEliminationPass.cpp
    A mlir/examples/toy/Ch7/mlir/Dialect.cpp
    A mlir/examples/toy/Ch7/mlir/LowerToAffineLoops.cpp
    A mlir/examples/toy/Ch7/mlir/LowerToLLVM.cpp
    A mlir/examples/toy/Ch7/mlir/MLIRGen.cpp
    A mlir/examples/toy/Ch7/mlir/ShapeInferencePass.cpp
    A mlir/examples/toy/Ch7/mlir/ToyCombine.cpp
    A mlir/examples/toy/Ch7/mlir/ToyCombine.td
    A mlir/examples/toy/Ch7/parser/AST.cpp
    A mlir/examples/toy/Ch7/toyc.cpp
    A mlir/examples/toy/README.md
    A mlir/include/mlir-c/Core.h
    A mlir/include/mlir/ADT/TypeSwitch.h
    A mlir/include/mlir/Analysis/AffineAnalysis.h
    A mlir/include/mlir/Analysis/AffineStructures.h
    A mlir/include/mlir/Analysis/CMakeLists.txt
    A mlir/include/mlir/Analysis/CallGraph.h
    A mlir/include/mlir/Analysis/CallInterfaces.h
    A mlir/include/mlir/Analysis/CallInterfaces.td
    A mlir/include/mlir/Analysis/Dominance.h
    A mlir/include/mlir/Analysis/InferTypeOpInterface.h
    A mlir/include/mlir/Analysis/InferTypeOpInterface.td
    A mlir/include/mlir/Analysis/Liveness.h
    A mlir/include/mlir/Analysis/LoopAnalysis.h
    A mlir/include/mlir/Analysis/NestedMatcher.h
    A mlir/include/mlir/Analysis/Passes.h
    A mlir/include/mlir/Analysis/SliceAnalysis.h
    A mlir/include/mlir/Analysis/Utils.h
    A mlir/include/mlir/Analysis/Verifier.h
    A mlir/include/mlir/CMakeLists.txt
    A mlir/include/mlir/Conversion/AffineToStandard/AffineToStandard.h
    A mlir/include/mlir/Conversion/GPUToCUDA/GPUToCUDAPass.h
    A mlir/include/mlir/Conversion/GPUToNVVM/GPUToNVVMPass.h
    A mlir/include/mlir/Conversion/GPUToROCDL/GPUToROCDLPass.h
    A mlir/include/mlir/Conversion/GPUToSPIRV/ConvertGPUToSPIRV.h
    A mlir/include/mlir/Conversion/GPUToSPIRV/ConvertGPUToSPIRVPass.h
    A mlir/include/mlir/Conversion/LinalgToLLVM/LinalgToLLVM.h
    A mlir/include/mlir/Conversion/LoopToStandard/ConvertLoopToStandard.h
    A mlir/include/mlir/Conversion/LoopsToGPU/LoopsToGPU.h
    A mlir/include/mlir/Conversion/LoopsToGPU/LoopsToGPUPass.h
    A mlir/include/mlir/Conversion/StandardToLLVM/ConvertStandardToLLVM.h
    A mlir/include/mlir/Conversion/StandardToLLVM/ConvertStandardToLLVMPass.h
    A mlir/include/mlir/Conversion/StandardToSPIRV/ConvertStandardToSPIRV.h
    A mlir/include/mlir/Conversion/StandardToSPIRV/ConvertStandardToSPIRVPass.h
    A mlir/include/mlir/Conversion/VectorToLLVM/ConvertVectorToLLVM.h
    A mlir/include/mlir/Conversion/VectorToLoops/ConvertVectorToLoops.h
    A mlir/include/mlir/Dialect/AffineOps/AffineOps.h
    A mlir/include/mlir/Dialect/AffineOps/AffineOps.td
    A mlir/include/mlir/Dialect/AffineOps/AffineOpsBase.td
    A mlir/include/mlir/Dialect/AffineOps/CMakeLists.txt
    A mlir/include/mlir/Dialect/CMakeLists.txt
    A mlir/include/mlir/Dialect/CommonFolders.h
    A mlir/include/mlir/Dialect/FxpMathOps/CMakeLists.txt
    A mlir/include/mlir/Dialect/FxpMathOps/FxpMathOps.h
    A mlir/include/mlir/Dialect/FxpMathOps/FxpMathOps.td
    A mlir/include/mlir/Dialect/FxpMathOps/Passes.h
    A mlir/include/mlir/Dialect/GPU/CMakeLists.txt
    A mlir/include/mlir/Dialect/GPU/GPUDialect.h
    A mlir/include/mlir/Dialect/GPU/GPUOps.td
    A mlir/include/mlir/Dialect/GPU/Passes.h
    A mlir/include/mlir/Dialect/LLVMIR/CMakeLists.txt
    A mlir/include/mlir/Dialect/LLVMIR/LLVMDialect.h
    A mlir/include/mlir/Dialect/LLVMIR/LLVMOpBase.td
    A mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
    A mlir/include/mlir/Dialect/LLVMIR/NVVMDialect.h
    A mlir/include/mlir/Dialect/LLVMIR/NVVMOps.td
    A mlir/include/mlir/Dialect/LLVMIR/ROCDLDialect.h
    A mlir/include/mlir/Dialect/LLVMIR/ROCDLOps.td
    A mlir/include/mlir/Dialect/Linalg/Analysis/DependenceAnalysis.h
    A mlir/include/mlir/Dialect/Linalg/CMakeLists.txt
    A mlir/include/mlir/Dialect/Linalg/EDSC/Builders.h
    A mlir/include/mlir/Dialect/Linalg/EDSC/Intrinsics.h
    A mlir/include/mlir/Dialect/Linalg/IR/CMakeLists.txt
    A mlir/include/mlir/Dialect/Linalg/IR/LinalgBase.td
    A mlir/include/mlir/Dialect/Linalg/IR/LinalgDoc.td
    A mlir/include/mlir/Dialect/Linalg/IR/LinalgLibraryOps.td
    A mlir/include/mlir/Dialect/Linalg/IR/LinalgOps.h
    A mlir/include/mlir/Dialect/Linalg/IR/LinalgOps.td
    A mlir/include/mlir/Dialect/Linalg/IR/LinalgStructuredOps.td
    A mlir/include/mlir/Dialect/Linalg/IR/LinalgTraits.h
    A mlir/include/mlir/Dialect/Linalg/IR/LinalgTypes.h
    A mlir/include/mlir/Dialect/Linalg/Passes.h
    A mlir/include/mlir/Dialect/Linalg/Transforms/CMakeLists.txt
    A mlir/include/mlir/Dialect/Linalg/Transforms/LinalgTransformPatterns.td
    A mlir/include/mlir/Dialect/Linalg/Transforms/LinalgTransforms.h
    A mlir/include/mlir/Dialect/Linalg/Utils/Intrinsics.h
    A mlir/include/mlir/Dialect/Linalg/Utils/Utils.h
    A mlir/include/mlir/Dialect/LoopOps/CMakeLists.txt
    A mlir/include/mlir/Dialect/LoopOps/LoopOps.h
    A mlir/include/mlir/Dialect/LoopOps/LoopOps.td
    A mlir/include/mlir/Dialect/QuantOps/CMakeLists.txt
    A mlir/include/mlir/Dialect/QuantOps/FakeQuantSupport.h
    A mlir/include/mlir/Dialect/QuantOps/Passes.h
    A mlir/include/mlir/Dialect/QuantOps/QuantOps.h
    A mlir/include/mlir/Dialect/QuantOps/QuantOps.td
    A mlir/include/mlir/Dialect/QuantOps/QuantPredicates.td
    A mlir/include/mlir/Dialect/QuantOps/QuantTypes.h
    A mlir/include/mlir/Dialect/QuantOps/QuantizeUtils.h
    A mlir/include/mlir/Dialect/QuantOps/UniformSupport.h
    A mlir/include/mlir/Dialect/SDBM/SDBM.h
    A mlir/include/mlir/Dialect/SDBM/SDBMDialect.h
    A mlir/include/mlir/Dialect/SDBM/SDBMExpr.h
    A mlir/include/mlir/Dialect/SPIRV/CMakeLists.txt
    A mlir/include/mlir/Dialect/SPIRV/LayoutUtils.h
    A mlir/include/mlir/Dialect/SPIRV/Passes.h
    A mlir/include/mlir/Dialect/SPIRV/SPIRVArithmeticOps.td
    A mlir/include/mlir/Dialect/SPIRV/SPIRVAtomicOps.td
    A mlir/include/mlir/Dialect/SPIRV/SPIRVBase.td
    A mlir/include/mlir/Dialect/SPIRV/SPIRVBinaryUtils.h
    A mlir/include/mlir/Dialect/SPIRV/SPIRVBitOps.td
    A mlir/include/mlir/Dialect/SPIRV/SPIRVCastOps.td
    A mlir/include/mlir/Dialect/SPIRV/SPIRVCompositeOps.td
    A mlir/include/mlir/Dialect/SPIRV/SPIRVControlFlowOps.td
    A mlir/include/mlir/Dialect/SPIRV/SPIRVDialect.h
    A mlir/include/mlir/Dialect/SPIRV/SPIRVGLSLOps.td
    A mlir/include/mlir/Dialect/SPIRV/SPIRVGroupOps.td
    A mlir/include/mlir/Dialect/SPIRV/SPIRVLogicalOps.td
    A mlir/include/mlir/Dialect/SPIRV/SPIRVLowering.h
    A mlir/include/mlir/Dialect/SPIRV/SPIRVLowering.td
    A mlir/include/mlir/Dialect/SPIRV/SPIRVNonUniformOps.td
    A mlir/include/mlir/Dialect/SPIRV/SPIRVOps.h
    A mlir/include/mlir/Dialect/SPIRV/SPIRVOps.td
    A mlir/include/mlir/Dialect/SPIRV/SPIRVStructureOps.td
    A mlir/include/mlir/Dialect/SPIRV/SPIRVTypes.h
    A mlir/include/mlir/Dialect/SPIRV/Serialization.h
    A mlir/include/mlir/Dialect/StandardOps/CMakeLists.txt
    A mlir/include/mlir/Dialect/StandardOps/Ops.h
    A mlir/include/mlir/Dialect/StandardOps/Ops.td
    A mlir/include/mlir/Dialect/Traits.h
    A mlir/include/mlir/Dialect/Utils/StructuredOpsUtils.h
    A mlir/include/mlir/Dialect/VectorOps/CMakeLists.txt
    A mlir/include/mlir/Dialect/VectorOps/Utils.h
    A mlir/include/mlir/Dialect/VectorOps/VectorOps.h
    A mlir/include/mlir/Dialect/VectorOps/VectorOps.td
    A mlir/include/mlir/Dialect/VectorOps/VectorTransformPatterns.td
    A mlir/include/mlir/Dialect/VectorOps/VectorTransforms.h
    A mlir/include/mlir/EDSC/Builders.h
    A mlir/include/mlir/EDSC/Helpers.h
    A mlir/include/mlir/EDSC/Intrinsics.h
    A mlir/include/mlir/ExecutionEngine/ExecutionEngine.h
    A mlir/include/mlir/ExecutionEngine/OptUtils.h
    A mlir/include/mlir/IR/AffineExpr.h
    A mlir/include/mlir/IR/AffineExprVisitor.h
    A mlir/include/mlir/IR/AffineMap.h
    A mlir/include/mlir/IR/AttributeSupport.h
    A mlir/include/mlir/IR/Attributes.h
    A mlir/include/mlir/IR/Block.h
    A mlir/include/mlir/IR/BlockAndValueMapping.h
    A mlir/include/mlir/IR/BlockSupport.h
    A mlir/include/mlir/IR/Builders.h
    A mlir/include/mlir/IR/CMakeLists.txt
    A mlir/include/mlir/IR/Diagnostics.h
    A mlir/include/mlir/IR/Dialect.h
    A mlir/include/mlir/IR/DialectHooks.h
    A mlir/include/mlir/IR/DialectImplementation.h
    A mlir/include/mlir/IR/DialectInterface.h
    A mlir/include/mlir/IR/DialectSymbolRegistry.def
    A mlir/include/mlir/IR/Function.h
    A mlir/include/mlir/IR/FunctionImplementation.h
    A mlir/include/mlir/IR/FunctionSupport.h
    A mlir/include/mlir/IR/Identifier.h
    A mlir/include/mlir/IR/IntegerSet.h
    A mlir/include/mlir/IR/Location.h
    A mlir/include/mlir/IR/MLIRContext.h
    A mlir/include/mlir/IR/Matchers.h
    A mlir/include/mlir/IR/Module.h
    A mlir/include/mlir/IR/OpAsmInterface.td
    A mlir/include/mlir/IR/OpBase.td
    A mlir/include/mlir/IR/OpDefinition.h
    A mlir/include/mlir/IR/OpImplementation.h
    A mlir/include/mlir/IR/Operation.h
    A mlir/include/mlir/IR/OperationSupport.h
    A mlir/include/mlir/IR/PatternMatch.h
    A mlir/include/mlir/IR/Region.h
    A mlir/include/mlir/IR/RegionGraphTraits.h
    A mlir/include/mlir/IR/StandardTypes.h
    A mlir/include/mlir/IR/StorageUniquerSupport.h
    A mlir/include/mlir/IR/SymbolTable.h
    A mlir/include/mlir/IR/TypeSupport.h
    A mlir/include/mlir/IR/TypeUtilities.h
    A mlir/include/mlir/IR/Types.h
    A mlir/include/mlir/IR/UseDefLists.h
    A mlir/include/mlir/IR/Value.h
    A mlir/include/mlir/IR/Visitors.h
    A mlir/include/mlir/Parser.h
    A mlir/include/mlir/Pass/AnalysisManager.h
    A mlir/include/mlir/Pass/Pass.h
    A mlir/include/mlir/Pass/PassInstrumentation.h
    A mlir/include/mlir/Pass/PassManager.h
    A mlir/include/mlir/Pass/PassOptions.h
    A mlir/include/mlir/Pass/PassRegistry.h
    A mlir/include/mlir/Quantizer/Configurations/FxpMathConfig.h
    A mlir/include/mlir/Quantizer/Support/Configuration.h
    A mlir/include/mlir/Quantizer/Support/ConstraintAnalysisGraph.h
    A mlir/include/mlir/Quantizer/Support/ConstraintAnalysisGraphTraits.h
    A mlir/include/mlir/Quantizer/Support/Metadata.h
    A mlir/include/mlir/Quantizer/Support/Rules.h
    A mlir/include/mlir/Quantizer/Support/Statistics.h
    A mlir/include/mlir/Quantizer/Support/TypeUtils.h
    A mlir/include/mlir/Quantizer/Support/UniformConstraints.h
    A mlir/include/mlir/Quantizer/Support/UniformSolvers.h
    A mlir/include/mlir/Quantizer/Transforms/Passes.h
    A mlir/include/mlir/Support/DebugStringHelper.h
    A mlir/include/mlir/Support/FileUtilities.h
    A mlir/include/mlir/Support/Functional.h
    A mlir/include/mlir/Support/JitRunner.h
    A mlir/include/mlir/Support/LLVM.h
    A mlir/include/mlir/Support/LogicalResult.h
    A mlir/include/mlir/Support/MathExtras.h
    A mlir/include/mlir/Support/MlirOptMain.h
    A mlir/include/mlir/Support/STLExtras.h
    A mlir/include/mlir/Support/StorageUniquer.h
    A mlir/include/mlir/Support/StringExtras.h
    A mlir/include/mlir/Support/ToolUtilities.h
    A mlir/include/mlir/Support/TranslateClParser.h
    A mlir/include/mlir/TableGen/Argument.h
    A mlir/include/mlir/TableGen/Attribute.h
    A mlir/include/mlir/TableGen/Constraint.h
    A mlir/include/mlir/TableGen/Dialect.h
    A mlir/include/mlir/TableGen/Format.h
    A mlir/include/mlir/TableGen/GenInfo.h
    A mlir/include/mlir/TableGen/GenNameParser.h
    A mlir/include/mlir/TableGen/OpInterfaces.h
    A mlir/include/mlir/TableGen/OpTrait.h
    A mlir/include/mlir/TableGen/Operator.h
    A mlir/include/mlir/TableGen/Pattern.h
    A mlir/include/mlir/TableGen/Predicate.h
    A mlir/include/mlir/TableGen/Region.h
    A mlir/include/mlir/TableGen/Type.h
    A mlir/include/mlir/Target/LLVMIR.h
    A mlir/include/mlir/Target/LLVMIR/ModuleTranslation.h
    A mlir/include/mlir/Target/NVVMIR.h
    A mlir/include/mlir/Target/ROCDLIR.h
    A mlir/include/mlir/Transforms/CMakeLists.txt
    A mlir/include/mlir/Transforms/DialectConversion.h
    A mlir/include/mlir/Transforms/FoldUtils.h
    A mlir/include/mlir/Transforms/InliningUtils.h
    A mlir/include/mlir/Transforms/LoopFusionUtils.h
    A mlir/include/mlir/Transforms/LoopLikeInterface.h
    A mlir/include/mlir/Transforms/LoopLikeInterface.td
    A mlir/include/mlir/Transforms/LoopUtils.h
    A mlir/include/mlir/Transforms/Passes.h
    A mlir/include/mlir/Transforms/RegionUtils.h
    A mlir/include/mlir/Transforms/SideEffectsInterface.h
    A mlir/include/mlir/Transforms/Utils.h
    A mlir/include/mlir/Transforms/ViewOpGraph.h
    A mlir/include/mlir/Transforms/ViewRegionGraph.h
    A mlir/include/mlir/Translation.h
    A mlir/lib/Analysis/AffineAnalysis.cpp
    A mlir/lib/Analysis/AffineStructures.cpp
    A mlir/lib/Analysis/CMakeLists.txt
    A mlir/lib/Analysis/CallGraph.cpp
    A mlir/lib/Analysis/Dominance.cpp
    A mlir/lib/Analysis/InferTypeOpInterface.cpp
    A mlir/lib/Analysis/Liveness.cpp
    A mlir/lib/Analysis/LoopAnalysis.cpp
    A mlir/lib/Analysis/MemRefBoundCheck.cpp
    A mlir/lib/Analysis/NestedMatcher.cpp
    A mlir/lib/Analysis/OpStats.cpp
    A mlir/lib/Analysis/SliceAnalysis.cpp
    A mlir/lib/Analysis/TestMemRefDependenceCheck.cpp
    A mlir/lib/Analysis/TestParallelismDetection.cpp
    A mlir/lib/Analysis/Utils.cpp
    A mlir/lib/Analysis/VectorAnalysis.cpp
    A mlir/lib/Analysis/Verifier.cpp
    A mlir/lib/CMakeLists.txt
    A mlir/lib/Conversion/AffineToStandard/AffineToStandard.cpp
    A mlir/lib/Conversion/AffineToStandard/CMakeLists.txt
    A mlir/lib/Conversion/CMakeLists.txt
    A mlir/lib/Conversion/GPUCommon/IndexIntrinsicsOpLowering.h
    A mlir/lib/Conversion/GPUCommon/OpToFuncCallLowering.h
    A mlir/lib/Conversion/GPUToCUDA/CMakeLists.txt
    A mlir/lib/Conversion/GPUToCUDA/ConvertKernelFuncToCubin.cpp
    A mlir/lib/Conversion/GPUToCUDA/ConvertLaunchFuncToCudaCalls.cpp
    A mlir/lib/Conversion/GPUToNVVM/CMakeLists.txt
    A mlir/lib/Conversion/GPUToNVVM/GPUToNVVM.td
    A mlir/lib/Conversion/GPUToNVVM/LowerGpuOpsToNVVMOps.cpp
    A mlir/lib/Conversion/GPUToROCDL/CMakeLists.txt
    A mlir/lib/Conversion/GPUToROCDL/LowerGpuOpsToROCDLOps.cpp
    A mlir/lib/Conversion/GPUToSPIRV/CMakeLists.txt
    A mlir/lib/Conversion/GPUToSPIRV/ConvertGPUToSPIRV.cpp
    A mlir/lib/Conversion/GPUToSPIRV/ConvertGPUToSPIRVPass.cpp
    A mlir/lib/Conversion/LinalgToLLVM/CMakeLists.txt
    A mlir/lib/Conversion/LinalgToLLVM/LinalgToLLVM.cpp
    A mlir/lib/Conversion/LoopToStandard/CMakeLists.txt
    A mlir/lib/Conversion/LoopToStandard/ConvertLoopToStandard.cpp
    A mlir/lib/Conversion/LoopsToGPU/CMakeLists.txt
    A mlir/lib/Conversion/LoopsToGPU/LoopsToGPU.cpp
    A mlir/lib/Conversion/LoopsToGPU/LoopsToGPUPass.cpp
    A mlir/lib/Conversion/StandardToLLVM/CMakeLists.txt
    A mlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp
    A mlir/lib/Conversion/StandardToSPIRV/CMakeLists.txt
    A mlir/lib/Conversion/StandardToSPIRV/ConvertStandardToSPIRV.cpp
    A mlir/lib/Conversion/StandardToSPIRV/ConvertStandardToSPIRVPass.cpp
    A mlir/lib/Conversion/StandardToSPIRV/LegalizeStandardForSPIRV.cpp
    A mlir/lib/Conversion/StandardToSPIRV/StandardToSPIRV.td
    A mlir/lib/Conversion/VectorToLLVM/CMakeLists.txt
    A mlir/lib/Conversion/VectorToLLVM/ConvertVectorToLLVM.cpp
    A mlir/lib/Conversion/VectorToLoops/CMakeLists.txt
    A mlir/lib/Conversion/VectorToLoops/ConvertVectorToLoops.cpp
    A mlir/lib/Dialect/AffineOps/AffineOps.cpp
    A mlir/lib/Dialect/AffineOps/CMakeLists.txt
    A mlir/lib/Dialect/AffineOps/DialectRegistration.cpp
    A mlir/lib/Dialect/CMakeLists.txt
    A mlir/lib/Dialect/FxpMathOps/CMakeLists.txt
    A mlir/lib/Dialect/FxpMathOps/IR/DialectRegistration.cpp
    A mlir/lib/Dialect/FxpMathOps/IR/FxpMathOps.cpp
    A mlir/lib/Dialect/FxpMathOps/Transforms/LowerUniformRealMath.cpp
    A mlir/lib/Dialect/FxpMathOps/Transforms/UniformKernelUtils.h
    A mlir/lib/Dialect/GPU/CMakeLists.txt
    A mlir/lib/Dialect/GPU/IR/DialectRegistration.cpp
    A mlir/lib/Dialect/GPU/IR/GPUDialect.cpp
    A mlir/lib/Dialect/GPU/Transforms/KernelOutlining.cpp
    A mlir/lib/Dialect/LLVMIR/CMakeLists.txt
    A mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
    A mlir/lib/Dialect/LLVMIR/IR/NVVMDialect.cpp
    A mlir/lib/Dialect/LLVMIR/IR/ROCDLDialect.cpp
    A mlir/lib/Dialect/Linalg/Analysis/DependenceAnalysis.cpp
    A mlir/lib/Dialect/Linalg/CMakeLists.txt
    A mlir/lib/Dialect/Linalg/EDSC/Builders.cpp
    A mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
    A mlir/lib/Dialect/Linalg/IR/LinalgTypes.cpp
    A mlir/lib/Dialect/Linalg/LinalgRegistration.cpp
    A mlir/lib/Dialect/Linalg/Transforms/Fusion.cpp
    A mlir/lib/Dialect/Linalg/Transforms/LinalgToLoops.cpp
    A mlir/lib/Dialect/Linalg/Transforms/LinalgTransforms.cpp
    A mlir/lib/Dialect/Linalg/Transforms/Promotion.cpp
    A mlir/lib/Dialect/Linalg/Transforms/Tiling.cpp
    A mlir/lib/Dialect/Linalg/Utils/Utils.cpp
    A mlir/lib/Dialect/LoopOps/CMakeLists.txt
    A mlir/lib/Dialect/LoopOps/DialectRegistration.cpp
    A mlir/lib/Dialect/LoopOps/LoopOps.cpp
    A mlir/lib/Dialect/QuantOps/CMakeLists.txt
    A mlir/lib/Dialect/QuantOps/IR/DialectRegistration.cpp
    A mlir/lib/Dialect/QuantOps/IR/QuantOps.cpp
    A mlir/lib/Dialect/QuantOps/IR/QuantTypes.cpp
    A mlir/lib/Dialect/QuantOps/IR/TypeDetail.h
    A mlir/lib/Dialect/QuantOps/IR/TypeParser.cpp
    A mlir/lib/Dialect/QuantOps/Transforms/ConvertConst.cpp
    A mlir/lib/Dialect/QuantOps/Transforms/ConvertSimQuant.cpp
    A mlir/lib/Dialect/QuantOps/Utils/FakeQuantSupport.cpp
    A mlir/lib/Dialect/QuantOps/Utils/QuantizeUtils.cpp
    A mlir/lib/Dialect/QuantOps/Utils/UniformSupport.cpp
    A mlir/lib/Dialect/SDBM/CMakeLists.txt
    A mlir/lib/Dialect/SDBM/SDBM.cpp
    A mlir/lib/Dialect/SDBM/SDBMDialect.cpp
    A mlir/lib/Dialect/SDBM/SDBMExpr.cpp
    A mlir/lib/Dialect/SDBM/SDBMExprDetail.h
    A mlir/lib/Dialect/SPIRV/CMakeLists.txt
    A mlir/lib/Dialect/SPIRV/DialectRegistration.cpp
    A mlir/lib/Dialect/SPIRV/LayoutUtils.cpp
    A mlir/lib/Dialect/SPIRV/SPIRVCanonicalization.td
    A mlir/lib/Dialect/SPIRV/SPIRVDialect.cpp
    A mlir/lib/Dialect/SPIRV/SPIRVLowering.cpp
    A mlir/lib/Dialect/SPIRV/SPIRVOps.cpp
    A mlir/lib/Dialect/SPIRV/SPIRVTypes.cpp
    A mlir/lib/Dialect/SPIRV/Serialization/CMakeLists.txt
    A mlir/lib/Dialect/SPIRV/Serialization/Deserializer.cpp
    A mlir/lib/Dialect/SPIRV/Serialization/SPIRVBinaryUtils.cpp
    A mlir/lib/Dialect/SPIRV/Serialization/Serializer.cpp
    A mlir/lib/Dialect/SPIRV/Serialization/TranslateRegistration.cpp
    A mlir/lib/Dialect/SPIRV/Transforms/CMakeLists.txt
    A mlir/lib/Dialect/SPIRV/Transforms/DecorateSPIRVCompositeTypeLayoutPass.cpp
    A mlir/lib/Dialect/SPIRV/Transforms/LowerABIAttributesPass.cpp
    A mlir/lib/Dialect/StandardOps/CMakeLists.txt
    A mlir/lib/Dialect/StandardOps/DialectRegistration.cpp
    A mlir/lib/Dialect/StandardOps/Ops.cpp
    A mlir/lib/Dialect/Traits.cpp
    A mlir/lib/Dialect/VectorOps/CMakeLists.txt
    A mlir/lib/Dialect/VectorOps/DialectRegistration.cpp
    A mlir/lib/Dialect/VectorOps/VectorOps.cpp
    A mlir/lib/Dialect/VectorOps/VectorTransforms.cpp
    A mlir/lib/EDSC/Builders.cpp
    A mlir/lib/EDSC/CMakeLists.txt
    A mlir/lib/EDSC/CoreAPIs.cpp
    A mlir/lib/EDSC/Helpers.cpp
    A mlir/lib/EDSC/Intrinsics.cpp
    A mlir/lib/ExecutionEngine/CMakeLists.txt
    A mlir/lib/ExecutionEngine/ExecutionEngine.cpp
    A mlir/lib/ExecutionEngine/OptUtils.cpp
    A mlir/lib/IR/AffineExpr.cpp
    A mlir/lib/IR/AffineExprDetail.h
    A mlir/lib/IR/AffineMap.cpp
    A mlir/lib/IR/AffineMapDetail.h
    A mlir/lib/IR/AsmPrinter.cpp
    A mlir/lib/IR/AttributeDetail.h
    A mlir/lib/IR/Attributes.cpp
    A mlir/lib/IR/Block.cpp
    A mlir/lib/IR/Builders.cpp
    A mlir/lib/IR/CMakeLists.txt
    A mlir/lib/IR/Diagnostics.cpp
    A mlir/lib/IR/Dialect.cpp
    A mlir/lib/IR/Function.cpp
    A mlir/lib/IR/FunctionImplementation.cpp
    A mlir/lib/IR/IntegerSet.cpp
    A mlir/lib/IR/IntegerSetDetail.h
    A mlir/lib/IR/Location.cpp
    A mlir/lib/IR/LocationDetail.h
    A mlir/lib/IR/MLIRContext.cpp
    A mlir/lib/IR/Module.cpp
    A mlir/lib/IR/Operation.cpp
    A mlir/lib/IR/OperationSupport.cpp
    A mlir/lib/IR/PatternMatch.cpp
    A mlir/lib/IR/Region.cpp
    A mlir/lib/IR/StandardTypes.cpp
    A mlir/lib/IR/SymbolTable.cpp
    A mlir/lib/IR/TypeDetail.h
    A mlir/lib/IR/TypeUtilities.cpp
    A mlir/lib/IR/Types.cpp
    A mlir/lib/IR/Value.cpp
    A mlir/lib/IR/Visitors.cpp
    A mlir/lib/Parser/CMakeLists.txt
    A mlir/lib/Parser/Lexer.cpp
    A mlir/lib/Parser/Lexer.h
    A mlir/lib/Parser/Parser.cpp
    A mlir/lib/Parser/Token.cpp
    A mlir/lib/Parser/Token.h
    A mlir/lib/Parser/TokenKinds.def
    A mlir/lib/Pass/CMakeLists.txt
    A mlir/lib/Pass/IRPrinting.cpp
    A mlir/lib/Pass/Pass.cpp
    A mlir/lib/Pass/PassDetail.h
    A mlir/lib/Pass/PassManagerOptions.cpp
    A mlir/lib/Pass/PassRegistry.cpp
    A mlir/lib/Pass/PassStatistics.cpp
    A mlir/lib/Pass/PassTiming.cpp
    A mlir/lib/Quantizer/CMakeLists.txt
    A mlir/lib/Quantizer/Configurations/FxpMathConfig.cpp
    A mlir/lib/Quantizer/Support/Configuration.cpp
    A mlir/lib/Quantizer/Support/ConstraintAnalysisGraph.cpp
    A mlir/lib/Quantizer/Support/Metadata.cpp
    A mlir/lib/Quantizer/Support/Statistics.cpp
    A mlir/lib/Quantizer/Support/TypeUtils.cpp
    A mlir/lib/Quantizer/Support/UniformConstraints.cpp
    A mlir/lib/Quantizer/Support/UniformSolvers.cpp
    A mlir/lib/Quantizer/Transforms/AddDefaultStatsTestPass.cpp
    A mlir/lib/Quantizer/Transforms/InferQuantizedTypesPass.cpp
    A mlir/lib/Quantizer/Transforms/RemoveInstrumentationPass.cpp
    A mlir/lib/Support/CMakeLists.txt
    A mlir/lib/Support/FileUtilities.cpp
    A mlir/lib/Support/JitRunner.cpp
    A mlir/lib/Support/MlirOptMain.cpp
    A mlir/lib/Support/StorageUniquer.cpp
    A mlir/lib/Support/ToolUtilities.cpp
    A mlir/lib/Support/TranslateClParser.cpp
    A mlir/lib/TableGen/Argument.cpp
    A mlir/lib/TableGen/Attribute.cpp
    A mlir/lib/TableGen/CMakeLists.txt
    A mlir/lib/TableGen/Constraint.cpp
    A mlir/lib/TableGen/Dialect.cpp
    A mlir/lib/TableGen/Format.cpp
    A mlir/lib/TableGen/OpInterfaces.cpp
    A mlir/lib/TableGen/OpTrait.cpp
    A mlir/lib/TableGen/Operator.cpp
    A mlir/lib/TableGen/Pattern.cpp
    A mlir/lib/TableGen/Predicate.cpp
    A mlir/lib/TableGen/Type.cpp
    A mlir/lib/Target/CMakeLists.txt
    A mlir/lib/Target/LLVMIR/ConvertFromLLVMIR.cpp
    A mlir/lib/Target/LLVMIR/ConvertToLLVMIR.cpp
    A mlir/lib/Target/LLVMIR/ConvertToNVVMIR.cpp
    A mlir/lib/Target/LLVMIR/ConvertToROCDLIR.cpp
    A mlir/lib/Target/LLVMIR/ModuleTranslation.cpp
    A mlir/lib/Transforms/AffineDataCopyGeneration.cpp
    A mlir/lib/Transforms/AffineLoopInvariantCodeMotion.cpp
    A mlir/lib/Transforms/CMakeLists.txt
    A mlir/lib/Transforms/CSE.cpp
    A mlir/lib/Transforms/Canonicalizer.cpp
    A mlir/lib/Transforms/DialectConversion.cpp
    A mlir/lib/Transforms/Inliner.cpp
    A mlir/lib/Transforms/LoopCoalescing.cpp
    A mlir/lib/Transforms/LoopFusion.cpp
    A mlir/lib/Transforms/LoopInvariantCodeMotion.cpp
    A mlir/lib/Transforms/LoopTiling.cpp
    A mlir/lib/Transforms/LoopUnroll.cpp
    A mlir/lib/Transforms/LoopUnrollAndJam.cpp
    A mlir/lib/Transforms/MemRefDataFlowOpt.cpp
    A mlir/lib/Transforms/PipelineDataTransfer.cpp
    A mlir/lib/Transforms/SimplifyAffineStructures.cpp
    A mlir/lib/Transforms/StripDebugInfo.cpp
    A mlir/lib/Transforms/Utils/CMakeLists.txt
    A mlir/lib/Transforms/Utils/FoldUtils.cpp
    A mlir/lib/Transforms/Utils/GreedyPatternRewriteDriver.cpp
    A mlir/lib/Transforms/Utils/InliningUtils.cpp
    A mlir/lib/Transforms/Utils/LoopFusionUtils.cpp
    A mlir/lib/Transforms/Utils/LoopUtils.cpp
    A mlir/lib/Transforms/Utils/RegionUtils.cpp
    A mlir/lib/Transforms/Utils/Utils.cpp
    A mlir/lib/Transforms/Vectorize.cpp
    A mlir/lib/Transforms/ViewOpGraph.cpp
    A mlir/lib/Transforms/ViewRegionGraph.cpp
    A mlir/lib/Translation/CMakeLists.txt
    A mlir/lib/Translation/Translation.cpp
    A mlir/test/APITest.h
    A mlir/test/AffineOps/canonicalize.mlir
    A mlir/test/AffineOps/dma.mlir
    A mlir/test/AffineOps/inlining.mlir
    A mlir/test/AffineOps/invalid.mlir
    A mlir/test/AffineOps/load-store-invalid.mlir
    A mlir/test/AffineOps/load-store.mlir
    A mlir/test/AffineOps/memref-stride-calculation.mlir
    A mlir/test/AffineOps/ops.mlir
    A mlir/test/Analysis/test-callgraph.mlir
    A mlir/test/Analysis/test-liveness.mlir
    A mlir/test/CMakeLists.txt
    A mlir/test/Conversion/GPUToCUDA/lit.local.cfg
    A mlir/test/Conversion/GPUToCUDA/lower-launch-func-to-cuda.mlir
    A mlir/test/Conversion/GPUToCUDA/lower-nvvm-kernel-to-cubin.mlir
    A mlir/test/Conversion/GPUToNVVM/gpu-to-nvvm.mlir
    A mlir/test/Conversion/GPUToNVVM/memory-attrbution.mlir
    A mlir/test/Conversion/GPUToROCDL/gpu-to-rocdl.mlir
    A mlir/test/Conversion/GPUToSPIRV/builtins.mlir
    A mlir/test/Conversion/GPUToSPIRV/load-store.mlir
    A mlir/test/Conversion/GPUToSPIRV/loop.mlir
    A mlir/test/Conversion/GPUToSPIRV/simple.mlir
    A mlir/test/Conversion/LoopsToGPU/imperfect_2D.mlir
    A mlir/test/Conversion/LoopsToGPU/imperfect_3D.mlir
    A mlir/test/Conversion/LoopsToGPU/imperfect_4D.mlir
    A mlir/test/Conversion/LoopsToGPU/imperfect_linalg.mlir
    A mlir/test/Conversion/LoopsToGPU/linalg_to_gpu.mlir
    A mlir/test/Conversion/LoopsToGPU/perfect_1D_setlaunch.mlir
    A mlir/test/Conversion/LoopsToGPU/step_one.mlir
    A mlir/test/Conversion/LoopsToGPU/step_positive.mlir
    A mlir/test/Conversion/StandardToLLVM/convert-argattrs.mlir
    A mlir/test/Conversion/StandardToLLVM/convert-funcs.mlir
    A mlir/test/Conversion/StandardToLLVM/convert-memref-ops.mlir
    A mlir/test/Conversion/StandardToLLVM/convert-to-llvmir.mlir
    A mlir/test/Conversion/StandardToLLVM/standard-to-llvm.mlir
    A mlir/test/Conversion/StandardToSPIRV/legalization.mlir
    A mlir/test/Conversion/StandardToSPIRV/std-to-spirv.mlir
    A mlir/test/Conversion/StandardToSPIRV/subview-to-spirv.mlir
    A mlir/test/Conversion/VectorToLLVM/vector-to-llvm.mlir
    A mlir/test/Conversion/VectorToLoops/vector-to-loops.mlir
    A mlir/test/Conversion/convert-to-cfg.mlir
    A mlir/test/Dialect/FxpMathOps/lower-uniform-casts.mlir
    A mlir/test/Dialect/FxpMathOps/lower-uniform-real-math-addew.mlir
    A mlir/test/Dialect/FxpMathOps/lower-uniform-real-math-mulew.mlir
    A mlir/test/Dialect/GPU/canonicalize.mlir
    A mlir/test/Dialect/GPU/invalid.mlir
    A mlir/test/Dialect/GPU/ops.mlir
    A mlir/test/Dialect/GPU/outlining.mlir
    A mlir/test/Dialect/LLVMIR/func.mlir
    A mlir/test/Dialect/LLVMIR/global.mlir
    A mlir/test/Dialect/LLVMIR/invalid.mlir
    A mlir/test/Dialect/LLVMIR/nvvm.mlir
    A mlir/test/Dialect/LLVMIR/rocdl.mlir
    A mlir/test/Dialect/LLVMIR/roundtrip.mlir
    A mlir/test/Dialect/LLVMIR/terminator.mlir
    A mlir/test/Dialect/Linalg/fusion-2-level.mlir
    A mlir/test/Dialect/Linalg/fusion.mlir
    A mlir/test/Dialect/Linalg/invalid.mlir
    A mlir/test/Dialect/Linalg/llvm.mlir
    A mlir/test/Dialect/Linalg/loops.mlir
    A mlir/test/Dialect/Linalg/promote.mlir
    A mlir/test/Dialect/Linalg/roundtrip.mlir
    A mlir/test/Dialect/Linalg/tile.mlir
    A mlir/test/Dialect/Linalg/tile_conv.mlir
    A mlir/test/Dialect/Linalg/tile_indexed_generic.mlir
    A mlir/test/Dialect/Linalg/transform-patterns.mlir
    A mlir/test/Dialect/Loops/invalid.mlir
    A mlir/test/Dialect/Loops/ops.mlir
    A mlir/test/Dialect/QuantOps/canonicalize.mlir
    A mlir/test/Dialect/QuantOps/convert-const.mlir
    A mlir/test/Dialect/QuantOps/convert-fakequant-invalid.mlir
    A mlir/test/Dialect/QuantOps/convert-fakequant.mlir
    A mlir/test/Dialect/QuantOps/parse-any-invalid.mlir
    A mlir/test/Dialect/QuantOps/parse-any.mlir
    A mlir/test/Dialect/QuantOps/parse-ops-invalid.mlir
    A mlir/test/Dialect/QuantOps/parse-ops.mlir
    A mlir/test/Dialect/QuantOps/parse-uniform-invalid.mlir
    A mlir/test/Dialect/QuantOps/parse-uniform.mlir
    A mlir/test/Dialect/SPIRV/Serialization/arithmetic-ops.mlir
    A mlir/test/Dialect/SPIRV/Serialization/array.mlir
    A mlir/test/Dialect/SPIRV/Serialization/atomic-ops.mlir
    A mlir/test/Dialect/SPIRV/Serialization/barrier.mlir
    A mlir/test/Dialect/SPIRV/Serialization/bit-ops.mlir
    A mlir/test/Dialect/SPIRV/Serialization/cast-ops.mlir
    A mlir/test/Dialect/SPIRV/Serialization/composite-op.mlir
    A mlir/test/Dialect/SPIRV/Serialization/constant.mlir
    A mlir/test/Dialect/SPIRV/Serialization/entry-point.mlir
    A mlir/test/Dialect/SPIRV/Serialization/execution-mode.mlir
    A mlir/test/Dialect/SPIRV/Serialization/function-call.mlir
    A mlir/test/Dialect/SPIRV/Serialization/global-variable.mlir
    A mlir/test/Dialect/SPIRV/Serialization/glsl-ops.mlir
    A mlir/test/Dialect/SPIRV/Serialization/group-ops.mlir
    A mlir/test/Dialect/SPIRV/Serialization/logical-ops.mlir
    A mlir/test/Dialect/SPIRV/Serialization/loop.mlir
    A mlir/test/Dialect/SPIRV/Serialization/memory-ops.mlir
    A mlir/test/Dialect/SPIRV/Serialization/module.mlir
    A mlir/test/Dialect/SPIRV/Serialization/non-uniform-ops.mlir
    A mlir/test/Dialect/SPIRV/Serialization/phi.mlir
    A mlir/test/Dialect/SPIRV/Serialization/selection.mlir
    A mlir/test/Dialect/SPIRV/Serialization/spec-constant.mlir
    A mlir/test/Dialect/SPIRV/Serialization/struct.mlir
    A mlir/test/Dialect/SPIRV/Serialization/terminator.mlir
    A mlir/test/Dialect/SPIRV/Serialization/undef.mlir
    A mlir/test/Dialect/SPIRV/Transforms/abi-load-store.mlir
    A mlir/test/Dialect/SPIRV/Transforms/abi-simple.mlir
    A mlir/test/Dialect/SPIRV/Transforms/inlining.mlir
    A mlir/test/Dialect/SPIRV/Transforms/layout-decoration.mlir
    A mlir/test/Dialect/SPIRV/arithmetic-ops.mlir
    A mlir/test/Dialect/SPIRV/atomic-ops.mlir
    A mlir/test/Dialect/SPIRV/bit-ops.mlir
    A mlir/test/Dialect/SPIRV/canonicalize.mlir
    A mlir/test/Dialect/SPIRV/composite-ops.mlir
    A mlir/test/Dialect/SPIRV/control-flow-ops.mlir
    A mlir/test/Dialect/SPIRV/glslops.mlir
    A mlir/test/Dialect/SPIRV/group-ops.mlir
    A mlir/test/Dialect/SPIRV/logical-ops.mlir
    A mlir/test/Dialect/SPIRV/non-uniform-ops.mlir
    A mlir/test/Dialect/SPIRV/ops.mlir
    A mlir/test/Dialect/SPIRV/structure-ops.mlir
    A mlir/test/Dialect/SPIRV/types.mlir
    A mlir/test/Dialect/VectorOps/canonicalize.mlir
    A mlir/test/Dialect/VectorOps/invalid.mlir
    A mlir/test/Dialect/VectorOps/ops.mlir
    A mlir/test/Dialect/VectorOps/vector-transforms.mlir
    A mlir/test/Dialect/traits.mlir
    A mlir/test/EDSC/CMakeLists.txt
    A mlir/test/EDSC/builder-api-test.cpp
    A mlir/test/EDSC/lit.local.cfg
    A mlir/test/Examples/Toy/Ch1/ast.toy
    A mlir/test/Examples/Toy/Ch2/ast.toy
    A mlir/test/Examples/Toy/Ch2/codegen.toy
    A mlir/test/Examples/Toy/Ch2/invalid.mlir
    A mlir/test/Examples/Toy/Ch2/scalar.toy
    A mlir/test/Examples/Toy/Ch3/ast.toy
    A mlir/test/Examples/Toy/Ch3/codegen.toy
    A mlir/test/Examples/Toy/Ch3/invalid.mlir
    A mlir/test/Examples/Toy/Ch3/scalar.toy
    A mlir/test/Examples/Toy/Ch4/ast.toy
    A mlir/test/Examples/Toy/Ch4/codegen.toy
    A mlir/test/Examples/Toy/Ch4/invalid.mlir
    A mlir/test/Examples/Toy/Ch4/scalar.toy
    A mlir/test/Examples/Toy/Ch4/shape_inference.mlir
    A mlir/test/Examples/Toy/Ch5/affine-lowering.mlir
    A mlir/test/Examples/Toy/Ch5/ast.toy
    A mlir/test/Examples/Toy/Ch5/codegen.toy
    A mlir/test/Examples/Toy/Ch5/invalid.mlir
    A mlir/test/Examples/Toy/Ch5/scalar.toy
    A mlir/test/Examples/Toy/Ch5/shape_inference.mlir
    A mlir/test/Examples/Toy/Ch6/affine-lowering.mlir
    A mlir/test/Examples/Toy/Ch6/ast.toy
    A mlir/test/Examples/Toy/Ch6/codegen.toy
    A mlir/test/Examples/Toy/Ch6/invalid.mlir
    A mlir/test/Examples/Toy/Ch6/llvm-lowering.mlir
    A mlir/test/Examples/Toy/Ch6/scalar.toy
    A mlir/test/Examples/Toy/Ch6/shape_inference.mlir
    A mlir/test/Examples/Toy/Ch7/affine-lowering.mlir
    A mlir/test/Examples/Toy/Ch7/ast.toy
    A mlir/test/Examples/Toy/Ch7/codegen.toy
    A mlir/test/Examples/Toy/Ch7/invalid.mlir
    A mlir/test/Examples/Toy/Ch7/llvm-lowering.mlir
    A mlir/test/Examples/Toy/Ch7/scalar.toy
    A mlir/test/Examples/Toy/Ch7/shape_inference.mlir
    A mlir/test/Examples/Toy/Ch7/struct-ast.toy
    A mlir/test/Examples/Toy/Ch7/struct-codegen.toy
    A mlir/test/Examples/Toy/Ch7/struct-opt.mlir
    A mlir/test/Examples/lit.local.cfg
    A mlir/test/IR/affine-map.mlir
    A mlir/test/IR/attribute.mlir
    A mlir/test/IR/check-help-output.mlir
    A mlir/test/IR/core-ops.mlir
    A mlir/test/IR/invalid-affinemap.mlir
    A mlir/test/IR/invalid-func-op.mlir
    A mlir/test/IR/invalid-locations.mlir
    A mlir/test/IR/invalid-module-op.mlir
    A mlir/test/IR/invalid-ops.mlir
    A mlir/test/IR/invalid.mlir
    A mlir/test/IR/locations.mlir
    A mlir/test/IR/memory-ops.mlir
    A mlir/test/IR/module-op.mlir
    A mlir/test/IR/op-stats.mlir
    A mlir/test/IR/opaque_locations.mlir
    A mlir/test/IR/operand.mlir
    A mlir/test/IR/parser.mlir
    A mlir/test/IR/pretty-attributes.mlir
    A mlir/test/IR/pretty-locations.mlir
    A mlir/test/IR/pretty-region-args.mlir
    A mlir/test/IR/print-op-local-scope.mlir
    A mlir/test/IR/print-op-on-diagnostic.mlir
    A mlir/test/IR/region.mlir
    A mlir/test/IR/repro_b120295301.mlir
    A mlir/test/IR/result.mlir
    A mlir/test/IR/test-func-erase-arg.mlir
    A mlir/test/IR/test-func-set-type.mlir
    A mlir/test/IR/test-matchers.mlir
    A mlir/test/IR/test-symbol-rauw.mlir
    A mlir/test/IR/test-symbol-uses.mlir
    A mlir/test/IR/traits.mlir
    A mlir/test/IR/wrapping_op.mlir
    A mlir/test/Pass/crash-recovery.mlir
    A mlir/test/Pass/ir-printing.mlir
    A mlir/test/Pass/pass-timing.mlir
    A mlir/test/Pass/pipeline-options-parsing.mlir
    A mlir/test/Pass/pipeline-parsing.mlir
    A mlir/test/Pass/pipeline-stats.mlir
    A mlir/test/Quantizer/matmul.mlir
    A mlir/test/Quantizer/remove-instrumentation.mlir
    A mlir/test/SDBM/CMakeLists.txt
    A mlir/test/SDBM/lit.local.cfg
    A mlir/test/SDBM/sdbm-api-test.cpp
    A mlir/test/Target/import.ll
    A mlir/test/Target/llvmir-intrinsics.mlir
    A mlir/test/Target/llvmir-invalid.mlir
    A mlir/test/Target/llvmir.mlir
    A mlir/test/Target/nvvmir.mlir
    A mlir/test/Target/rocdl.mlir
    A mlir/test/Transforms/Vectorize/compose_maps.mlir
    A mlir/test/Transforms/Vectorize/normalize_maps.mlir
    A mlir/test/Transforms/Vectorize/vector_utils.mlir
    A mlir/test/Transforms/Vectorize/vectorize_1d.mlir
    A mlir/test/Transforms/Vectorize/vectorize_2d.mlir
    A mlir/test/Transforms/Vectorize/vectorize_3d.mlir
    A mlir/test/Transforms/Vectorize/vectorize_outer_loop_2d.mlir
    A mlir/test/Transforms/Vectorize/vectorize_outer_loop_transpose_2d.mlir
    A mlir/test/Transforms/Vectorize/vectorize_transpose_2d.mlir
    A mlir/test/Transforms/affine-data-copy.mlir
    A mlir/test/Transforms/affine-loop-invariant-code-motion.mlir
    A mlir/test/Transforms/canonicalize-dce.mlir
    A mlir/test/Transforms/canonicalize.mlir
    A mlir/test/Transforms/constant-fold.mlir
    A mlir/test/Transforms/cse.mlir
    A mlir/test/Transforms/dma-generate.mlir
    A mlir/test/Transforms/inlining.mlir
    A mlir/test/Transforms/loop-coalescing.mlir
    A mlir/test/Transforms/loop-fusion-dependence-check.mlir
    A mlir/test/Transforms/loop-fusion-slice-computation.mlir
    A mlir/test/Transforms/loop-fusion.mlir
    A mlir/test/Transforms/loop-invariant-code-motion.mlir
    A mlir/test/Transforms/loop-tiling.mlir
    A mlir/test/Transforms/lower-affine.mlir
    A mlir/test/Transforms/memref-bound-check.mlir
    A mlir/test/Transforms/memref-dataflow-opt.mlir
    A mlir/test/Transforms/memref-dependence-check.mlir
    A mlir/test/Transforms/memref-normalize.mlir
    A mlir/test/Transforms/parallelism-detection.mlir
    A mlir/test/Transforms/parametric-mapping.mlir
    A mlir/test/Transforms/parametric-tiling.mlir
    A mlir/test/Transforms/pipeline-data-transfer.mlir
    A mlir/test/Transforms/simplify-affine-structures.mlir
    A mlir/test/Transforms/slicing-utils.mlir
    A mlir/test/Transforms/strip-debuginfo.mlir
    A mlir/test/Transforms/test-canonicalize.mlir
    A mlir/test/Transforms/test-inlining.mlir
    A mlir/test/Transforms/test-legalize-remapped-value.mlir
    A mlir/test/Transforms/test-legalizer-analysis.mlir
    A mlir/test/Transforms/test-legalizer-full.mlir
    A mlir/test/Transforms/test-legalizer.mlir
    A mlir/test/Transforms/unroll-jam.mlir
    A mlir/test/Transforms/unroll.mlir
    A mlir/test/Unit/lit.cfg.py
    A mlir/test/Unit/lit.site.cfg.py.in
    A mlir/test/lib/CMakeLists.txt
    A mlir/test/lib/DeclarativeTransforms/CMakeLists.txt
    A mlir/test/lib/DeclarativeTransforms/TestLinalgTransformPatterns.td
    A mlir/test/lib/DeclarativeTransforms/TestVectorTransformPatterns.td
    A mlir/test/lib/DeclarativeTransforms/lit.local.cfg
    A mlir/test/lib/IR/CMakeLists.txt
    A mlir/test/lib/IR/TestFunc.cpp
    A mlir/test/lib/IR/TestMatchers.cpp
    A mlir/test/lib/IR/TestSymbolUses.cpp
    A mlir/test/lib/Pass/CMakeLists.txt
    A mlir/test/lib/Pass/TestPassManager.cpp
    A mlir/test/lib/TestDialect/CMakeLists.txt
    A mlir/test/lib/TestDialect/TestDialect.cpp
    A mlir/test/lib/TestDialect/TestDialect.h
    A mlir/test/lib/TestDialect/TestOps.td
    A mlir/test/lib/TestDialect/TestPatterns.cpp
    A mlir/test/lib/TestDialect/lit.local.cfg
    A mlir/test/lib/Transforms/CMakeLists.txt
    A mlir/test/lib/Transforms/TestCallGraph.cpp
    A mlir/test/lib/Transforms/TestConstantFold.cpp
    A mlir/test/lib/Transforms/TestInlining.cpp
    A mlir/test/lib/Transforms/TestLinalgTransforms.cpp
    A mlir/test/lib/Transforms/TestLiveness.cpp
    A mlir/test/lib/Transforms/TestLoopFusion.cpp
    A mlir/test/lib/Transforms/TestLoopMapping.cpp
    A mlir/test/lib/Transforms/TestLoopParametricTiling.cpp
    A mlir/test/lib/Transforms/TestMemRefStrideCalculation.cpp
    A mlir/test/lib/Transforms/TestOpaqueLoc.cpp
    A mlir/test/lib/Transforms/TestVectorToLoopsConversion.cpp
    A mlir/test/lib/Transforms/TestVectorTransforms.cpp
    A mlir/test/lib/Transforms/TestVectorizationUtils.cpp
    A mlir/test/lit.cfg.py
    A mlir/test/lit.site.cfg.py.in
    A mlir/test/mlir-cpu-runner/CMakeLists.txt
    A mlir/test/mlir-cpu-runner/cblas.cpp
    A mlir/test/mlir-cpu-runner/cblas_interface.cpp
    A mlir/test/mlir-cpu-runner/include/cblas.h
    A mlir/test/mlir-cpu-runner/include/mlir_runner_utils.h
    A mlir/test/mlir-cpu-runner/linalg_integration_test.mlir
    A mlir/test/mlir-cpu-runner/lit.local.cfg
    A mlir/test/mlir-cpu-runner/mlir_runner_utils.cpp
    A mlir/test/mlir-cpu-runner/simple.mlir
    A mlir/test/mlir-cpu-runner/unranked_memref.mlir
    A mlir/test/mlir-cpu-runner/utils.mlir
    A mlir/test/mlir-cuda-runner/all-reduce-op.mlir
    A mlir/test/mlir-cuda-runner/all-reduce-region.mlir
    A mlir/test/mlir-cuda-runner/gpu-to-cubin.mlir
    A mlir/test/mlir-cuda-runner/lit.local.cfg
    A mlir/test/mlir-cuda-runner/shuffle.mlir
    A mlir/test/mlir-tblgen/dialect.td
    A mlir/test/mlir-tblgen/expect-symbol.td
    A mlir/test/mlir-tblgen/op-attribute.td
    A mlir/test/mlir-tblgen/op-decl.td
    A mlir/test/mlir-tblgen/op-interface.td
    A mlir/test/mlir-tblgen/op-operand.td
    A mlir/test/mlir-tblgen/op-result.td
    A mlir/test/mlir-tblgen/pattern.mlir
    A mlir/test/mlir-tblgen/predicate.td
    A mlir/test/mlir-tblgen/return-types.mlir
    A mlir/test/mlir-tblgen/types.mlir
    A mlir/tools/CMakeLists.txt
    A mlir/tools/mlir-cpu-runner/CMakeLists.txt
    A mlir/tools/mlir-cpu-runner/mlir-cpu-runner.cpp
    A mlir/tools/mlir-cuda-runner/CMakeLists.txt
    A mlir/tools/mlir-cuda-runner/cuda-runtime-wrappers.cpp
    A mlir/tools/mlir-cuda-runner/mlir-cuda-runner.cpp
    A mlir/tools/mlir-opt/CMakeLists.txt
    A mlir/tools/mlir-opt/mlir-opt.cpp
    A mlir/tools/mlir-tblgen/CMakeLists.txt
    A mlir/tools/mlir-tblgen/DocGenUtilities.h
    A mlir/tools/mlir-tblgen/EnumsGen.cpp
    A mlir/tools/mlir-tblgen/LLVMIRConversionGen.cpp
    A mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
    A mlir/tools/mlir-tblgen/OpDocGen.cpp
    A mlir/tools/mlir-tblgen/OpInterfacesGen.cpp
    A mlir/tools/mlir-tblgen/ReferenceImplGen.cpp
    A mlir/tools/mlir-tblgen/RewriterGen.cpp
    A mlir/tools/mlir-tblgen/SPIRVUtilsGen.cpp
    A mlir/tools/mlir-tblgen/StructsGen.cpp
    A mlir/tools/mlir-tblgen/mlir-tblgen.cpp
    A mlir/tools/mlir-translate/CMakeLists.txt
    A mlir/tools/mlir-translate/mlir-translate.cpp
    A mlir/unittests/ADT/CMakeLists.txt
    A mlir/unittests/ADT/TypeSwitchTest.cpp
    A mlir/unittests/CMakeLists.txt
    A mlir/unittests/Dialect/BroadcastShapeTest.cpp
    A mlir/unittests/Dialect/CMakeLists.txt
    A mlir/unittests/Dialect/QuantOps/QuantizationUtilsTest.cpp
    A mlir/unittests/Dialect/SPIRV/CMakeLists.txt
    A mlir/unittests/Dialect/SPIRV/DeserializationTest.cpp
    A mlir/unittests/Dialect/SPIRV/SerializationTest.cpp
    A mlir/unittests/IR/AttributeTest.cpp
    A mlir/unittests/IR/CMakeLists.txt
    A mlir/unittests/IR/DialectTest.cpp
    A mlir/unittests/IR/OperationSupportTest.cpp
    A mlir/unittests/IR/StringExtrasTest.cpp
    A mlir/unittests/Pass/AnalysisManagerTest.cpp
    A mlir/unittests/Pass/CMakeLists.txt
    A mlir/unittests/Quantizer/Support/RulesTest.cpp
    A mlir/unittests/Quantizer/Support/UniformSolversTest.cpp
    A mlir/unittests/SDBM/CMakeLists.txt
    A mlir/unittests/SDBM/SDBMTest.cpp
    A mlir/unittests/TableGen/CMakeLists.txt
    A mlir/unittests/TableGen/EnumsGenTest.cpp
    A mlir/unittests/TableGen/FormatTest.cpp
    A mlir/unittests/TableGen/StructsGenTest.cpp
    A mlir/unittests/TableGen/enums.td
    A mlir/unittests/TableGen/structs.td
    A mlir/utils/emacs/mlir-mode.el
    A mlir/utils/generate-test-checks.py
    A mlir/utils/spirv/define_enum.sh
    A mlir/utils/spirv/define_inst.sh
    A mlir/utils/spirv/define_opcodes.sh
    A mlir/utils/spirv/gen_spirv_dialect.py
    A mlir/utils/textmate/mlir.json
    A mlir/utils/vim/README
    A mlir/utils/vim/ftdetect/mlir.vim
    A mlir/utils/vim/ftplugin/mlir.vim
    A mlir/utils/vim/indent/mlir.vim
    A mlir/utils/vim/syntax/mlir.vim

  Log Message:
  -----------
  Import MLIR into the LLVM tree


Compare: https://github.com/llvm/llvm-project/compare/6f635f90929d...0f0d0ed1c78f


More information about the All-commits mailing list