aboutsummaryrefslogtreecommitdiff
path: root/mlir
diff options
context:
space:
mode:
authorJacques Pienaar <jpienaar@google.com>2019-08-17 11:05:35 -0700
committerA. Unique TensorFlower <gardener@tensorflow.org>2019-08-17 11:06:03 -0700
commit79f53b0cf1fd204af0a09c8e085dd09a1ce0b6d9 (patch)
tree066738742712f75cc95b5ea30ae10d9a9c379d8b /mlir
parentdbf8538b64a61d0b93420b293b8508b158377757 (diff)
downloadllvm-79f53b0cf1fd204af0a09c8e085dd09a1ce0b6d9.zip
llvm-79f53b0cf1fd204af0a09c8e085dd09a1ce0b6d9.tar.gz
llvm-79f53b0cf1fd204af0a09c8e085dd09a1ce0b6d9.tar.bz2
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
Diffstat (limited to 'mlir')
-rw-r--r--mlir/examples/Linalg/Linalg3/lib/Transforms.cpp2
-rw-r--r--mlir/examples/toy/Ch1/include/toy/Parser.h40
-rw-r--r--mlir/examples/toy/Ch2/include/toy/Parser.h40
-rw-r--r--mlir/examples/toy/Ch2/mlir/MLIRGen.cpp4
-rw-r--r--mlir/examples/toy/Ch3/include/toy/Parser.h40
-rw-r--r--mlir/examples/toy/Ch3/mlir/MLIRGen.cpp4
-rw-r--r--mlir/examples/toy/Ch4/include/toy/Parser.h40
-rw-r--r--mlir/examples/toy/Ch4/mlir/MLIRGen.cpp4
-rw-r--r--mlir/examples/toy/Ch4/mlir/ShapeInferencePass.cpp2
-rw-r--r--mlir/examples/toy/Ch5/include/toy/Parser.h40
-rw-r--r--mlir/examples/toy/Ch5/mlir/EarlyLowering.cpp2
-rw-r--r--mlir/examples/toy/Ch5/mlir/LateLowering.cpp2
-rw-r--r--mlir/examples/toy/Ch5/mlir/MLIRGen.cpp4
-rw-r--r--mlir/examples/toy/Ch5/mlir/ShapeInferencePass.cpp2
-rw-r--r--mlir/g3doc/Tutorials/Toy/Ch-4.md2
-rw-r--r--mlir/include/mlir/Conversion/StandardToLLVM/ConvertStandardToLLVMPass.h2
-rw-r--r--mlir/include/mlir/IR/Dialect.h2
-rw-r--r--mlir/include/mlir/IR/PatternMatch.h2
-rw-r--r--mlir/include/mlir/Pass/AnalysisManager.h2
-rw-r--r--mlir/include/mlir/Pass/Pass.h2
-rw-r--r--mlir/include/mlir/Pass/PassRegistry.h2
-rw-r--r--mlir/include/mlir/Quantizer/Support/ConstraintAnalysisGraph.h6
-rw-r--r--mlir/lib/Analysis/AffineStructures.cpp2
-rw-r--r--mlir/lib/Analysis/Dominance.cpp2
-rw-r--r--mlir/lib/Analysis/Utils.cpp2
-rw-r--r--mlir/lib/Conversion/GPUToCUDA/ConvertKernelFuncToCubin.cpp4
-rw-r--r--mlir/lib/Conversion/GPUToCUDA/ConvertLaunchFuncToCudaCalls.cpp2
-rw-r--r--mlir/lib/Conversion/GPUToCUDA/GenerateCubinAccessors.cpp2
-rw-r--r--mlir/lib/Conversion/GPUToNVVM/LowerGpuOpsToNVVMOps.cpp2
-rw-r--r--mlir/lib/Conversion/LoopsToGPU/LoopsToGPUPass.cpp6
-rw-r--r--mlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp8
-rw-r--r--mlir/lib/Conversion/StandardToSPIRV/ConvertStandardToSPIRVPass.cpp2
-rw-r--r--mlir/lib/Dialect/GPU/Transforms/KernelOutlining.cpp2
-rw-r--r--mlir/lib/Dialect/QuantOps/Transforms/ConvertConst.cpp2
-rw-r--r--mlir/lib/Dialect/QuantOps/Transforms/ConvertSimQuant.cpp2
-rw-r--r--mlir/lib/ExecutionEngine/ExecutionEngine.cpp12
-rw-r--r--mlir/lib/IR/Diagnostics.cpp2
-rw-r--r--mlir/lib/Linalg/Transforms/Fusion.cpp4
-rw-r--r--mlir/lib/Linalg/Transforms/LowerToLLVMDialect.cpp2
-rw-r--r--mlir/lib/Linalg/Transforms/LowerToLoops.cpp2
-rw-r--r--mlir/lib/Linalg/Transforms/Tiling.cpp4
-rw-r--r--mlir/lib/Pass/Pass.cpp8
-rw-r--r--mlir/lib/Quantizer/Configurations/FxpMathConfig.cpp2
-rw-r--r--mlir/lib/Quantizer/Support/ConstraintAnalysisGraph.cpp4
-rw-r--r--mlir/lib/Quantizer/Transforms/AddDefaultStatsTestPass.cpp2
-rw-r--r--mlir/lib/Quantizer/Transforms/InferQuantizedTypesPass.cpp2
-rw-r--r--mlir/lib/Quantizer/Transforms/RemoveInstrumentationPass.cpp2
-rw-r--r--mlir/lib/Support/FileUtilities.cpp4
-rw-r--r--mlir/lib/TableGen/Pattern.cpp2
-rw-r--r--mlir/lib/Transforms/AffineDataCopyGeneration.cpp4
-rw-r--r--mlir/lib/Transforms/CSE.cpp6
-rw-r--r--mlir/lib/Transforms/Canonicalizer.cpp2
-rw-r--r--mlir/lib/Transforms/LoopCoalescing.cpp2
-rw-r--r--mlir/lib/Transforms/LoopFusion.cpp4
-rw-r--r--mlir/lib/Transforms/LoopInvariantCodeMotion.cpp2
-rw-r--r--mlir/lib/Transforms/LoopTiling.cpp2
-rw-r--r--mlir/lib/Transforms/LoopUnroll.cpp2
-rw-r--r--mlir/lib/Transforms/LoopUnrollAndJam.cpp2
-rw-r--r--mlir/lib/Transforms/LowerAffine.cpp2
-rw-r--r--mlir/lib/Transforms/LowerVectorTransfers.cpp2
-rw-r--r--mlir/lib/Transforms/MaterializeVectors.cpp2
-rw-r--r--mlir/lib/Transforms/MemRefDataFlowOpt.cpp2
-rw-r--r--mlir/lib/Transforms/PipelineDataTransfer.cpp2
-rw-r--r--mlir/lib/Transforms/SimplifyAffineStructures.cpp2
-rw-r--r--mlir/lib/Transforms/StripDebugInfo.cpp2
-rw-r--r--mlir/lib/Transforms/Utils/Utils.cpp4
-rw-r--r--mlir/lib/Transforms/Vectorize.cpp2
-rw-r--r--mlir/test/lib/TestDialect/TestPatterns.cpp2
-rw-r--r--mlir/test/lib/Transforms/TestConstantFold.cpp2
-rw-r--r--mlir/test/lib/Transforms/TestLoopFusion.cpp2
-rw-r--r--mlir/test/lib/Transforms/TestLoopMapping.cpp2
-rw-r--r--mlir/test/lib/Transforms/TestLoopParametricTiling.cpp4
-rw-r--r--mlir/test/lib/Transforms/TestVectorizationUtils.cpp2
-rw-r--r--mlir/tools/mlir-cuda-runner/mlir-cuda-runner.cpp4
74 files changed, 195 insertions, 205 deletions
diff --git a/mlir/examples/Linalg/Linalg3/lib/Transforms.cpp b/mlir/examples/Linalg/Linalg3/lib/Transforms.cpp
index 79fa4ca..8731138 100644
--- a/mlir/examples/Linalg/Linalg3/lib/Transforms.cpp
+++ b/mlir/examples/Linalg/Linalg3/lib/Transforms.cpp
@@ -301,5 +301,5 @@ Rewriter<linalg::StoreOp>::matchAndRewrite(linalg::StoreOp store,
} // namespace
std::unique_ptr<FunctionPassBase> linalg::createLowerLinalgLoadStorePass() {
- return llvm::make_unique<LowerLinalgLoadStorePass>();
+ return std::make_unique<LowerLinalgLoadStorePass>();
}
diff --git a/mlir/examples/toy/Ch1/include/toy/Parser.h b/mlir/examples/toy/Ch1/include/toy/Parser.h
index bc7aa52..75c660b 100644
--- a/mlir/examples/toy/Ch1/include/toy/Parser.h
+++ b/mlir/examples/toy/Ch1/include/toy/Parser.h
@@ -62,7 +62,7 @@ public:
if (lexer.getCurToken() != tok_eof)
return parseError<ModuleAST>("nothing", "at end of module");
- return llvm::make_unique<ModuleAST>(std::move(functions));
+ return std::make_unique<ModuleAST>(std::move(functions));
}
private:
@@ -81,7 +81,7 @@ private:
if (!expr)
return nullptr;
}
- return llvm::make_unique<ReturnExprAST>(std::move(loc), std::move(expr));
+ return std::make_unique<ReturnExprAST>(std::move(loc), std::move(expr));
}
/// Parse a literal number.
@@ -89,7 +89,7 @@ private:
std::unique_ptr<ExprAST> ParseNumberExpr() {
auto loc = lexer.getLastLocation();
auto Result =
- llvm::make_unique<NumberExprAST>(std::move(loc), lexer.getValue());
+ std::make_unique<NumberExprAST>(std::move(loc), lexer.getValue());
lexer.consume(tok_number);
return std::move(Result);
}
@@ -157,8 +157,8 @@ private:
"inside literal expession");
}
}
- return llvm::make_unique<LiteralExprAST>(std::move(loc), std::move(values),
- std::move(dims));
+ return std::make_unique<LiteralExprAST>(std::move(loc), std::move(values),
+ std::move(dims));
}
/// parenexpr ::= '(' expression ')'
@@ -184,7 +184,7 @@ private:
lexer.getNextToken(); // eat identifier.
if (lexer.getCurToken() != '(') // Simple variable ref.
- return llvm::make_unique<VariableExprAST>(std::move(loc), name);
+ return std::make_unique<VariableExprAST>(std::move(loc), name);
// This is a function call.
lexer.consume(Token('('));
@@ -211,13 +211,11 @@ private:
if (Args.size() != 1)
return parseError<ExprAST>("<single arg>", "as argument to print()");
- return llvm::make_unique<PrintExprAST>(std::move(loc),
- std::move(Args[0]));
+ return std::make_unique<PrintExprAST>(std::move(loc), std::move(Args[0]));
}
// Call to a user-defined function
- return llvm::make_unique<CallExprAST>(std::move(loc), name,
- std::move(Args));
+ return std::make_unique<CallExprAST>(std::move(loc), name, std::move(Args));
}
/// primary
@@ -281,8 +279,8 @@ private:
}
// Merge LHS/RHS.
- LHS = llvm::make_unique<BinaryExprAST>(std::move(loc), BinOp,
- std::move(LHS), std::move(RHS));
+ LHS = std::make_unique<BinaryExprAST>(std::move(loc), BinOp,
+ std::move(LHS), std::move(RHS));
}
}
@@ -302,7 +300,7 @@ private:
return parseError<VarType>("<", "to begin type");
lexer.getNextToken(); // eat <
- auto type = llvm::make_unique<VarType>();
+ auto type = std::make_unique<VarType>();
while (lexer.getCurToken() == tok_number) {
type->shape.push_back(lexer.getValue());
@@ -341,11 +339,11 @@ private:
}
if (!type)
- type = llvm::make_unique<VarType>();
+ type = std::make_unique<VarType>();
lexer.consume(Token('='));
auto expr = ParseExpression();
- return llvm::make_unique<VarDeclExprAST>(std::move(loc), std::move(id),
- std::move(*type), std::move(expr));
+ return std::make_unique<VarDeclExprAST>(std::move(loc), std::move(id),
+ std::move(*type), std::move(expr));
}
/// Parse a block: a list of expression separated by semicolons and wrapped in
@@ -359,7 +357,7 @@ private:
return parseError<ExprASTList>("{", "to begin block");
lexer.consume(Token('{'));
- auto exprList = llvm::make_unique<ExprASTList>();
+ auto exprList = std::make_unique<ExprASTList>();
// Ignore empty expressions: swallow sequences of semicolons.
while (lexer.getCurToken() == ';')
@@ -422,7 +420,7 @@ private:
std::string name = lexer.getId();
auto loc = lexer.getLastLocation();
lexer.consume(tok_identifier);
- auto decl = llvm::make_unique<VariableExprAST>(std::move(loc), name);
+ auto decl = std::make_unique<VariableExprAST>(std::move(loc), name);
args.push_back(std::move(decl));
if (lexer.getCurToken() != ',')
break;
@@ -437,8 +435,8 @@ private:
// success.
lexer.consume(Token(')'));
- return llvm::make_unique<PrototypeAST>(std::move(loc), FnName,
- std::move(args));
+ return std::make_unique<PrototypeAST>(std::move(loc), FnName,
+ std::move(args));
}
/// Parse a function definition, we expect a prototype initiated with the
@@ -451,7 +449,7 @@ private:
return nullptr;
if (auto block = ParseBlock())
- return llvm::make_unique<FunctionAST>(std::move(Proto), std::move(block));
+ return std::make_unique<FunctionAST>(std::move(Proto), std::move(block));
return nullptr;
}
diff --git a/mlir/examples/toy/Ch2/include/toy/Parser.h b/mlir/examples/toy/Ch2/include/toy/Parser.h
index bc7aa52..75c660b 100644
--- a/mlir/examples/toy/Ch2/include/toy/Parser.h
+++ b/mlir/examples/toy/Ch2/include/toy/Parser.h
@@ -62,7 +62,7 @@ public:
if (lexer.getCurToken() != tok_eof)
return parseError<ModuleAST>("nothing", "at end of module");
- return llvm::make_unique<ModuleAST>(std::move(functions));
+ return std::make_unique<ModuleAST>(std::move(functions));
}
private:
@@ -81,7 +81,7 @@ private:
if (!expr)
return nullptr;
}
- return llvm::make_unique<ReturnExprAST>(std::move(loc), std::move(expr));
+ return std::make_unique<ReturnExprAST>(std::move(loc), std::move(expr));
}
/// Parse a literal number.
@@ -89,7 +89,7 @@ private:
std::unique_ptr<ExprAST> ParseNumberExpr() {
auto loc = lexer.getLastLocation();
auto Result =
- llvm::make_unique<NumberExprAST>(std::move(loc), lexer.getValue());
+ std::make_unique<NumberExprAST>(std::move(loc), lexer.getValue());
lexer.consume(tok_number);
return std::move(Result);
}
@@ -157,8 +157,8 @@ private:
"inside literal expession");
}
}
- return llvm::make_unique<LiteralExprAST>(std::move(loc), std::move(values),
- std::move(dims));
+ return std::make_unique<LiteralExprAST>(std::move(loc), std::move(values),
+ std::move(dims));
}
/// parenexpr ::= '(' expression ')'
@@ -184,7 +184,7 @@ private:
lexer.getNextToken(); // eat identifier.
if (lexer.getCurToken() != '(') // Simple variable ref.
- return llvm::make_unique<VariableExprAST>(std::move(loc), name);
+ return std::make_unique<VariableExprAST>(std::move(loc), name);
// This is a function call.
lexer.consume(Token('('));
@@ -211,13 +211,11 @@ private:
if (Args.size() != 1)
return parseError<ExprAST>("<single arg>", "as argument to print()");
- return llvm::make_unique<PrintExprAST>(std::move(loc),
- std::move(Args[0]));
+ return std::make_unique<PrintExprAST>(std::move(loc), std::move(Args[0]));
}
// Call to a user-defined function
- return llvm::make_unique<CallExprAST>(std::move(loc), name,
- std::move(Args));
+ return std::make_unique<CallExprAST>(std::move(loc), name, std::move(Args));
}
/// primary
@@ -281,8 +279,8 @@ private:
}
// Merge LHS/RHS.
- LHS = llvm::make_unique<BinaryExprAST>(std::move(loc), BinOp,
- std::move(LHS), std::move(RHS));
+ LHS = std::make_unique<BinaryExprAST>(std::move(loc), BinOp,
+ std::move(LHS), std::move(RHS));
}
}
@@ -302,7 +300,7 @@ private:
return parseError<VarType>("<", "to begin type");
lexer.getNextToken(); // eat <
- auto type = llvm::make_unique<VarType>();
+ auto type = std::make_unique<VarType>();
while (lexer.getCurToken() == tok_number) {
type->shape.push_back(lexer.getValue());
@@ -341,11 +339,11 @@ private:
}
if (!type)
- type = llvm::make_unique<VarType>();
+ type = std::make_unique<VarType>();
lexer.consume(Token('='));
auto expr = ParseExpression();
- return llvm::make_unique<VarDeclExprAST>(std::move(loc), std::move(id),
- std::move(*type), std::move(expr));
+ return std::make_unique<VarDeclExprAST>(std::move(loc), std::move(id),
+ std::move(*type), std::move(expr));
}
/// Parse a block: a list of expression separated by semicolons and wrapped in
@@ -359,7 +357,7 @@ private:
return parseError<ExprASTList>("{", "to begin block");
lexer.consume(Token('{'));
- auto exprList = llvm::make_unique<ExprASTList>();
+ auto exprList = std::make_unique<ExprASTList>();
// Ignore empty expressions: swallow sequences of semicolons.
while (lexer.getCurToken() == ';')
@@ -422,7 +420,7 @@ private:
std::string name = lexer.getId();
auto loc = lexer.getLastLocation();
lexer.consume(tok_identifier);
- auto decl = llvm::make_unique<VariableExprAST>(std::move(loc), name);
+ auto decl = std::make_unique<VariableExprAST>(std::move(loc), name);
args.push_back(std::move(decl));
if (lexer.getCurToken() != ',')
break;
@@ -437,8 +435,8 @@ private:
// success.
lexer.consume(Token(')'));
- return llvm::make_unique<PrototypeAST>(std::move(loc), FnName,
- std::move(args));
+ return std::make_unique<PrototypeAST>(std::move(loc), FnName,
+ std::move(args));
}
/// Parse a function definition, we expect a prototype initiated with the
@@ -451,7 +449,7 @@ private:
return nullptr;
if (auto block = ParseBlock())
- return llvm::make_unique<FunctionAST>(std::move(Proto), std::move(block));
+ return std::make_unique<FunctionAST>(std::move(Proto), std::move(block));
return nullptr;
}
diff --git a/mlir/examples/toy/Ch2/mlir/MLIRGen.cpp b/mlir/examples/toy/Ch2/mlir/MLIRGen.cpp
index 7b874b9..c09c4ad 100644
--- a/mlir/examples/toy/Ch2/mlir/MLIRGen.cpp
+++ b/mlir/examples/toy/Ch2/mlir/MLIRGen.cpp
@@ -43,11 +43,11 @@ using namespace toy;
using llvm::cast;
using llvm::dyn_cast;
using llvm::isa;
-using llvm::make_unique;
using llvm::ScopedHashTableScope;
using llvm::SmallVector;
using llvm::StringRef;
using llvm::Twine;
+using std::make_unique;
namespace {
@@ -172,7 +172,7 @@ private:
// Create a builder for the function, it will be used throughout the codegen
// to create operations in this function.
- builder = llvm::make_unique<mlir::OpBuilder>(function.getBody());
+ builder = std::make_unique<mlir::OpBuilder>(function.getBody());
// Emit the body of the function.
if (!mlirGen(*funcAST.getBody())) {
diff --git a/mlir/examples/toy/Ch3/include/toy/Parser.h b/mlir/examples/toy/Ch3/include/toy/Parser.h
index bc7aa52..75c660b 100644
--- a/mlir/examples/toy/Ch3/include/toy/Parser.h
+++ b/mlir/examples/toy/Ch3/include/toy/Parser.h
@@ -62,7 +62,7 @@ public:
if (lexer.getCurToken() != tok_eof)
return parseError<ModuleAST>("nothing", "at end of module");
- return llvm::make_unique<ModuleAST>(std::move(functions));
+ return std::make_unique<ModuleAST>(std::move(functions));
}
private:
@@ -81,7 +81,7 @@ private:
if (!expr)
return nullptr;
}
- return llvm::make_unique<ReturnExprAST>(std::move(loc), std::move(expr));
+ return std::make_unique<ReturnExprAST>(std::move(loc), std::move(expr));
}
/// Parse a literal number.
@@ -89,7 +89,7 @@ private:
std::unique_ptr<ExprAST> ParseNumberExpr() {
auto loc = lexer.getLastLocation();
auto Result =
- llvm::make_unique<NumberExprAST>(std::move(loc), lexer.getValue());
+ std::make_unique<NumberExprAST>(std::move(loc), lexer.getValue());
lexer.consume(tok_number);
return std::move(Result);
}
@@ -157,8 +157,8 @@ private:
"inside literal expession");
}
}
- return llvm::make_unique<LiteralExprAST>(std::move(loc), std::move(values),
- std::move(dims));
+ return std::make_unique<LiteralExprAST>(std::move(loc), std::move(values),
+ std::move(dims));
}
/// parenexpr ::= '(' expression ')'
@@ -184,7 +184,7 @@ private:
lexer.getNextToken(); // eat identifier.
if (lexer.getCurToken() != '(') // Simple variable ref.
- return llvm::make_unique<VariableExprAST>(std::move(loc), name);
+ return std::make_unique<VariableExprAST>(std::move(loc), name);
// This is a function call.
lexer.consume(Token('('));
@@ -211,13 +211,11 @@ private:
if (Args.size() != 1)
return parseError<ExprAST>("<single arg>", "as argument to print()");
- return llvm::make_unique<PrintExprAST>(std::move(loc),
- std::move(Args[0]));
+ return std::make_unique<PrintExprAST>(std::move(loc), std::move(Args[0]));
}
// Call to a user-defined function
- return llvm::make_unique<CallExprAST>(std::move(loc), name,
- std::move(Args));
+ return std::make_unique<CallExprAST>(std::move(loc), name, std::move(Args));
}
/// primary
@@ -281,8 +279,8 @@ private:
}
// Merge LHS/RHS.
- LHS = llvm::make_unique<BinaryExprAST>(std::move(loc), BinOp,
- std::move(LHS), std::move(RHS));
+ LHS = std::make_unique<BinaryExprAST>(std::move(loc), BinOp,
+ std::move(LHS), std::move(RHS));
}
}
@@ -302,7 +300,7 @@ private:
return parseError<VarType>("<", "to begin type");
lexer.getNextToken(); // eat <
- auto type = llvm::make_unique<VarType>();
+ auto type = std::make_unique<VarType>();
while (lexer.getCurToken() == tok_number) {
type->shape.push_back(lexer.getValue());
@@ -341,11 +339,11 @@ private:
}
if (!type)
- type = llvm::make_unique<VarType>();
+ type = std::make_unique<VarType>();
lexer.consume(Token('='));
auto expr = ParseExpression();
- return llvm::make_unique<VarDeclExprAST>(std::move(loc), std::move(id),
- std::move(*type), std::move(expr));
+ return std::make_unique<VarDeclExprAST>(std::move(loc), std::move(id),
+ std::move(*type), std::move(expr));
}
/// Parse a block: a list of expression separated by semicolons and wrapped in
@@ -359,7 +357,7 @@ private:
return parseError<ExprASTList>("{", "to begin block");
lexer.consume(Token('{'));
- auto exprList = llvm::make_unique<ExprASTList>();
+ auto exprList = std::make_unique<ExprASTList>();
// Ignore empty expressions: swallow sequences of semicolons.
while (lexer.getCurToken() == ';')
@@ -422,7 +420,7 @@ private:
std::string name = lexer.getId();
auto loc = lexer.getLastLocation();
lexer.consume(tok_identifier);
- auto decl = llvm::make_unique<VariableExprAST>(std::move(loc), name);
+ auto decl = std::make_unique<VariableExprAST>(std::move(loc), name);
args.push_back(std::move(decl));
if (lexer.getCurToken() != ',')
break;
@@ -437,8 +435,8 @@ private:
// success.
lexer.consume(Token(')'));
- return llvm::make_unique<PrototypeAST>(std::move(loc), FnName,
- std::move(args));
+ return std::make_unique<PrototypeAST>(std::move(loc), FnName,
+ std::move(args));
}
/// Parse a function definition, we expect a prototype initiated with the
@@ -451,7 +449,7 @@ private:
return nullptr;
if (auto block = ParseBlock())
- return llvm::make_unique<FunctionAST>(std::move(Proto), std::move(block));
+ return std::make_unique<FunctionAST>(std::move(Proto), std::move(block));
return nullptr;
}
diff --git a/mlir/examples/toy/Ch3/mlir/MLIRGen.cpp b/mlir/examples/toy/Ch3/mlir/MLIRGen.cpp
index e3b06a7..b3ba2f9 100644
--- a/mlir/examples/toy/Ch3/mlir/MLIRGen.cpp
+++ b/mlir/examples/toy/Ch3/mlir/MLIRGen.cpp
@@ -44,11 +44,11 @@ using namespace toy;
using llvm::cast;
using llvm::dyn_cast;
using llvm::isa;
-using llvm::make_unique;
using llvm::ScopedHashTableScope;
using llvm::SmallVector;
using llvm::StringRef;
using llvm::Twine;
+using std::make_unique;
namespace {
@@ -173,7 +173,7 @@ private:
// Create a builder for the function, it will be used throughout the codegen
// to create operations in this function.
- builder = llvm::make_unique<mlir::OpBuilder>(function.getBody());
+ builder = std::make_unique<mlir::OpBuilder>(function.getBody());
// Emit the body of the function.
if (!mlirGen(*funcAST.getBody())) {
diff --git a/mlir/examples/toy/Ch4/include/toy/Parser.h b/mlir/examples/toy/Ch4/include/toy/Parser.h
index bc7aa52..75c660b 100644
--- a/mlir/examples/toy/Ch4/include/toy/Parser.h
+++ b/mlir/examples/toy/Ch4/include/toy/Parser.h
@@ -62,7 +62,7 @@ public:
if (lexer.getCurToken() != tok_eof)
return parseError<ModuleAST>("nothing", "at end of module");
- return llvm::make_unique<ModuleAST>(std::move(functions));
+ return std::make_unique<ModuleAST>(std::move(functions));
}
private:
@@ -81,7 +81,7 @@ private:
if (!expr)
return nullptr;
}
- return llvm::make_unique<ReturnExprAST>(std::move(loc), std::move(expr));
+ return std::make_unique<ReturnExprAST>(std::move(loc), std::move(expr));
}
/// Parse a literal number.
@@ -89,7 +89,7 @@ private:
std::unique_ptr<ExprAST> ParseNumberExpr() {
auto loc = lexer.getLastLocation();
auto Result =
- llvm::make_unique<NumberExprAST>(std::move(loc), lexer.getValue());
+ std::make_unique<NumberExprAST>(std::move(loc), lexer.getValue());
lexer.consume(tok_number);
return std::move(Result);
}
@@ -157,8 +157,8 @@ private:
"inside literal expession");
}
}
- return llvm::make_unique<LiteralExprAST>(std::move(loc), std::move(values),
- std::move(dims));
+ return std::make_unique<LiteralExprAST>(std::move(loc), std::move(values),
+ std::move(dims));
}
/// parenexpr ::= '(' expression ')'
@@ -184,7 +184,7 @@ private:
lexer.getNextToken(); // eat identifier.
if (lexer.getCurToken() != '(') // Simple variable ref.
- return llvm::make_unique<VariableExprAST>(std::move(loc), name);
+ return std::make_unique<VariableExprAST>(std::move(loc), name);
// This is a function call.
lexer.consume(Token('('));
@@ -211,13 +211,11 @@ private:
if (Args.size() != 1)
return parseError<ExprAST>("<single arg>", "as argument to print()");
- return llvm::make_unique<PrintExprAST>(std::move(loc),
- std::move(Args[0]));
+ return std::make_unique<PrintExprAST>(std::move(loc), std::move(Args[0]));
}
// Call to a user-defined function
- return llvm::make_unique<CallExprAST>(std::move(loc), name,
- std::move(Args));
+ return std::make_unique<CallExprAST>(std::move(loc), name, std::move(Args));
}
/// primary
@@ -281,8 +279,8 @@ private:
}
// Merge LHS/RHS.
- LHS = llvm::make_unique<BinaryExprAST>(std::move(loc), BinOp,
- std::move(LHS), std::move(RHS));
+ LHS = std::make_unique<BinaryExprAST>(std::move(loc), BinOp,
+ std::move(LHS), std::move(RHS));
}
}
@@ -302,7 +300,7 @@ private:
return parseError<VarType>("<", "to begin type");
lexer.getNextToken(); // eat <
- auto type = llvm::make_unique<VarType>();
+ auto type = std::make_unique<VarType>();
while (lexer.getCurToken() == tok_number) {
type->shape.push_back(lexer.getValue());
@@ -341,11 +339,11 @@ private:
}
if (!type)
- type = llvm::make_unique<VarType>();
+ type = std::make_unique<VarType>();
lexer.consume(Token('='));
auto expr = ParseExpression();
- return llvm::make_unique<VarDeclExprAST>(std::move(loc), std::move(id),
- std::move(*type), std::move(expr));
+ return std::make_unique<VarDeclExprAST>(std::move(loc), std::move(id),
+ std::move(*type), std::move(expr));
}
/// Parse a block: a list of expression separated by semicolons and wrapped in
@@ -359,7 +357,7 @@ private:
return parseError<ExprASTList>("{", "to begin block");
lexer.consume(Token('{'));
- auto exprList = llvm::make_unique<ExprASTList>();
+ auto exprList = std::make_unique<ExprASTList>();
// Ignore empty expressions: swallow sequences of semicolons.
while (lexer.getCurToken() == ';')
@@ -422,7 +420,7 @@ private:
std::string name = lexer.getId();
auto loc = lexer.getLastLocation();
lexer.consume(tok_identifier);
- auto decl = llvm::make_unique<VariableExprAST>(std::move(loc), name);
+ auto decl = std::make_unique<VariableExprAST>(std::move(loc), name);
args.push_back(std::move(decl));
if (lexer.getCurToken() != ',')
break;
@@ -437,8 +435,8 @@ private:
// success.
lexer.consume(Token(')'));
- return llvm::make_unique<PrototypeAST>(std::move(loc), FnName,
- std::move(args));
+ return std::make_unique<PrototypeAST>(std::move(loc), FnName,
+ std::move(args));
}
/// Parse a function definition, we expect a prototype initiated with the
@@ -451,7 +449,7 @@ private:
return nullptr;
if (auto block = ParseBlock())
- return llvm::make_unique<FunctionAST>(std::move(Proto), std::move(block));
+ return std::make_unique<FunctionAST>(std::move(Proto), std::move(block));
return nullptr;
}
diff --git a/mlir/examples/toy/Ch4/mlir/MLIRGen.cpp b/mlir/examples/toy/Ch4/mlir/MLIRGen.cpp
index e61d1aa..fd385a470 100644
--- a/mlir/examples/toy/Ch4/mlir/MLIRGen.cpp
+++ b/mlir/examples/toy/Ch4/mlir/MLIRGen.cpp
@@ -44,11 +44,11 @@ using namespace toy;
using llvm::cast;
using llvm::dyn_cast;
using llvm::isa;
-using llvm::make_unique;
using llvm::ScopedHashTableScope;
using llvm::SmallVector;
using llvm::StringRef;
using llvm::Twine;
+using std::make_unique;
namespace {
@@ -173,7 +173,7 @@ private:
// Create a builder for the function, it will be used throughout the codegen
// to create operations in this function.
- builder = llvm::make_unique<mlir::OpBuilder>(function.getBody());
+ builder = std::make_unique<mlir::OpBuilder>(function.getBody());
// Emit the body of the function.
if (!mlirGen(*funcAST.getBody())) {
diff --git a/mlir/examples/toy/Ch4/mlir/ShapeInferencePass.cpp b/mlir/examples/toy/Ch4/mlir/ShapeInferencePass.cpp
index 4a6bf87..793f153 100644
--- a/mlir/examples/toy/Ch4/mlir/ShapeInferencePass.cpp
+++ b/mlir/examples/toy/Ch4/mlir/ShapeInferencePass.cpp
@@ -376,6 +376,6 @@ public:
namespace toy {
std::unique_ptr<mlir::Pass> createShapeInferencePass() {
- return llvm::make_unique<ShapeInferencePass>();
+ return std::make_unique<ShapeInferencePass>();
}
} // namespace toy
diff --git a/mlir/examples/toy/Ch5/include/toy/Parser.h b/mlir/examples/toy/Ch5/include/toy/Parser.h
index bc7aa52..75c660b 100644
--- a/mlir/examples/toy/Ch5/include/toy/Parser.h
+++ b/mlir/examples/toy/Ch5/include/toy/Parser.h
@@ -62,7 +62,7 @@ public:
if (lexer.getCurToken() != tok_eof)
return parseError<ModuleAST>("nothing", "at end of module");
- return llvm::make_unique<ModuleAST>(std::move(functions));
+ return std::make_unique<ModuleAST>(std::move(functions));
}
private:
@@ -81,7 +81,7 @@ private:
if (!expr)
return nullptr;
}
- return llvm::make_unique<ReturnExprAST>(std::move(loc), std::move(expr));
+ return std::make_unique<ReturnExprAST>(std::move(loc), std::move(expr));
}
/// Parse a literal number.
@@ -89,7 +89,7 @@ private:
std::unique_ptr<ExprAST> ParseNumberExpr() {
auto loc = lexer.getLastLocation();
auto Result =
- llvm::make_unique<NumberExprAST>(std::move(loc), lexer.getValue());
+ std::make_unique<NumberExprAST>(std::move(loc), lexer.getValue());
lexer.consume(tok_number);
return std::move(Result);
}
@@ -157,8 +157,8 @@ private:
"inside literal expession");
}
}
- return llvm::make_unique<LiteralExprAST>(std::move(loc), std::move(values),
- std::move(dims));
+ return std::make_unique<LiteralExprAST>(std::move(loc), std::move(values),
+ std::move(dims));
}
/// parenexpr ::= '(' expression ')'
@@ -184,7 +184,7 @@ private:
lexer.getNextToken(); // eat identifier.
if (lexer.getCurToken() != '(') // Simple variable ref.
- return llvm::make_unique<VariableExprAST>(std::move(loc), name);
+ return std::make_unique<VariableExprAST>(std::move(loc), name);
// This is a function call.
lexer.consume(Token('('));
@@ -211,13 +211,11 @@ private:
if (Args.size() != 1)
return parseError<ExprAST>("<single arg>", "as argument to print()");
- return llvm::make_unique<PrintExprAST>(std::move(loc),
- std::move(Args[0]));
+ return std::make_unique<PrintExprAST>(std::move(loc), std::move(Args[0]));
}
// Call to a user-defined function
- return llvm::make_unique<CallExprAST>(std::move(loc), name,
- std::move(Args));
+ return std::make_unique<CallExprAST>(std::move(loc), name, std::move(Args));
}
/// primary
@@ -281,8 +279,8 @@ private:
}
// Merge LHS/RHS.
- LHS = llvm::make_unique<BinaryExprAST>(std::move(loc), BinOp,
- std::move(LHS), std::move(RHS));
+ LHS = std::make_unique<BinaryExprAST>(std::move(loc), BinOp,
+ std::move(LHS), std::move(RHS));
}
}
@@ -302,7 +300,7 @@ private:
return parseError<VarType>("<", "to begin type");
lexer.getNextToken(); // eat <
- auto type = llvm::make_unique<VarType>();
+ auto type = std::make_unique<VarType>();
while (lexer.getCurToken() == tok_number) {
type->shape.push_back(lexer.getValue());
@@ -341,11 +339,11 @@ private:
}
if (!type)
- type = llvm::make_unique<VarType>();
+ type = std::make_unique<VarType>();
lexer.consume(Token('='));
auto expr = ParseExpression();
- return llvm::make_unique<VarDeclExprAST>(std::move(loc), std::move(id),
- std::move(*type), std::move(expr));
+ return std::make_unique<VarDeclExprAST>(std::move(loc), std::move(id),
+ std::move(*type), std::move(expr));
}
/// Parse a block: a list of expression separated by semicolons and wrapped in
@@ -359,7 +357,7 @@ private:
return parseError<ExprASTList>("{", "to begin block");
lexer.consume(Token('{'));
- auto exprList = llvm::make_unique<ExprASTList>();
+ auto exprList = std::make_unique<ExprASTList>();
// Ignore empty expressions: swallow sequences of semicolons.
while (lexer.getCurToken() == ';')
@@ -422,7 +420,7 @@ private:
std::string name = lexer.getId();
auto loc = lexer.getLastLocation();
lexer.consume(tok_identifier);
- auto decl = llvm::make_unique<VariableExprAST>(std::move(loc), name);
+ auto decl = std::make_unique<VariableExprAST>(std::move(loc), name);
args.push_back(std::move(decl));
if (lexer.getCurToken() != ',')
break;
@@ -437,8 +435,8 @@ private:
// success.
lexer.consume(Token(')'));
- return llvm::make_unique<PrototypeAST>(std::move(loc), FnName,
- std::move(args));
+ return std::make_unique<PrototypeAST>(std::move(loc), FnName,
+ std::move(args));
}
/// Parse a function definition, we expect a prototype initiated with the
@@ -451,7 +449,7 @@ private:
return nullptr;
if (auto block = ParseBlock())
- return llvm::make_unique<FunctionAST>(std::move(Proto), std::move(block));
+ return std::make_unique<FunctionAST>(std::move(Proto), std::move(block));
return nullptr;
}
diff --git a/mlir/examples/toy/Ch5/mlir/EarlyLowering.cpp b/mlir/examples/toy/Ch5/mlir/EarlyLowering.cpp
index 96230fd..c55a0db 100644
--- a/mlir/examples/toy/Ch5/mlir/EarlyLowering.cpp
+++ b/mlir/examples/toy/Ch5/mlir/EarlyLowering.cpp
@@ -143,6 +143,6 @@ struct EarlyLoweringPass : public FunctionPass<EarlyLoweringPass> {
namespace toy {
std::unique_ptr<mlir::Pass> createEarlyLoweringPass() {
- return llvm::make_unique<EarlyLoweringPass>();
+ return std::make_unique<EarlyLoweringPass>();
}
} // namespace toy
diff --git a/mlir/examples/toy/Ch5/mlir/LateLowering.cpp b/mlir/examples/toy/Ch5/mlir/LateLowering.cpp
index 29d83ae..8146e76 100644
--- a/mlir/examples/toy/Ch5/mlir/LateLowering.cpp
+++ b/mlir/examples/toy/Ch5/mlir/LateLowering.cpp
@@ -455,6 +455,6 @@ struct LateLoweringPass : public ModulePass<LateLoweringPass> {
namespace toy {
std::unique_ptr<mlir::Pass> createLateLoweringPass() {
- return llvm::make_unique<LateLoweringPass>();
+ return std::make_unique<LateLoweringPass>();
}
} // namespace toy
diff --git a/mlir/examples/toy/Ch5/mlir/MLIRGen.cpp b/mlir/examples/toy/Ch5/mlir/MLIRGen.cpp
index 8d7d169..88fb9504 100644
--- a/mlir/examples/toy/Ch5/mlir/MLIRGen.cpp
+++ b/mlir/examples/toy/Ch5/mlir/MLIRGen.cpp
@@ -44,11 +44,11 @@ using namespace toy;
using llvm::cast;
using llvm::dyn_cast;
using llvm::isa;
-using llvm::make_unique;
using llvm::ScopedHashTableScope;
using llvm::SmallVector;
using llvm::StringRef;
using llvm::Twine;
+using std::make_unique;
namespace {
@@ -173,7 +173,7 @@ private:
// Create a builder for the function, it will be used throughout the codegen
// to create operations in this function.
- builder = llvm::make_unique<mlir::OpBuilder>(function.getBody());
+ builder = std::make_unique<mlir::OpBuilder>(function.getBody());
// Emit the body of the function.
if (!mlirGen(*funcAST.getBody())) {
diff --git a/mlir/examples/toy/Ch5/mlir/ShapeInferencePass.cpp b/mlir/examples/toy/Ch5/mlir/ShapeInferencePass.cpp
index 6437c0b..b6808d7 100644
--- a/mlir/examples/toy/Ch5/mlir/ShapeInferencePass.cpp
+++ b/mlir/examples/toy/Ch5/mlir/ShapeInferencePass.cpp
@@ -376,6 +376,6 @@ public:
namespace toy {
std::unique_ptr<mlir::Pass> createShapeInferencePass() {
- return llvm::make_unique<ShapeInferencePass>();
+ return std::make_unique<ShapeInferencePass>();
}
} // namespace toy
diff --git a/mlir/g3doc/Tutorials/Toy/Ch-4.md b/mlir/g3doc/Tutorials/Toy/Ch-4.md
index 343d8f9..1551e12 100644
--- a/mlir/g3doc/Tutorials/Toy/Ch-4.md
+++ b/mlir/g3doc/Tutorials/Toy/Ch-4.md
@@ -112,7 +112,7 @@ method:
/// supports, for use by the canonicalization pass.
static void getCanonicalizationPatterns(mlir::OwningRewritePatternList &results,
mlir::MLIRContext *context) {
- results.push_back(llvm::make_unique<SimplifyRedundantTranspose>(context));
+ results.push_back(std::make_unique<SimplifyRedundantTranspose>(context));
}
```
diff --git a/mlir/include/mlir/Conversion/StandardToLLVM/ConvertStandardToLLVMPass.h b/mlir/include/mlir/Conversion/StandardToLLVM/ConvertStandardToLLVMPass.h
index a08b2fb..d2f416b 100644
--- a/mlir/include/mlir/Conversion/StandardToLLVM/ConvertStandardToLLVMPass.h
+++ b/mlir/include/mlir/Conversion/StandardToLLVM/ConvertStandardToLLVMPass.h
@@ -74,7 +74,7 @@ template <typename TypeConverter = LLVMTypeConverter>
std::unique_ptr<ModulePassBase>
createConvertToLLVMIRPass(LLVMPatternListFiller patternListFiller) {
return createConvertToLLVMIRPass(patternListFiller, [](MLIRContext *context) {
- return llvm::make_unique<TypeConverter>(context);
+ return std::make_unique<TypeConverter>(context);
});
}
diff --git a/mlir/include/mlir/IR/Dialect.h b/mlir/include/mlir/IR/Dialect.h
index 683701f..7ed647b 100644
--- a/mlir/include/mlir/IR/Dialect.h
+++ b/mlir/include/mlir/IR/Dialect.h
@@ -262,7 +262,7 @@ protected:
addInterfaces<T2, Tys...>();
}
template <typename T> void addInterfaces() {
- addInterface(llvm::make_unique<T>(this));
+ addInterface(std::make_unique<T>(this));
}
private:
diff --git a/mlir/include/mlir/IR/PatternMatch.h b/mlir/include/mlir/IR/PatternMatch.h
index d47b924..5e4fe60 100644
--- a/mlir/include/mlir/IR/PatternMatch.h
+++ b/mlir/include/mlir/IR/PatternMatch.h
@@ -422,7 +422,7 @@ public:
// FIXME: In c++17 this can be simplified by using 'fold expressions'.
using dummy = int[];
(void)dummy{
- 0, (patterns.emplace_back(llvm::make_unique<Ts>(arg, args...)), 0)...};
+ 0, (patterns.emplace_back(std::make_unique<Ts>(arg, args...)), 0)...};
}
private:
diff --git a/mlir/include/mlir/Pass/AnalysisManager.h b/mlir/include/mlir/Pass/AnalysisManager.h
index 1f44515..ae98831f2 100644
--- a/mlir/include/mlir/Pass/AnalysisManager.h
+++ b/mlir/include/mlir/Pass/AnalysisManager.h
@@ -123,7 +123,7 @@ public:
if (pi)
pi->runBeforeAnalysis(getAnalysisName<AnalysisT>(), id, ir);
- it->second = llvm::make_unique<AnalysisModel<AnalysisT>>(ir);
+ it->second = std::make_unique<AnalysisModel<AnalysisT>>(ir);
if (pi)
pi->runAfterAnalysis(getAnalysisName<AnalysisT>(), id, ir);
diff --git a/mlir/include/mlir/Pass/Pass.h b/mlir/include/mlir/Pass/Pass.h
index f5c8d8b..3a3444a 100644
--- a/mlir/include/mlir/Pass/Pass.h
+++ b/mlir/include/mlir/Pass/Pass.h
@@ -260,7 +260,7 @@ struct FunctionPass : public detail::PassModel<FuncOp, T, FunctionPassBase> {
/// A clone method to create a copy of this pass.
std::unique_ptr<FunctionPassBase> clone() const override {
- return llvm::make_unique<T>(*static_cast<const T *>(this));
+ return std::make_unique<T>(*static_cast<const T *>(this));
}
};
diff --git a/mlir/include/mlir/Pass/PassRegistry.h b/mlir/include/mlir/Pass/PassRegistry.h
index bd108f3..eea3778 100644
--- a/mlir/include/mlir/Pass/PassRegistry.h
+++ b/mlir/include/mlir/Pass/PassRegistry.h
@@ -122,7 +122,7 @@ template <typename ConcretePass> struct PassRegistration {
PassRegistration(StringRef arg, StringRef description) {
PassAllocatorFunction constructor = [] {
- return llvm::make_unique<ConcretePass>();
+ return std::make_unique<ConcretePass>();
};
registerPass(arg, description, PassID::getID<ConcretePass>(), constructor);
}
diff --git a/mlir/include/mlir/Quantizer/Support/ConstraintAnalysisGraph.h b/mlir/include/mlir/Quantizer/Support/ConstraintAnalysisGraph.h
index 8f2a0e5..63f62dbee 100644
--- a/mlir/include/mlir/Quantizer/Support/ConstraintAnalysisGraph.h
+++ b/mlir/include/mlir/Quantizer/Support/ConstraintAnalysisGraph.h
@@ -279,7 +279,7 @@ public:
Args... args) {
static_assert(std::is_convertible<T *, CAGConstraintNode *>(),
"T must be a CAGConstraingNode");
- T *constraintNode = addNode(llvm::make_unique<T>(args...));
+ T *constraintNode = addNode(std::make_unique<T>(args...));
for (auto *anchor : anchors)
anchor->addOutgoing(constraintNode);
return constraintNode;
@@ -292,7 +292,7 @@ public:
Args... args) {
static_assert(std::is_convertible<T *, CAGConstraintNode *>(),
"T must be a CAGConstraingNode");
- T *constraintNode = addNode(llvm::make_unique<T>(args...));
+ T *constraintNode = addNode(std::make_unique<T>(args...));
fromAnchor->addOutgoing(constraintNode);
for (auto *toAnchor : toAnchors) {
constraintNode->addOutgoing(toAnchor);
@@ -312,7 +312,7 @@ public:
T *constraintNode;
if (cluster.empty()) {
// Create new.
- constraintNode = addNode(llvm::make_unique<T>());
+ constraintNode = addNode(std::make_unique<T>());
} else {
// Merge existing.
constraintNode = cluster[0];
diff --git a/mlir/lib/Analysis/AffineStructures.cpp b/mlir/lib/Analysis/AffineStructures.cpp
index 46e4535..b2b2c69 100644
--- a/mlir/lib/Analysis/AffineStructures.cpp
+++ b/mlir/lib/Analysis/AffineStructures.cpp
@@ -303,7 +303,7 @@ FlatAffineConstraints::FlatAffineConstraints(
// Clones this object.
std::unique_ptr<FlatAffineConstraints> FlatAffineConstraints::clone() const {
- return llvm::make_unique<FlatAffineConstraints>(*this);
+ return std::make_unique<FlatAffineConstraints>(*this);
}
// Construct from an IntegerSet.
diff --git a/mlir/lib/Analysis/Dominance.cpp b/mlir/lib/Analysis/Dominance.cpp
index e384a56..ead8d7e 100644
--- a/mlir/lib/Analysis/Dominance.cpp
+++ b/mlir/lib/Analysis/Dominance.cpp
@@ -45,7 +45,7 @@ void DominanceInfoBase<IsPostDom>::recalculate(Operation *op) {
// Don't compute dominance if the region is empty.
if (region.empty())
continue;
- auto opDominance = llvm::make_unique<base>();
+ auto opDominance = std::make_unique<base>();
opDominance->recalculate(region);
dominanceInfos.try_emplace(&region, std::move(opDominance));
}
diff --git a/mlir/lib/Analysis/Utils.cpp b/mlir/lib/Analysis/Utils.cpp
index fc36cc5..85e39e37 100644
--- a/mlir/lib/Analysis/Utils.cpp
+++ b/mlir/lib/Analysis/Utils.cpp
@@ -913,7 +913,7 @@ static Optional<int64_t> getMemoryFootprintBytes(Block &block,
}
// Compute the memref region symbolic in any IVs enclosing this block.
- auto region = llvm::make_unique<MemRefRegion>(opInst->getLoc());
+ auto region = std::make_unique<MemRefRegion>(opInst->getLoc());
if (failed(
region->compute(opInst,
/*loopDepth=*/getNestingDepth(*block.begin())))) {
diff --git a/mlir/lib/Conversion/GPUToCUDA/ConvertKernelFuncToCubin.cpp b/mlir/lib/Conversion/GPUToCUDA/ConvertKernelFuncToCubin.cpp
index 0223dee9..29771fe 100644
--- a/mlir/lib/Conversion/GPUToCUDA/ConvertKernelFuncToCubin.cpp
+++ b/mlir/lib/Conversion/GPUToCUDA/ConvertKernelFuncToCubin.cpp
@@ -106,7 +106,7 @@ OwnedCubin
GpuKernelToCubinPass::compilePtxToCubinForTesting(const std::string &ptx,
FuncOp &function) {
const char data[] = "CUBIN";
- return llvm::make_unique<std::vector<char>>(data, data + sizeof(data) - 1);
+ return std::make_unique<std::vector<char>>(data, data + sizeof(data) - 1);
}
OwnedCubin GpuKernelToCubinPass::convertModuleToCubin(llvm::Module &llvmModule,
@@ -165,7 +165,7 @@ GpuKernelToCubinPass::translateGpuKernelToCubinAnnotation(FuncOp &function) {
std::unique_ptr<ModulePassBase>
mlir::createConvertGPUKernelToCubinPass(CubinGenerator cubinGenerator) {
- return llvm::make_unique<GpuKernelToCubinPass>(cubinGenerator);
+ return std::make_unique<GpuKernelToCubinPass>(cubinGenerator);
}
static PassRegistration<GpuKernelToCubinPass>
diff --git a/mlir/lib/Conversion/GPUToCUDA/ConvertLaunchFuncToCudaCalls.cpp b/mlir/lib/Conversion/GPUToCUDA/ConvertLaunchFuncToCudaCalls.cpp
index bf0816c..b3864a3 100644
--- a/mlir/lib/Conversion/GPUToCUDA/ConvertLaunchFuncToCudaCalls.cpp
+++ b/mlir/lib/Conversion/GPUToCUDA/ConvertLaunchFuncToCudaCalls.cpp
@@ -384,7 +384,7 @@ void GpuLaunchFuncToCudaCallsPass::translateGpuLaunchCalls(
std::unique_ptr<mlir::ModulePassBase>
mlir::createConvertGpuLaunchFuncToCudaCallsPass() {
- return llvm::make_unique<GpuLaunchFuncToCudaCallsPass>();
+ return std::make_unique<GpuLaunchFuncToCudaCallsPass>();
}
static PassRegistration<GpuLaunchFuncToCudaCallsPass>
diff --git a/mlir/lib/Conversion/GPUToCUDA/GenerateCubinAccessors.cpp b/mlir/lib/Conversion/GPUToCUDA/GenerateCubinAccessors.cpp
index 332a132..b819de2 100644
--- a/mlir/lib/Conversion/GPUToCUDA/GenerateCubinAccessors.cpp
+++ b/mlir/lib/Conversion/GPUToCUDA/GenerateCubinAccessors.cpp
@@ -120,7 +120,7 @@ private:
} // anonymous namespace
std::unique_ptr<ModulePassBase> createGenerateCubinAccessorPass() {
- return llvm::make_unique<GpuGenerateCubinAccessorsPass>();
+ return std::make_unique<GpuGenerateCubinAccessorsPass>();
}
static PassRegistration<GpuGenerateCubinAccessorsPass>
diff --git a/mlir/lib/Conversion/GPUToNVVM/LowerGpuOpsToNVVMOps.cpp b/mlir/lib/Conversion/GPUToNVVM/LowerGpuOpsToNVVMOps.cpp
index 9167148..32b0caf 100644
--- a/mlir/lib/Conversion/GPUToNVVM/LowerGpuOpsToNVVMOps.cpp
+++ b/mlir/lib/Conversion/GPUToNVVM/LowerGpuOpsToNVVMOps.cpp
@@ -129,7 +129,7 @@ public:
} // anonymous namespace
std::unique_ptr<FunctionPassBase> createLowerGpuOpsToNVVMOpsPass() {
- return llvm::make_unique<LowerGpuOpsToNVVMOpsPass>();
+ return std::make_unique<LowerGpuOpsToNVVMOpsPass>();
}
static PassRegistration<LowerGpuOpsToNVVMOpsPass>
diff --git a/mlir/lib/Conversion/LoopsToGPU/LoopsToGPUPass.cpp b/mlir/lib/Conversion/LoopsToGPU/LoopsToGPUPass.cpp
index 36869b8..4b241e4 100644
--- a/mlir/lib/Conversion/LoopsToGPU/LoopsToGPUPass.cpp
+++ b/mlir/lib/Conversion/LoopsToGPU/LoopsToGPUPass.cpp
@@ -69,11 +69,11 @@ struct ForLoopMapper : public FunctionPass<ForLoopMapper> {
std::unique_ptr<FunctionPassBase>
mlir::createSimpleLoopsToGPUPass(unsigned numBlockDims,
unsigned numThreadDims) {
- return llvm::make_unique<ForLoopMapper>(numBlockDims, numThreadDims);
+ return std::make_unique<ForLoopMapper>(numBlockDims, numThreadDims);
}
static PassRegistration<ForLoopMapper>
registration(PASS_NAME, "Convert top-level loops to GPU kernels", [] {
- return llvm::make_unique<ForLoopMapper>(clNumBlockDims.getValue(),
- clNumThreadDims.getValue());
+ return std::make_unique<ForLoopMapper>(clNumBlockDims.getValue(),
+ clNumThreadDims.getValue());
});
diff --git a/mlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp b/mlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp
index 731c07e..9ba06db 100644
--- a/mlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp
+++ b/mlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp
@@ -1082,7 +1082,7 @@ Type LLVMTypeConverter::packFunctionResults(ArrayRef<Type> types) {
/// Create an instance of LLVMTypeConverter in the given context.
static std::unique_ptr<LLVMTypeConverter>
makeStandardToLLVMTypeConverter(MLIRContext *context) {
- return llvm::make_unique<LLVMTypeConverter>(context);
+ return std::make_unique<LLVMTypeConverter>(context);
}
namespace {
@@ -1133,14 +1133,14 @@ struct LLVMLoweringPass : public ModulePass<LLVMLoweringPass> {
} // end namespace
std::unique_ptr<ModulePassBase> mlir::createConvertToLLVMIRPass() {
- return llvm::make_unique<LLVMLoweringPass>();
+ return std::make_unique<LLVMLoweringPass>();
}
std::unique_ptr<ModulePassBase>
mlir::createConvertToLLVMIRPass(LLVMPatternListFiller patternListFiller,
LLVMTypeConverterMaker typeConverterMaker) {
- return llvm::make_unique<LLVMLoweringPass>(patternListFiller,
- typeConverterMaker);
+ return std::make_unique<LLVMLoweringPass>(patternListFiller,
+ typeConverterMaker);
}
static PassRegistration<LLVMLoweringPass>
diff --git a/mlir/lib/Conversion/StandardToSPIRV/ConvertStandardToSPIRVPass.cpp b/mlir/lib/Conversion/StandardToSPIRV/ConvertStandardToSPIRVPass.cpp
index 3d4ef63..174a447 100644
--- a/mlir/lib/Conversion/StandardToSPIRV/ConvertStandardToSPIRVPass.cpp
+++ b/mlir/lib/Conversion/StandardToSPIRV/ConvertStandardToSPIRVPass.cpp
@@ -50,7 +50,7 @@ void ConvertStandardToSPIRVPass::runOnModule() {
std::unique_ptr<ModulePassBase>
mlir::spirv::createConvertStandardToSPIRVPass() {
- return llvm::make_unique<ConvertStandardToSPIRVPass>();
+ return std::make_unique<ConvertStandardToSPIRVPass>();
}
static PassRegistration<ConvertStandardToSPIRVPass>
diff --git a/mlir/lib/Dialect/GPU/Transforms/KernelOutlining.cpp b/mlir/lib/Dialect/GPU/Transforms/KernelOutlining.cpp
index b7be427..ea64ea8 100644
--- a/mlir/lib/Dialect/GPU/Transforms/KernelOutlining.cpp
+++ b/mlir/lib/Dialect/GPU/Transforms/KernelOutlining.cpp
@@ -110,7 +110,7 @@ public:
} // namespace
std::unique_ptr<ModulePassBase> mlir::createGpuKernelOutliningPass() {
- return llvm::make_unique<GpuKernelOutliningPass>();
+ return std::make_unique<GpuKernelOutliningPass>();
}
static PassRegistration<GpuKernelOutliningPass>
diff --git a/mlir/lib/Dialect/QuantOps/Transforms/ConvertConst.cpp b/mlir/lib/Dialect/QuantOps/Transforms/ConvertConst.cpp
index 9c48c67..efb202b 100644
--- a/mlir/lib/Dialect/QuantOps/Transforms/ConvertConst.cpp
+++ b/mlir/lib/Dialect/QuantOps/Transforms/ConvertConst.cpp
@@ -113,7 +113,7 @@ void ConvertConstPass::runOnFunction() {
}
std::unique_ptr<FunctionPassBase> mlir::quant::createConvertConstPass() {
- return llvm::make_unique<ConvertConstPass>();
+ return std::make_unique<ConvertConstPass>();
}
static PassRegistration<ConvertConstPass>
diff --git a/mlir/lib/Dialect/QuantOps/Transforms/ConvertSimQuant.cpp b/mlir/lib/Dialect/QuantOps/Transforms/ConvertSimQuant.cpp
index 924e639..1296719 100644
--- a/mlir/lib/Dialect/QuantOps/Transforms/ConvertSimQuant.cpp
+++ b/mlir/lib/Dialect/QuantOps/Transforms/ConvertSimQuant.cpp
@@ -105,7 +105,7 @@ void ConvertSimulatedQuantPass::runOnFunction() {
std::unique_ptr<FunctionPassBase>
mlir::quant::createConvertSimulatedQuantPass() {
- return llvm::make_unique<ConvertSimulatedQuantPass>();
+ return std::make_unique<ConvertSimulatedQuantPass>();
}
static PassRegistration<ConvertSimulatedQuantPass>
diff --git a/mlir/lib/ExecutionEngine/ExecutionEngine.cpp b/mlir/lib/ExecutionEngine/ExecutionEngine.cpp
index 99bf43d..4450bf4 100644
--- a/mlir/lib/ExecutionEngine/ExecutionEngine.cpp
+++ b/mlir/lib/ExecutionEngine/ExecutionEngine.cpp
@@ -132,13 +132,13 @@ public:
: irTransformer(transform),
objectLayer(
session,
- [this]() { return llvm::make_unique<MemoryManager>(session); }),
+ [this]() { return std::make_unique<MemoryManager>(session); }),
compileLayer(
session, objectLayer,
llvm::orc::ConcurrentIRCompiler(std::move(machineBuilder))),
transformLayer(session, compileLayer, makeIRTransformFunction()),
dataLayout(layout), mangler(session, this->dataLayout),
- threadSafeCtx(llvm::make_unique<llvm::LLVMContext>()) {
+ threadSafeCtx(std::make_unique<llvm::LLVMContext>()) {
session.getMainJITDylib().addGenerator(
cantFail(llvm::orc::DynamicLibrarySearchGenerator::GetForCurrentProcess(
layout.getGlobalPrefix())));
@@ -156,9 +156,9 @@ public:
if (!dataLayout)
return dataLayout.takeError();
- return llvm::make_unique<OrcJIT>(std::move(*machineBuilder),
- std::move(*dataLayout), transformer,
- sharedLibPaths);
+ return std::make_unique<OrcJIT>(std::move(*machineBuilder),
+ std::move(*dataLayout), transformer,
+ sharedLibPaths);
}
// Add an LLVM module to the main library managed by the JIT engine.
@@ -328,7 +328,7 @@ Expected<std::unique_ptr<ExecutionEngine>>
ExecutionEngine::create(ModuleOp m,
std::function<llvm::Error(llvm::Module *)> transformer,
ArrayRef<StringRef> sharedLibPaths) {
- auto engine = llvm::make_unique<ExecutionEngine>();
+ auto engine = std::make_unique<ExecutionEngine>();
auto expectedJIT = impl::OrcJIT::createDefault(transformer, sharedLibPaths);
if (!expectedJIT)
return expectedJIT.takeError();
diff --git a/mlir/lib/IR/Diagnostics.cpp b/mlir/lib/IR/Diagnostics.cpp
index 2889406..e9963ec 100644
--- a/mlir/lib/IR/Diagnostics.cpp
+++ b/mlir/lib/IR/Diagnostics.cpp
@@ -160,7 +160,7 @@ Diagnostic &Diagnostic::attachNote(llvm::Optional<Location> noteLoc) {
/// Append and return a new note.
notes.push_back(
- llvm::make_unique<Diagnostic>(*noteLoc, DiagnosticSeverity::Note));
+ std::make_unique<Diagnostic>(*noteLoc, DiagnosticSeverity::Note));
return *notes.back();
}
diff --git a/mlir/lib/Linalg/Transforms/Fusion.cpp b/mlir/lib/Linalg/Transforms/Fusion.cpp
index 992c466..a2a63d5 100644
--- a/mlir/lib/Linalg/Transforms/Fusion.cpp
+++ b/mlir/lib/Linalg/Transforms/Fusion.cpp
@@ -352,12 +352,12 @@ LinalgFusionPass::LinalgFusionPass(ArrayRef<int64_t> sizes)
std::unique_ptr<FunctionPassBase>
mlir::linalg::createLinalgFusionPass(ArrayRef<int64_t> tileSizes) {
- return llvm::make_unique<LinalgFusionPass>(tileSizes);
+ return std::make_unique<LinalgFusionPass>(tileSizes);
}
static PassRegistration<LinalgFusionPass>
pass("linalg-fusion", "Fuse operations in the linalg dialect", [] {
- auto pass = llvm::make_unique<LinalgFusionPass>();
+ auto pass = std::make_unique<LinalgFusionPass>();
pass->tileSizes.assign(clTileSizes.begin(), clTileSizes.end());
return pass;
});
diff --git a/mlir/lib/Linalg/Transforms/LowerToLLVMDialect.cpp b/mlir/lib/Linalg/Transforms/LowerToLLVMDialect.cpp
index 908191c..de183f8 100644
--- a/mlir/lib/Linalg/Transforms/LowerToLLVMDialect.cpp
+++ b/mlir/lib/Linalg/Transforms/LowerToLLVMDialect.cpp
@@ -735,7 +735,7 @@ void LowerLinalgToLLVMPass::runOnModule() {
}
std::unique_ptr<ModulePassBase> mlir::linalg::createLowerLinalgToLLVMPass() {
- return llvm::make_unique<LowerLinalgToLLVMPass>();
+ return std::make_unique<LowerLinalgToLLVMPass>();
}
static PassRegistration<LowerLinalgToLLVMPass>
diff --git a/mlir/lib/Linalg/Transforms/LowerToLoops.cpp b/mlir/lib/Linalg/Transforms/LowerToLoops.cpp
index 24e56b1..faef51f 100644
--- a/mlir/lib/Linalg/Transforms/LowerToLoops.cpp
+++ b/mlir/lib/Linalg/Transforms/LowerToLoops.cpp
@@ -391,7 +391,7 @@ void LowerLinalgToLoopsPass::runOnFunction() {
}
std::unique_ptr<FunctionPassBase> mlir::linalg::createLowerLinalgToLoopsPass() {
- return llvm::make_unique<LowerLinalgToLoopsPass>();
+ return std::make_unique<LowerLinalgToLoopsPass>();
}
static PassRegistration<LowerLinalgToLoopsPass>
diff --git a/mlir/lib/Linalg/Transforms/Tiling.cpp b/mlir/lib/Linalg/Transforms/Tiling.cpp
index 48c0da8..051278e 100644
--- a/mlir/lib/Linalg/Transforms/Tiling.cpp
+++ b/mlir/lib/Linalg/Transforms/Tiling.cpp
@@ -530,12 +530,12 @@ LinalgTilingPass::LinalgTilingPass(ArrayRef<int64_t> sizes, bool promoteViews) {
std::unique_ptr<FunctionPassBase>
mlir::linalg::createLinalgTilingPass(ArrayRef<int64_t> tileSizes,
bool promoteViews) {
- return llvm::make_unique<LinalgTilingPass>(tileSizes, promoteViews);
+ return std::make_unique<LinalgTilingPass>(tileSizes, promoteViews);
}
static PassRegistration<LinalgTilingPass>
pass("linalg-tile", "Tile operations in the linalg dialect", [] {
- auto pass = llvm::make_unique<LinalgTilingPass>();
+ auto pass = std::make_unique<LinalgTilingPass>();
pass->tileSizes.assign(clTileSizes.begin(), clTileSizes.end());
pass->promoteViews = clPromoteFullTileViews;
return pass;
diff --git a/mlir/lib/Pass/Pass.cpp b/mlir/lib/Pass/Pass.cpp
index ba3b474..13f2738 100644
--- a/mlir/lib/Pass/Pass.cpp
+++ b/mlir/lib/Pass/Pass.cpp
@@ -283,7 +283,7 @@ void PassManager::addPass(std::unique_ptr<ModulePassBase> pass) {
// Add a verifier run if requested.
if (verifyPasses)
- mpe->addPass(llvm::make_unique<ModuleVerifierPass>());
+ mpe->addPass(std::make_unique<ModuleVerifierPass>());
}
/// Add a function pass to the current manager. This takes ownership over the
@@ -295,11 +295,11 @@ void PassManager::addPass(std::unique_ptr<FunctionPassBase> pass) {
/// Create an executor adaptor for this pass.
if (disableThreads || !llvm::llvm_is_multithreaded()) {
// If multi-threading is disabled, then create a synchronous adaptor.
- auto adaptor = llvm::make_unique<ModuleToFunctionPassAdaptor>();
+ auto adaptor = std::make_unique<ModuleToFunctionPassAdaptor>();
fpe = &adaptor->getFunctionExecutor();
addPass(std::unique_ptr<ModulePassBase>{adaptor.release()});
} else {
- auto adaptor = llvm::make_unique<ModuleToFunctionPassAdaptorParallel>();
+ auto adaptor = std::make_unique<ModuleToFunctionPassAdaptorParallel>();
fpe = &adaptor->getFunctionExecutor();
addPass(std::unique_ptr<ModulePassBase>{adaptor.release()});
}
@@ -313,7 +313,7 @@ void PassManager::addPass(std::unique_ptr<FunctionPassBase> pass) {
// Add a verifier run if requested.
if (verifyPasses)
- fpe->addPass(llvm::make_unique<FunctionVerifierPass>());
+ fpe->addPass(std::make_unique<FunctionVerifierPass>());
}
/// Add the provided instrumentation to the pass manager. This takes ownership
diff --git a/mlir/lib/Quantizer/Configurations/FxpMathConfig.cpp b/mlir/lib/Quantizer/Configurations/FxpMathConfig.cpp
index 6a0cff8..4119bde 100644
--- a/mlir/lib/Quantizer/Configurations/FxpMathConfig.cpp
+++ b/mlir/lib/Quantizer/Configurations/FxpMathConfig.cpp
@@ -283,5 +283,5 @@ struct FxpMathTargetConfigImpl : public FxpMathTargetConfig {
std::unique_ptr<FxpMathTargetConfig>
FxpMathTargetConfig::create(SolverContext &context) {
- return llvm::make_unique<FxpMathTargetConfigImpl>(context);
+ return std::make_unique<FxpMathTargetConfigImpl>(context);
}
diff --git a/mlir/lib/Quantizer/Support/ConstraintAnalysisGraph.cpp b/mlir/lib/Quantizer/Support/ConstraintAnalysisGraph.cpp
index b4d48b7..cfed2a26 100644
--- a/mlir/lib/Quantizer/Support/ConstraintAnalysisGraph.cpp
+++ b/mlir/lib/Quantizer/Support/ConstraintAnalysisGraph.cpp
@@ -68,7 +68,7 @@ CAGOperandAnchor *CAGSlice::getOperandAnchor(Operation *op,
}
// Create.
- auto anchor = llvm::make_unique<CAGOperandAnchor>(op, operandIdx);
+ auto anchor = std::make_unique<CAGOperandAnchor>(op, operandIdx);
auto *unowned = anchor.release();
unowned->nodeId = allNodes.size();
allNodes.push_back(unowned);
@@ -87,7 +87,7 @@ CAGResultAnchor *CAGSlice::getResultAnchor(Operation *op, unsigned resultIdx) {
}
// Create.
- auto anchor = llvm::make_unique<CAGResultAnchor>(op, resultIdx);
+ auto anchor = std::make_unique<CAGResultAnchor>(op, resultIdx);
auto *unowned = anchor.release();
unowned->nodeId = allNodes.size();
allNodes.push_back(unowned);
diff --git a/mlir/lib/Quantizer/Transforms/AddDefaultStatsTestPass.cpp b/mlir/lib/Quantizer/Transforms/AddDefaultStatsTestPass.cpp
index 4868d3b..a2d38ce 100644
--- a/mlir/lib/Quantizer/Transforms/AddDefaultStatsTestPass.cpp
+++ b/mlir/lib/Quantizer/Transforms/AddDefaultStatsTestPass.cpp
@@ -119,7 +119,7 @@ void AddDefaultStatsPass::runWithConfig(SolverContext &solverContext,
}
std::unique_ptr<FunctionPassBase> mlir::quantizer::createAddDefaultStatsPass() {
- return llvm::make_unique<AddDefaultStatsPass>();
+ return std::make_unique<AddDefaultStatsPass>();
}
static PassRegistration<AddDefaultStatsPass> pass(
diff --git a/mlir/lib/Quantizer/Transforms/InferQuantizedTypesPass.cpp b/mlir/lib/Quantizer/Transforms/InferQuantizedTypesPass.cpp
index e1365e7..ff293fc 100644
--- a/mlir/lib/Quantizer/Transforms/InferQuantizedTypesPass.cpp
+++ b/mlir/lib/Quantizer/Transforms/InferQuantizedTypesPass.cpp
@@ -288,7 +288,7 @@ void InferQuantizedTypesPass::transformResultType(CAGResultAnchor *anchor,
std::unique_ptr<ModulePassBase> mlir::quantizer::createInferQuantizedTypesPass(
SolverContext &solverContext, const TargetConfiguration &config) {
- return llvm::make_unique<InferQuantizedTypesPass>(solverContext, config);
+ return std::make_unique<InferQuantizedTypesPass>(solverContext, config);
}
static PassRegistration<InferQuantizedTypesPass>
diff --git a/mlir/lib/Quantizer/Transforms/RemoveInstrumentationPass.cpp b/mlir/lib/Quantizer/Transforms/RemoveInstrumentationPass.cpp
index 104a3b6..b9fbf27 100644
--- a/mlir/lib/Quantizer/Transforms/RemoveInstrumentationPass.cpp
+++ b/mlir/lib/Quantizer/Transforms/RemoveInstrumentationPass.cpp
@@ -68,7 +68,7 @@ void RemoveInstrumentationPass::runOnFunction() {
std::unique_ptr<FunctionPassBase>
mlir::quantizer::createRemoveInstrumentationPass() {
- return llvm::make_unique<RemoveInstrumentationPass>();
+ return std::make_unique<RemoveInstrumentationPass>();
}
static PassRegistration<RemoveInstrumentationPass>
diff --git a/mlir/lib/Support/FileUtilities.cpp b/mlir/lib/Support/FileUtilities.cpp
index fb9f5cf..6f0dc93 100644
--- a/mlir/lib/Support/FileUtilities.cpp
+++ b/mlir/lib/Support/FileUtilities.cpp
@@ -43,8 +43,8 @@ mlir::openInputFile(StringRef inputFilename, std::string *errorMessage) {
std::unique_ptr<llvm::ToolOutputFile>
mlir::openOutputFile(StringRef outputFilename, std::string *errorMessage) {
std::error_code error;
- auto result = llvm::make_unique<llvm::ToolOutputFile>(outputFilename, error,
- llvm::sys::fs::F_None);
+ auto result = std::make_unique<llvm::ToolOutputFile>(outputFilename, error,
+ llvm::sys::fs::F_None);
if (error) {
if (errorMessage)
*errorMessage = "cannot open output file '" + outputFilename.str() +
diff --git a/mlir/lib/TableGen/Pattern.cpp b/mlir/lib/TableGen/Pattern.cpp
index 344bcaa..7fe3f62 100644
--- a/mlir/lib/TableGen/Pattern.cpp
+++ b/mlir/lib/TableGen/Pattern.cpp
@@ -122,7 +122,7 @@ Operator &tblgen::DagNode::getDialectOp(RecordOperatorMap *mapper) const {
auto it = mapper->find(opDef);
if (it != mapper->end())
return *it->second;
- return *mapper->try_emplace(opDef, llvm::make_unique<Operator>(opDef))
+ return *mapper->try_emplace(opDef, std::make_unique<Operator>(opDef))
.first->second;
}
diff --git a/mlir/lib/Transforms/AffineDataCopyGeneration.cpp b/mlir/lib/Transforms/AffineDataCopyGeneration.cpp
index e422bd2..5030f72 100644
--- a/mlir/lib/Transforms/AffineDataCopyGeneration.cpp
+++ b/mlir/lib/Transforms/AffineDataCopyGeneration.cpp
@@ -165,7 +165,7 @@ struct AffineDataCopyGeneration
std::unique_ptr<FunctionPassBase> mlir::createAffineDataCopyGenerationPass(
unsigned slowMemorySpace, unsigned fastMemorySpace, unsigned tagMemorySpace,
int minDmaTransferSize, uint64_t fastMemCapacityBytes) {
- return llvm::make_unique<AffineDataCopyGeneration>(
+ return std::make_unique<AffineDataCopyGeneration>(
slowMemorySpace, fastMemorySpace, tagMemorySpace, minDmaTransferSize,
fastMemCapacityBytes);
}
@@ -743,7 +743,7 @@ uint64_t AffineDataCopyGeneration::runOnBlock(Block::iterator begin,
}
// Compute the MemRefRegion accessed.
- auto region = llvm::make_unique<MemRefRegion>(opInst->getLoc());
+ auto region = std::make_unique<MemRefRegion>(opInst->getLoc());
if (failed(region->compute(opInst, copyDepth))) {
LLVM_DEBUG(llvm::dbgs()
<< "Error obtaining memory region: semi-affine maps?\n");
diff --git a/mlir/lib/Transforms/CSE.cpp b/mlir/lib/Transforms/CSE.cpp
index 5965852..bb89aef 100644
--- a/mlir/lib/Transforms/CSE.cpp
+++ b/mlir/lib/Transforms/CSE.cpp
@@ -213,7 +213,7 @@ void CSE::simplifyRegion(ScopedMapTy &knownValues, DominanceInfo &domInfo,
std::deque<std::unique_ptr<CFGStackNode>> stack;
// Process the nodes of the dom tree for this region.
- stack.emplace_back(llvm::make_unique<CFGStackNode>(
+ stack.emplace_back(std::make_unique<CFGStackNode>(
knownValues, domInfo.getRootNode(&region)));
while (!stack.empty()) {
@@ -229,7 +229,7 @@ void CSE::simplifyRegion(ScopedMapTy &knownValues, DominanceInfo &domInfo,
if (currentNode->childIterator != currentNode->node->end()) {
auto *childNode = *(currentNode->childIterator++);
stack.emplace_back(
- llvm::make_unique<CFGStackNode>(knownValues, childNode));
+ std::make_unique<CFGStackNode>(knownValues, childNode));
} else {
// Finally, if the node and all of its children have been processed
// then we delete the node.
@@ -259,7 +259,7 @@ void CSE::runOnFunction() {
}
std::unique_ptr<FunctionPassBase> mlir::createCSEPass() {
- return llvm::make_unique<CSE>();
+ return std::make_unique<CSE>();
}
static PassRegistration<CSE>
diff --git a/mlir/lib/Transforms/Canonicalizer.cpp b/mlir/lib/Transforms/Canonicalizer.cpp
index 6f4a40f..db6c8ee 100644
--- a/mlir/lib/Transforms/Canonicalizer.cpp
+++ b/mlir/lib/Transforms/Canonicalizer.cpp
@@ -54,7 +54,7 @@ void Canonicalizer::runOnFunction() {
/// Create a Canonicalizer pass.
std::unique_ptr<FunctionPassBase> mlir::createCanonicalizerPass() {
- return llvm::make_unique<Canonicalizer>();
+ return std::make_unique<Canonicalizer>();
}
static PassRegistration<Canonicalizer> pass("canonicalize",
diff --git a/mlir/lib/Transforms/LoopCoalescing.cpp b/mlir/lib/Transforms/LoopCoalescing.cpp
index eb52e8d..2ce0fbd 100644
--- a/mlir/lib/Transforms/LoopCoalescing.cpp
+++ b/mlir/lib/Transforms/LoopCoalescing.cpp
@@ -97,7 +97,7 @@ public:
} // namespace
std::unique_ptr<FunctionPassBase> mlir::createLoopCoalescingPass() {
- return llvm::make_unique<LoopCoalescingPass>();
+ return std::make_unique<LoopCoalescingPass>();
}
static PassRegistration<LoopCoalescingPass>
diff --git a/mlir/lib/Transforms/LoopFusion.cpp b/mlir/lib/Transforms/LoopFusion.cpp
index 2736ebc..98d01b2 100644
--- a/mlir/lib/Transforms/LoopFusion.cpp
+++ b/mlir/lib/Transforms/LoopFusion.cpp
@@ -114,8 +114,8 @@ struct LoopFusion : public FunctionPass<LoopFusion> {
std::unique_ptr<FunctionPassBase>
mlir::createLoopFusionPass(unsigned fastMemorySpace,
uint64_t localBufSizeThreshold, bool maximalFusion) {
- return llvm::make_unique<LoopFusion>(fastMemorySpace, localBufSizeThreshold,
- maximalFusion);
+ return std::make_unique<LoopFusion>(fastMemorySpace, localBufSizeThreshold,
+ maximalFusion);
}
namespace {
diff --git a/mlir/lib/Transforms/LoopInvariantCodeMotion.cpp b/mlir/lib/Transforms/LoopInvariantCodeMotion.cpp
index 09fe9af..fddc890 100644
--- a/mlir/lib/Transforms/LoopInvariantCodeMotion.cpp
+++ b/mlir/lib/Transforms/LoopInvariantCodeMotion.cpp
@@ -77,7 +77,7 @@ static bool isMemRefDereferencingOp(Operation &op) {
}
std::unique_ptr<FunctionPassBase> mlir::createLoopInvariantCodeMotionPass() {
- return llvm::make_unique<LoopInvariantCodeMotion>();
+ return std::make_unique<LoopInvariantCodeMotion>();
}
// Returns true if the individual op is loop invariant.
diff --git a/mlir/lib/Transforms/LoopTiling.cpp b/mlir/lib/Transforms/LoopTiling.cpp
index d6ff9a94..c521a8f 100644
--- a/mlir/lib/Transforms/LoopTiling.cpp
+++ b/mlir/lib/Transforms/LoopTiling.cpp
@@ -83,7 +83,7 @@ struct LoopTiling : public FunctionPass<LoopTiling> {
/// Function.
std::unique_ptr<FunctionPassBase>
mlir::createLoopTilingPass(uint64_t cacheSizeBytes) {
- return llvm::make_unique<LoopTiling>(cacheSizeBytes);
+ return std::make_unique<LoopTiling>(cacheSizeBytes);
}
// Move the loop body of AffineForOp 'src' from 'src' into the specified
diff --git a/mlir/lib/Transforms/LoopUnroll.cpp b/mlir/lib/Transforms/LoopUnroll.cpp
index c3db90e..fbe1dcc 100644
--- a/mlir/lib/Transforms/LoopUnroll.cpp
+++ b/mlir/lib/Transforms/LoopUnroll.cpp
@@ -183,7 +183,7 @@ LogicalResult LoopUnroll::runOnAffineForOp(AffineForOp forOp) {
std::unique_ptr<FunctionPassBase> mlir::createLoopUnrollPass(
int unrollFactor, int unrollFull,
const std::function<unsigned(AffineForOp)> &getUnrollFactor) {
- return llvm::make_unique<LoopUnroll>(
+ return std::make_unique<LoopUnroll>(
unrollFactor == -1 ? None : Optional<unsigned>(unrollFactor),
unrollFull == -1 ? None : Optional<bool>(unrollFull), getUnrollFactor);
}
diff --git a/mlir/lib/Transforms/LoopUnrollAndJam.cpp b/mlir/lib/Transforms/LoopUnrollAndJam.cpp
index 362aa86..ef92861 100644
--- a/mlir/lib/Transforms/LoopUnrollAndJam.cpp
+++ b/mlir/lib/Transforms/LoopUnrollAndJam.cpp
@@ -84,7 +84,7 @@ struct LoopUnrollAndJam : public FunctionPass<LoopUnrollAndJam> {
std::unique_ptr<FunctionPassBase>
mlir::createLoopUnrollAndJamPass(int unrollJamFactor) {
- return llvm::make_unique<LoopUnrollAndJam>(
+ return std::make_unique<LoopUnrollAndJam>(
unrollJamFactor == -1 ? None : Optional<unsigned>(unrollJamFactor));
}
diff --git a/mlir/lib/Transforms/LowerAffine.cpp b/mlir/lib/Transforms/LowerAffine.cpp
index f24bc6d..1879ff6 100644
--- a/mlir/lib/Transforms/LowerAffine.cpp
+++ b/mlir/lib/Transforms/LowerAffine.cpp
@@ -530,7 +530,7 @@ class LowerAffinePass : public FunctionPass<LowerAffinePass> {
/// Lowers If and For operations within a function into their lower level CFG
/// equivalent blocks.
std::unique_ptr<FunctionPassBase> mlir::createLowerAffinePass() {
- return llvm::make_unique<LowerAffinePass>();
+ return std::make_unique<LowerAffinePass>();
}
static PassRegistration<LowerAffinePass>
diff --git a/mlir/lib/Transforms/LowerVectorTransfers.cpp b/mlir/lib/Transforms/LowerVectorTransfers.cpp
index e941850b..8cb50e8 100644
--- a/mlir/lib/Transforms/LowerVectorTransfers.cpp
+++ b/mlir/lib/Transforms/LowerVectorTransfers.cpp
@@ -374,7 +374,7 @@ struct LowerVectorTransfersPass
} // end anonymous namespace
std::unique_ptr<FunctionPassBase> mlir::createLowerVectorTransfersPass() {
- return llvm::make_unique<LowerVectorTransfersPass>();
+ return std::make_unique<LowerVectorTransfersPass>();
}
static PassRegistration<LowerVectorTransfersPass>
diff --git a/mlir/lib/Transforms/MaterializeVectors.cpp b/mlir/lib/Transforms/MaterializeVectors.cpp
index 24b1f77..811c6fc 100644
--- a/mlir/lib/Transforms/MaterializeVectors.cpp
+++ b/mlir/lib/Transforms/MaterializeVectors.cpp
@@ -768,7 +768,7 @@ void MaterializeVectorsPass::runOnFunction() {
std::unique_ptr<FunctionPassBase>
mlir::createMaterializeVectorsPass(llvm::ArrayRef<int64_t> vectorSize) {
- return llvm::make_unique<MaterializeVectorsPass>(vectorSize);
+ return std::make_unique<MaterializeVectorsPass>(vectorSize);
}
static PassRegistration<MaterializeVectorsPass>
diff --git a/mlir/lib/Transforms/MemRefDataFlowOpt.cpp b/mlir/lib/Transforms/MemRefDataFlowOpt.cpp
index b16dff9..59a4fbe 100644
--- a/mlir/lib/Transforms/MemRefDataFlowOpt.cpp
+++ b/mlir/lib/Transforms/MemRefDataFlowOpt.cpp
@@ -89,7 +89,7 @@ struct MemRefDataFlowOpt : public FunctionPass<MemRefDataFlowOpt> {
/// Creates a pass to perform optimizations relying on memref dataflow such as
/// store to load forwarding, elimination of dead stores, and dead allocs.
std::unique_ptr<FunctionPassBase> mlir::createMemRefDataFlowOptPass() {
- return llvm::make_unique<MemRefDataFlowOpt>();
+ return std::make_unique<MemRefDataFlowOpt>();
}
// This is a straightforward implementation not optimized for speed. Optimize
diff --git a/mlir/lib/Transforms/PipelineDataTransfer.cpp b/mlir/lib/Transforms/PipelineDataTransfer.cpp
index d4d91c9..db78f50 100644
--- a/mlir/lib/Transforms/PipelineDataTransfer.cpp
+++ b/mlir/lib/Transforms/PipelineDataTransfer.cpp
@@ -50,7 +50,7 @@ struct PipelineDataTransfer : public FunctionPass<PipelineDataTransfer> {
/// Creates a pass to pipeline explicit movement of data across levels of the
/// memory hierarchy.
std::unique_ptr<FunctionPassBase> mlir::createPipelineDataTransferPass() {
- return llvm::make_unique<PipelineDataTransfer>();
+ return std::make_unique<PipelineDataTransfer>();
}
// Returns the position of the tag memref operand given a DMA operation.
diff --git a/mlir/lib/Transforms/SimplifyAffineStructures.cpp b/mlir/lib/Transforms/SimplifyAffineStructures.cpp
index 3cc9309..97193b4 100644
--- a/mlir/lib/Transforms/SimplifyAffineStructures.cpp
+++ b/mlir/lib/Transforms/SimplifyAffineStructures.cpp
@@ -89,7 +89,7 @@ struct SimplifyAffineStructures
} // end anonymous namespace
std::unique_ptr<FunctionPassBase> mlir::createSimplifyAffineStructuresPass() {
- return llvm::make_unique<SimplifyAffineStructures>();
+ return std::make_unique<SimplifyAffineStructures>();
}
void SimplifyAffineStructures::runOnFunction() {
diff --git a/mlir/lib/Transforms/StripDebugInfo.cpp b/mlir/lib/Transforms/StripDebugInfo.cpp
index 21d8ef1..15db8b5 100644
--- a/mlir/lib/Transforms/StripDebugInfo.cpp
+++ b/mlir/lib/Transforms/StripDebugInfo.cpp
@@ -39,7 +39,7 @@ void StripDebugInfo::runOnFunction() {
/// Creates a pass to strip debug information from a function.
std::unique_ptr<FunctionPassBase> mlir::createStripDebugInfoPass() {
- return llvm::make_unique<StripDebugInfo>();
+ return std::make_unique<StripDebugInfo>();
}
static PassRegistration<StripDebugInfo>
diff --git a/mlir/lib/Transforms/Utils/Utils.cpp b/mlir/lib/Transforms/Utils/Utils.cpp
index 250c769..ffc19d1 100644
--- a/mlir/lib/Transforms/Utils/Utils.cpp
+++ b/mlir/lib/Transforms/Utils/Utils.cpp
@@ -82,11 +82,11 @@ bool mlir::replaceAllMemRefUsesWith(Value *oldMemRef, Value *newMemRef,
std::unique_ptr<DominanceInfo> domInfo;
std::unique_ptr<PostDominanceInfo> postDomInfo;
if (domInstFilter)
- domInfo = llvm::make_unique<DominanceInfo>(
+ domInfo = std::make_unique<DominanceInfo>(
domInstFilter->getParentOfType<FuncOp>());
if (postDomInstFilter)
- postDomInfo = llvm::make_unique<PostDominanceInfo>(
+ postDomInfo = std::make_unique<PostDominanceInfo>(
postDomInstFilter->getParentOfType<FuncOp>());
// The ops where memref replacement succeeds are replaced with new ones.
diff --git a/mlir/lib/Transforms/Vectorize.cpp b/mlir/lib/Transforms/Vectorize.cpp
index 932f00b..d00174b 100644
--- a/mlir/lib/Transforms/Vectorize.cpp
+++ b/mlir/lib/Transforms/Vectorize.cpp
@@ -1278,7 +1278,7 @@ void Vectorize::runOnFunction() {
std::unique_ptr<FunctionPassBase>
mlir::createVectorizePass(llvm::ArrayRef<int64_t> virtualVectorSize) {
- return llvm::make_unique<Vectorize>(virtualVectorSize);
+ return std::make_unique<Vectorize>(virtualVectorSize);
}
static PassRegistration<Vectorize>
diff --git a/mlir/test/lib/TestDialect/TestPatterns.cpp b/mlir/test/lib/TestDialect/TestPatterns.cpp
index 9b7fe8e..bde640b 100644
--- a/mlir/test/lib/TestDialect/TestPatterns.cpp
+++ b/mlir/test/lib/TestDialect/TestPatterns.cpp
@@ -250,6 +250,6 @@ static llvm::cl::opt<TestLegalizePatternDriver::ConversionMode>
static mlir::PassRegistration<TestLegalizePatternDriver>
legalizer_pass("test-legalize-patterns",
"Run test dialect legalization patterns", [] {
- return llvm::make_unique<TestLegalizePatternDriver>(
+ return std::make_unique<TestLegalizePatternDriver>(
legalizerConversionMode);
});
diff --git a/mlir/test/lib/Transforms/TestConstantFold.cpp b/mlir/test/lib/Transforms/TestConstantFold.cpp
index 02c66ef..34480f0 100644
--- a/mlir/test/lib/Transforms/TestConstantFold.cpp
+++ b/mlir/test/lib/Transforms/TestConstantFold.cpp
@@ -75,7 +75,7 @@ void TestConstantFold::runOnFunction() {
/// Creates a constant folding pass.
std::unique_ptr<FunctionPassBase> mlir::createTestConstantFoldPass() {
- return llvm::make_unique<TestConstantFold>();
+ return std::make_unique<TestConstantFold>();
}
static PassRegistration<TestConstantFold>
diff --git a/mlir/test/lib/Transforms/TestLoopFusion.cpp b/mlir/test/lib/Transforms/TestLoopFusion.cpp
index bcb0507..8b55d35 100644
--- a/mlir/test/lib/Transforms/TestLoopFusion.cpp
+++ b/mlir/test/lib/Transforms/TestLoopFusion.cpp
@@ -59,7 +59,7 @@ struct TestLoopFusion : public FunctionPass<TestLoopFusion> {
} // end anonymous namespace
std::unique_ptr<FunctionPassBase> mlir::createTestLoopFusionPass() {
- return llvm::make_unique<TestLoopFusion>();
+ return std::make_unique<TestLoopFusion>();
}
// Gathers all AffineForOps in 'block' at 'currLoopDepth' in 'depthToLoops'.
diff --git a/mlir/test/lib/Transforms/TestLoopMapping.cpp b/mlir/test/lib/Transforms/TestLoopMapping.cpp
index a9da70a..f4aa6469 100644
--- a/mlir/test/lib/Transforms/TestLoopMapping.cpp
+++ b/mlir/test/lib/Transforms/TestLoopMapping.cpp
@@ -62,4 +62,4 @@ public:
static PassRegistration<TestLoopMappingPass>
reg("test-mapping-to-processing-elements",
"test mapping a single loop on a virtual processor grid",
- [] { return llvm::make_unique<TestLoopMappingPass>(); });
+ [] { return std::make_unique<TestLoopMappingPass>(); });
diff --git a/mlir/test/lib/Transforms/TestLoopParametricTiling.cpp b/mlir/test/lib/Transforms/TestLoopParametricTiling.cpp
index e01ff66..cf68ec1 100644
--- a/mlir/test/lib/Transforms/TestLoopParametricTiling.cpp
+++ b/mlir/test/lib/Transforms/TestLoopParametricTiling.cpp
@@ -57,7 +57,7 @@ public:
std::unique_ptr<FunctionPassBase>
mlir::createSimpleParametricTilingPass(ArrayRef<int64_t> outerLoopSizes) {
- return llvm::make_unique<SimpleParametricLoopTilingPass>(outerLoopSizes);
+ return std::make_unique<SimpleParametricLoopTilingPass>(outerLoopSizes);
}
static PassRegistration<SimpleParametricLoopTilingPass>
@@ -65,7 +65,7 @@ static PassRegistration<SimpleParametricLoopTilingPass>
"test application of parametric tiling to the outer loops so that the "
"ranges of outer loops become static",
[] {
- auto pass = llvm::make_unique<SimpleParametricLoopTilingPass>(
+ auto pass = std::make_unique<SimpleParametricLoopTilingPass>(
ArrayRef<int64_t>{});
pass->sizes.assign(clOuterLoopSizes.begin(), clOuterLoopSizes.end());
return pass;
diff --git a/mlir/test/lib/Transforms/TestVectorizationUtils.cpp b/mlir/test/lib/Transforms/TestVectorizationUtils.cpp
index 3bfe6b6..6fe277dc 100644
--- a/mlir/test/lib/Transforms/TestVectorizationUtils.cpp
+++ b/mlir/test/lib/Transforms/TestVectorizationUtils.cpp
@@ -291,7 +291,7 @@ void VectorizerTestPass::runOnFunction() {
}
std::unique_ptr<FunctionPassBase> mlir::createVectorizerTestPass() {
- return llvm::make_unique<VectorizerTestPass>();
+ return std::make_unique<VectorizerTestPass>();
}
static PassRegistration<VectorizerTestPass>
diff --git a/mlir/tools/mlir-cuda-runner/mlir-cuda-runner.cpp b/mlir/tools/mlir-cuda-runner/mlir-cuda-runner.cpp
index f75413f..1d174eb 100644
--- a/mlir/tools/mlir-cuda-runner/mlir-cuda-runner.cpp
+++ b/mlir/tools/mlir-cuda-runner/mlir-cuda-runner.cpp
@@ -98,8 +98,8 @@ OwnedCubin compilePtxToCubin(const std::string ptx, FuncOp &function) {
"cuLinkComplete");
char *cubinAsChar = static_cast<char *>(cubinData);
- OwnedCubin result = llvm::make_unique<std::vector<char>>(
- cubinAsChar, cubinAsChar + cubinSize);
+ OwnedCubin result =
+ std::make_unique<std::vector<char>>(cubinAsChar, cubinAsChar + cubinSize);
// This will also destroy the cubin data.
RETURN_ON_CUDA_ERROR(cuLinkDestroy(linkState), "cuLinkDestroy");