diff options
| author | River Riddle <riverriddle@google.com> | 2019-12-18 09:28:48 -0800 |
|---|---|---|
| committer | A. Unique TensorFlower <gardener@tensorflow.org> | 2019-12-18 09:29:20 -0800 |
| commit | 4562e389a43caa2e30ebf277c12743edafe6a0ac (patch) | |
| tree | 1901855666adba9be9576e864877fe191e197085 /mlir/lib/Target/LLVMIR/ConvertToROCDLIR.cpp | |
| parent | 24ab8362f2099ed42f2e05f09fb9323ad0c5ab27 (diff) | |
| download | bcm5719-llvm-4562e389a43caa2e30ebf277c12743edafe6a0ac.tar.gz bcm5719-llvm-4562e389a43caa2e30ebf277c12743edafe6a0ac.zip | |
NFC: Remove unnecessary 'llvm::' prefix from uses of llvm symbols declared in `mlir` namespace.
Aside from being cleaner, this also makes the codebase more consistent.
PiperOrigin-RevId: 286206974
Diffstat (limited to 'mlir/lib/Target/LLVMIR/ConvertToROCDLIR.cpp')
| -rw-r--r-- | mlir/lib/Target/LLVMIR/ConvertToROCDLIR.cpp | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/mlir/lib/Target/LLVMIR/ConvertToROCDLIR.cpp b/mlir/lib/Target/LLVMIR/ConvertToROCDLIR.cpp index 31ba4a27ca0..c06e1cadbc4 100644 --- a/mlir/lib/Target/LLVMIR/ConvertToROCDLIR.cpp +++ b/mlir/lib/Target/LLVMIR/ConvertToROCDLIR.cpp @@ -60,11 +60,11 @@ static llvm::Value *createDeviceFunctionCall(llvm::IRBuilder<> &builder, llvm::Type::getInt64Ty(module->getContext()), // return type. llvm::Type::getInt32Ty(module->getContext()), // parameter type. false); // no variadic arguments. - llvm::Function *fn = llvm::dyn_cast<llvm::Function>( + llvm::Function *fn = dyn_cast<llvm::Function>( module->getOrInsertFunction(fn_name, function_type).getCallee()); llvm::Value *fn_op0 = llvm::ConstantInt::get( llvm::Type::getInt32Ty(module->getContext()), parameter); - return builder.CreateCall(fn, llvm::ArrayRef<llvm::Value *>(fn_op0)); + return builder.CreateCall(fn, ArrayRef<llvm::Value *>(fn_op0)); } class ModuleTranslation : public LLVM::ModuleTranslation { @@ -111,12 +111,11 @@ std::unique_ptr<llvm::Module> mlir::translateModuleToROCDLIR(Operation *m) { } static TranslateFromMLIRRegistration - registration("mlir-to-rocdlir", - [](ModuleOp module, llvm::raw_ostream &output) { - auto llvmModule = mlir::translateModuleToROCDLIR(module); - if (!llvmModule) - return failure(); - - llvmModule->print(output, nullptr); - return success(); - }); + registration("mlir-to-rocdlir", [](ModuleOp module, raw_ostream &output) { + auto llvmModule = mlir::translateModuleToROCDLIR(module); + if (!llvmModule) + return failure(); + + llvmModule->print(output, nullptr); + return success(); + }); |

