Commit 4fddf5ad authored by Diego Caballero's avatar Diego Caballero Committed by Scott Cyphers

[mlir] Bump mlir repo 8/20/2019 (#3493)

* [MLIR] Bump MLIR repo 8/20/2019

MLIR_
commit 0cdb20a6add19bc96c20dad28589a1e54e4d8469
Author: Lei Zhang <antiagainst@google.com>
Date:   Tue Aug 20 13:33:41 2019 -0700

    Add spv.specConstant and spv._reference_of

LLVM:
commit 3b9a27b6908040881dad394022f8c472c15c0784
Author: Simon Pilgrim <llvm-dev@redking.me.uk>
Date:   Tue Aug 20 17:54:37 2019 +0000

    Fix typo in comment. NFCI.

* Address Bob's feedback
parent f3b9389c
......@@ -115,7 +115,12 @@ if (APPLE)
endif()
endif()
set(NGRAPH_CXX_STANDARD 11)
if (NGRAPH_MLIR_ENABLE)
#MLIR uses the latest version of LLVM which requires C++14.
set(NGRAPH_CXX_STANDARD 14)
else()
set(NGRAPH_CXX_STANDARD 11)
endif()
set(CMAKE_CXX_STANDARD ${NGRAPH_CXX_STANDARD})
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
......@@ -266,6 +271,7 @@ NORMALIZE_BOOL(NGRAPH_INTERPRETER_STATIC_LIB_ENABLE)
NORMALIZE_BOOL(NGRAPH_CPU_STATIC_LIB_ENABLE)
NORMALIZE_BOOL(NGRAPH_DYNAMIC_COMPONENTS_ENABLE)
message(STATUS "NGRAPH_CXX_STANDARD: ${NGRAPH_CXX_STANDARD}")
message(STATUS "NGRAPH_UNIT_TEST_ENABLE: ${NGRAPH_UNIT_TEST_ENABLE}")
message(STATUS "NGRAPH_TOOLS_ENABLE: ${NGRAPH_TOOLS_ENABLE}")
message(STATUS "NGRAPH_CPU_ENABLE: ${NGRAPH_CPU_ENABLE}")
......
......@@ -20,8 +20,8 @@ set(MLIR_LLVM_REPO_URL https://github.com/llvm/llvm-project.git)
set(MLIR_REPO_URL https://github.com/tensorflow/mlir.git)
# Change these commit IDs to move to latest stable versions
set(MLIR_LLVM_COMMIT_ID 3caf9af)
set(MLIR_COMMIT_ID c636f12)
set(MLIR_LLVM_COMMIT_ID 3b9a27b)
set(MLIR_COMMIT_ID 0cdb20a)
set(MLIR_PROJECT_ROOT ${CMAKE_CURRENT_BINARY_DIR}/mlir_project)
set(MLIR_LLVM_ROOT ${MLIR_PROJECT_ROOT}/llvm-projects)
set(MLIR_SOURCE_DIR ${MLIR_LLVM_ROOT}/llvm/projects/mlir)
......
......@@ -45,7 +45,7 @@ ExternalProject_Add(
CMAKE_GENERATOR_PLATFORM ${CMAKE_GENERATOR_PLATFORM}
CMAKE_GENERATOR_TOOLSET ${CMAKE_GENERATOR_TOOLSET}
BUILD_COMMAND ${CMAKE_COMMAND} ../llvm -DLLVM_BUILD_EXAMPLES=ON -DLLVM_ENABLE_CXX1Y=Y -DLLVM_TARGETS_TO_BUILD=host -DLLVM_ENABLE_RTTI=ON -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
BUILD_COMMAND ${CMAKE_COMMAND} ../llvm -DLLVM_BUILD_EXAMPLES=ON -DLLVM_TARGETS_TO_BUILD=host -DLLVM_ENABLE_RTTI=ON -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
COMMAND ${CMAKE_COMMAND} --build . --target check-mlir -- -j8
INSTALL_COMMAND ""
UPDATE_COMMAND ""
......
......@@ -58,10 +58,10 @@
#include <mlir/Conversion/ControlFlowToCFG/ConvertControlFlowToCFG.h>
#include <mlir/Conversion/StandardToLLVM/ConvertStandardToLLVM.h>
#include <mlir/Conversion/StandardToLLVM/ConvertStandardToLLVMPass.h>
#include <mlir/Dialect/LLVMIR/LLVMDialect.h>
#include <mlir/ExecutionEngine/ExecutionEngine.h>
#include <mlir/ExecutionEngine/MemRefUtils.h>
#include <mlir/ExecutionEngine/OptUtils.h>
#include <mlir/LLVMIR/LLVMDialect.h>
#include <mlir/Pass/PassManager.h>
#include <mlir/Target/LLVMIR.h>
#include <mlir/Transforms/DialectConversion.h>
......@@ -75,7 +75,6 @@
using llvm::SmallVector;
using llvm::StringRef;
using llvm::make_unique;
using llvm::ArrayRef;
using namespace ngraph;
......@@ -225,7 +224,7 @@ void MLIRCompiler::build_ng_dialect_module()
}
// create builder
m_builder = llvm::make_unique<mlir::OpBuilder>(function.getBody());
m_builder = std::unique_ptr<mlir::OpBuilder>(new mlir::OpBuilder(function.getBody()));
build_ng_dialect();
m_module->push_back(function);
if (failed(m_module->verify()))
......@@ -398,7 +397,7 @@ void MLIRCompiler::optimize()
// optimizations. This is a temporary attempt to retrieve some target information by reusing
// LLVM TTI infra while MLIR does not have target model.
llvm::LLVMContext llvmContext;
auto module = make_unique<llvm::Module>("test", llvmContext);
auto module = std::unique_ptr<llvm::Module>(new llvm::Module("test", llvmContext));
module->setDataLayout(target_machine->createDataLayout());
auto ttiSetupFunc = llvm::cast<llvm::Function>(
module
......
......@@ -1038,8 +1038,8 @@ namespace
namespace mlir
{
Pass* createDialectLoweringPass(ngraph::runtime::ngmlir::MLIRCompiler* compiler)
std::unique_ptr<Pass> createDialectLoweringPass(ngraph::runtime::ngmlir::MLIRCompiler* compiler)
{
return new DialectLoweringPass(*compiler);
return std::make_unique<DialectLoweringPass>(*compiler);
}
}
} // namespace mlir
......@@ -36,5 +36,6 @@ namespace ngraph
namespace mlir
{
mlir::Pass* createDialectLoweringPass(ngraph::runtime::ngmlir::MLIRCompiler* compiler);
std::unique_ptr<Pass>
createDialectLoweringPass(ngraph::runtime::ngmlir::MLIRCompiler* compiler);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment