diff options
author | River Riddle <riverriddle@google.com> | 2019-12-12 15:31:39 -0800 |
---|---|---|
committer | A. Unique TensorFlower <gardener@tensorflow.org> | 2019-12-12 15:32:21 -0800 |
commit | e7aa47ff111c53127587d8aea71b088db3a671aa (patch) | |
tree | f2b4841362b381de4f2beb1632250b8cdbc49cf2 /mlir/lib/Dialect/LLVMIR/IR/ROCDLDialect.cpp | |
parent | a50cb184a0c5ebc342a871b2e338e2591115639f (diff) | |
download | bcm5719-llvm-e7aa47ff111c53127587d8aea71b088db3a671aa.tar.gz bcm5719-llvm-e7aa47ff111c53127587d8aea71b088db3a671aa.zip |
NFC: Cleanup the various Op::print methods.
This cleans up the implementation of the various operation print methods. This is done via a combination of code cleanup, adding new streaming methods to the printer(e.g. operand ranges), etc.
PiperOrigin-RevId: 285285181
Diffstat (limited to 'mlir/lib/Dialect/LLVMIR/IR/ROCDLDialect.cpp')
-rw-r--r-- | mlir/lib/Dialect/LLVMIR/IR/ROCDLDialect.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/mlir/lib/Dialect/LLVMIR/IR/ROCDLDialect.cpp b/mlir/lib/Dialect/LLVMIR/IR/ROCDLDialect.cpp index 487382bb364..30c55b52e59 100644 --- a/mlir/lib/Dialect/LLVMIR/IR/ROCDLDialect.cpp +++ b/mlir/lib/Dialect/LLVMIR/IR/ROCDLDialect.cpp @@ -36,18 +36,17 @@ #include "llvm/IR/Type.h" #include "llvm/Support/SourceMgr.h" -namespace mlir { -namespace ROCDL { +using namespace mlir; +using namespace ROCDL; //===----------------------------------------------------------------------===// // Printing/parsing for ROCDL ops //===----------------------------------------------------------------------===// static void printROCDLOp(OpAsmPrinter &p, Operation *op) { - p << op->getName() << " "; - p.printOperands(op->getOperands()); + p << op->getName() << " " << op->getOperands(); if (op->getNumResults() > 0) - interleaveComma(op->getResultTypes(), p << " : "); + p << " : " << op->getResultTypes(); } // <operation> ::= `rocdl.XYZ` : type @@ -73,10 +72,11 @@ ROCDLDialect::ROCDLDialect(MLIRContext *context) : Dialect("rocdl", context) { allowUnknownOperations(); } +namespace mlir { +namespace ROCDL { #define GET_OP_CLASSES #include "mlir/Dialect/LLVMIR/ROCDLOps.cpp.inc" - -static DialectRegistration<ROCDLDialect> rocdlDialect; - } // namespace ROCDL } // namespace mlir + +static DialectRegistration<ROCDLDialect> rocdlDialect; |