} // namespace
std::unique_ptr<FunctionPassBase> linalg::createLowerLinalgLoadStorePass() {
- return llvm::make_unique<LowerLinalgLoadStorePass>();
+ return std::make_unique<LowerLinalgLoadStorePass>();
}
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:
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.
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);
}
"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 ')'
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('('));
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
}
// 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));
}
}
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());
}
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
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() == ';')
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;
// 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
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;
}
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:
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.
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);
}
"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 ')'
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('('));
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
}
// 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));
}
}
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());
}
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
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() == ';')
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;
// 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
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;
}
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 {
// 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())) {
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:
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.
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);
}
"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 ')'
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('('));
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
}
// 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));
}
}
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());
}
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
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() == ';')
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;
// 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
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;
}
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 {
// 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())) {
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:
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.
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);
}
"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 ')'
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('('));
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
}
// 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));
}
}
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());
}
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
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() == ';')
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;
// 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
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;
}
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 {
// 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())) {
namespace toy {
std::unique_ptr<mlir::Pass> createShapeInferencePass() {
- return llvm::make_unique<ShapeInferencePass>();
+ return std::make_unique<ShapeInferencePass>();
}
} // namespace toy
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:
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.
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);
}
"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 ')'
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('('));
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
}
// 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));
}
}
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());
}
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
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() == ';')
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;
// 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
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;
}
namespace toy {
std::unique_ptr<mlir::Pass> createEarlyLoweringPass() {
- return llvm::make_unique<EarlyLoweringPass>();
+ return std::make_unique<EarlyLoweringPass>();
}
} // namespace toy
namespace toy {
std::unique_ptr<mlir::Pass> createLateLoweringPass() {
- return llvm::make_unique<LateLoweringPass>();
+ return std::make_unique<LateLoweringPass>();
}
} // 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 {
// 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())) {
namespace toy {
std::unique_ptr<mlir::Pass> createShapeInferencePass() {
- return llvm::make_unique<ShapeInferencePass>();
+ return std::make_unique<ShapeInferencePass>();
}
} // namespace toy
/// 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));
}
```
std::unique_ptr<ModulePassBase>
createConvertToLLVMIRPass(LLVMPatternListFiller patternListFiller) {
return createConvertToLLVMIRPass(patternListFiller, [](MLIRContext *context) {
- return llvm::make_unique<TypeConverter>(context);
+ return std::make_unique<TypeConverter>(context);
});
}
addInterfaces<T2, Tys...>();
}
template <typename T> void addInterfaces() {
- addInterface(llvm::make_unique<T>(this));
+ addInterface(std::make_unique<T>(this));
}
private:
// 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:
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);
/// 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));
}
};
PassRegistration(StringRef arg, StringRef description) {
PassAllocatorFunction constructor = [] {
- return llvm::make_unique<ConcretePass>();
+ return std::make_unique<ConcretePass>();
};
registerPass(arg, description, PassID::getID<ConcretePass>(), constructor);
}
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;
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);
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];
// 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.
// 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(®ion, std::move(opDominance));
}
}
// 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())))) {
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,
std::unique_ptr<ModulePassBase>
mlir::createConvertGPUKernelToCubinPass(CubinGenerator cubinGenerator) {
- return llvm::make_unique<GpuKernelToCubinPass>(cubinGenerator);
+ return std::make_unique<GpuKernelToCubinPass>(cubinGenerator);
}
static PassRegistration<GpuKernelToCubinPass>
std::unique_ptr<mlir::ModulePassBase>
mlir::createConvertGpuLaunchFuncToCudaCallsPass() {
- return llvm::make_unique<GpuLaunchFuncToCudaCallsPass>();
+ return std::make_unique<GpuLaunchFuncToCudaCallsPass>();
}
static PassRegistration<GpuLaunchFuncToCudaCallsPass>
} // anonymous namespace
std::unique_ptr<ModulePassBase> createGenerateCubinAccessorPass() {
- return llvm::make_unique<GpuGenerateCubinAccessorsPass>();
+ return std::make_unique<GpuGenerateCubinAccessorsPass>();
}
static PassRegistration<GpuGenerateCubinAccessorsPass>
} // anonymous namespace
std::unique_ptr<FunctionPassBase> createLowerGpuOpsToNVVMOpsPass() {
- return llvm::make_unique<LowerGpuOpsToNVVMOpsPass>();
+ return std::make_unique<LowerGpuOpsToNVVMOpsPass>();
}
static PassRegistration<LowerGpuOpsToNVVMOpsPass>
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());
});
/// 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 {
} // 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>
std::unique_ptr<ModulePassBase>
mlir::spirv::createConvertStandardToSPIRVPass() {
- return llvm::make_unique<ConvertStandardToSPIRVPass>();
+ return std::make_unique<ConvertStandardToSPIRVPass>();
}
static PassRegistration<ConvertStandardToSPIRVPass>
} // namespace
std::unique_ptr<ModulePassBase> mlir::createGpuKernelOutliningPass() {
- return llvm::make_unique<GpuKernelOutliningPass>();
+ return std::make_unique<GpuKernelOutliningPass>();
}
static PassRegistration<GpuKernelOutliningPass>
}
std::unique_ptr<FunctionPassBase> mlir::quant::createConvertConstPass() {
- return llvm::make_unique<ConvertConstPass>();
+ return std::make_unique<ConvertConstPass>();
}
static PassRegistration<ConvertConstPass>
std::unique_ptr<FunctionPassBase>
mlir::quant::createConvertSimulatedQuantPass() {
- return llvm::make_unique<ConvertSimulatedQuantPass>();
+ return std::make_unique<ConvertSimulatedQuantPass>();
}
static PassRegistration<ConvertSimulatedQuantPass>
: 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())));
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.
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();
/// 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();
}
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;
});
}
std::unique_ptr<ModulePassBase> mlir::linalg::createLowerLinalgToLLVMPass() {
- return llvm::make_unique<LowerLinalgToLLVMPass>();
+ return std::make_unique<LowerLinalgToLLVMPass>();
}
static PassRegistration<LowerLinalgToLLVMPass>
}
std::unique_ptr<FunctionPassBase> mlir::linalg::createLowerLinalgToLoopsPass() {
- return llvm::make_unique<LowerLinalgToLoopsPass>();
+ return std::make_unique<LowerLinalgToLoopsPass>();
}
static PassRegistration<LowerLinalgToLoopsPass>
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;
// 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
/// 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()});
}
// 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
std::unique_ptr<FxpMathTargetConfig>
FxpMathTargetConfig::create(SolverContext &context) {
- return llvm::make_unique<FxpMathTargetConfigImpl>(context);
+ return std::make_unique<FxpMathTargetConfigImpl>(context);
}
}
// 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);
}
// 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);
}
std::unique_ptr<FunctionPassBase> mlir::quantizer::createAddDefaultStatsPass() {
- return llvm::make_unique<AddDefaultStatsPass>();
+ return std::make_unique<AddDefaultStatsPass>();
}
static PassRegistration<AddDefaultStatsPass> pass(
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>
std::unique_ptr<FunctionPassBase>
mlir::quantizer::createRemoveInstrumentationPass() {
- return llvm::make_unique<RemoveInstrumentationPass>();
+ return std::make_unique<RemoveInstrumentationPass>();
}
static PassRegistration<RemoveInstrumentationPass>
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() +
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;
}
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);
}
}
// 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");
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(®ion)));
while (!stack.empty()) {
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.
}
std::unique_ptr<FunctionPassBase> mlir::createCSEPass() {
- return llvm::make_unique<CSE>();
+ return std::make_unique<CSE>();
}
static PassRegistration<CSE>
/// 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",
} // namespace
std::unique_ptr<FunctionPassBase> mlir::createLoopCoalescingPass() {
- return llvm::make_unique<LoopCoalescingPass>();
+ return std::make_unique<LoopCoalescingPass>();
}
static PassRegistration<LoopCoalescingPass>
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 {
}
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.
/// 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
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);
}
std::unique_ptr<FunctionPassBase>
mlir::createLoopUnrollAndJamPass(int unrollJamFactor) {
- return llvm::make_unique<LoopUnrollAndJam>(
+ return std::make_unique<LoopUnrollAndJam>(
unrollJamFactor == -1 ? None : Optional<unsigned>(unrollJamFactor));
}
/// 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>
} // end anonymous namespace
std::unique_ptr<FunctionPassBase> mlir::createLowerVectorTransfersPass() {
- return llvm::make_unique<LowerVectorTransfersPass>();
+ return std::make_unique<LowerVectorTransfersPass>();
}
static PassRegistration<LowerVectorTransfersPass>
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>
/// 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
/// 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.
} // end anonymous namespace
std::unique_ptr<FunctionPassBase> mlir::createSimplifyAffineStructuresPass() {
- return llvm::make_unique<SimplifyAffineStructures>();
+ return std::make_unique<SimplifyAffineStructures>();
}
void SimplifyAffineStructures::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>
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.
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>
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);
});
/// Creates a constant folding pass.
std::unique_ptr<FunctionPassBase> mlir::createTestConstantFoldPass() {
- return llvm::make_unique<TestConstantFold>();
+ return std::make_unique<TestConstantFold>();
}
static PassRegistration<TestConstantFold>
} // 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'.
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>(); });
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>
"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;
}
std::unique_ptr<FunctionPassBase> mlir::createVectorizerTestPass() {
- return llvm::make_unique<VectorizerTestPass>();
+ return std::make_unique<VectorizerTestPass>();
}
static PassRegistration<VectorizerTestPass>
"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");