summaryrefslogtreecommitdiffstats
path: root/mlir/lib
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/lib
parentdbf8538b64a61d0b93420b293b8508b158377757 (diff)
downloadbcm5719-llvm-79f53b0cf1fd204af0a09c8e085dd09a1ce0b6d9.tar.gz
bcm5719-llvm-79f53b0cf1fd204af0a09c8e085dd09a1ce0b6d9.zip
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/lib')
-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
45 files changed, 68 insertions, 68 deletions
diff --git a/mlir/lib/Analysis/AffineStructures.cpp b/mlir/lib/Analysis/AffineStructures.cpp
index 46e45351d54..b2b2c6970b9 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 e384a56a71d..ead8d7e070c 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 fc36cc58f8e..85e39e37f65 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 0223dee9ede..29771fe7ea5 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 bf0816c8b71..b3864a39560 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 332a1324865..b819de2471e 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 91671489f2d..32b0caf180a 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 36869b87f1a..4b241e497c6 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 731c07e22c3..9ba06db7aba 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 3d4ef639cfa..174a4477560 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 b7be427be1b..ea64ea8058b 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 9c48c672300..efb202b7491 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 924e6390d88..129671979ca 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 99bf43de8c1..4450bf4d403 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 28894066023..e9963ece379 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 992c4664b10..a2a63d5bedf 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 908191ccd66..de183f8f76e 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 24e56b11063..faef51f5c8c 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 48c0da8f88f..051278e12f4 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 ba3b4742cc7..13f2738b002 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 6a0cff83ced..4119bde5ac1 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 b4d48b78025..cfed2a2647c 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 4868d3be291..a2d38ce211d 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 e1365e769b3..ff293fc93aa 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 104a3b60404..b9fbf27d24f 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 fb9f5cf86da..6f0dc93b235 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 344bcaa94b8..7fe3f6272d9 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 e422bd24425..5030f722519 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 59658526c25..bb89aef7fef 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 6f4a40f86f3..db6c8ee26e6 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 eb52e8d5802..2ce0fbd011b 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 2736ebc0f55..98d01b24be0 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 09fe9afe808..fddc890edcf 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 d6ff9a94234..c521a8f6f5d 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 c3db90e4b3a..fbe1dcc09f9 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 362aa8683cc..ef92861adf9 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 f24bc6d88da..1879ff63af2 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 e941850b5b1..8cb50e805f8 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 24b1f77c939..811c6fc7ad5 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 b16dff93ee3..59a4fbe93ab 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 d4d91c9b0e2..db78f500867 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 3cc9309a5d5..97193b49a74 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 21d8ef15219..15db8b58e88 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 250c76913c2..ffc19d1a1d3 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 932f00bfcbe..d00174ba2fa 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>
OpenPOWER on IntegriCloud