Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions mlir/include/mlir/Dialect/LLVMIR/LLVMIntrinsicOps.td
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class LLVM_UnaryIntrOpBase<string func, Type element,
!listconcat([Pure, SameOperandsAndResultType], traits),
requiresFastmath> {
dag commonArgs = (ins LLVM_ScalarOrVectorOf<element>:$in);
let assemblyFormat = "`(` operands `)` custom<LLVMOpAttrs>(attr-dict) `:` "
let assemblyFormat = "`(` operands `)` attr-dict `:` "
"functional-type(operands, results)";
}

Expand All @@ -42,7 +42,7 @@ class LLVM_BinarySameArgsIntrOpBase<string func, Type element,
requiresFastmath> {
dag commonArgs = (ins LLVM_ScalarOrVectorOf<element>:$a,
LLVM_ScalarOrVectorOf<element>:$b);
let assemblyFormat = "`(` operands `)` custom<LLVMOpAttrs>(attr-dict) `:` "
let assemblyFormat = "`(` operands `)` attr-dict `:` "
"functional-type(operands, results)";
}

Expand All @@ -67,7 +67,7 @@ class LLVM_TernarySameArgsIntrOpBase<string func, Type element,
dag commonArgs = (ins LLVM_ScalarOrVectorOf<element>:$a,
LLVM_ScalarOrVectorOf<element>:$b,
LLVM_ScalarOrVectorOf<element>:$c);
let assemblyFormat = "`(` operands `)` custom<LLVMOpAttrs>(attr-dict) `:` "
let assemblyFormat = "`(` operands `)` attr-dict `:` "
"functional-type(operands, results)";
}

Expand Down Expand Up @@ -137,15 +137,15 @@ def LLVM_PowIOp : LLVM_OneResultIntrOp<"powi", [], [0,1],
(ins LLVM_ScalarOrVectorOf<LLVM_AnyFloat>:$val,
AnySignlessInteger:$power,
DefaultValuedAttr<LLVM_FastmathFlagsAttr, "{}">:$fastmathFlags);
let assemblyFormat = "`(` operands `)` custom<LLVMOpAttrs>(attr-dict) `:` "
let assemblyFormat = "`(` operands `)` attr-dict `:` "
"functional-type(operands, results)";
}
def LLVM_RintOp : LLVM_UnaryIntrOpF<"rint">;
def LLVM_NearbyintOp : LLVM_UnaryIntrOpF<"nearbyint">;
class LLVM_IntRoundIntrOpBase<string func> :
LLVM_OneResultIntrOp<func, [0], [0], [Pure]> {
let arguments = (ins LLVM_AnyFloat:$val);
let assemblyFormat = "`(` operands `)` custom<LLVMOpAttrs>(attr-dict) `:` "
let assemblyFormat = "`(` operands `)` attr-dict `:` "
"functional-type(operands, results)";
}
def LLVM_LroundOp : LLVM_IntRoundIntrOpBase<"lround">;
Expand Down Expand Up @@ -706,7 +706,7 @@ class LLVM_VecReductionF<string mnem>
ins DefaultValuedAttr<LLVM_FastmathFlagsAttr, "{}">:$fastmathFlags);
let arguments = !con(commonArgs, fmfArg);

let assemblyFormat = "`(` operands `)` custom<LLVMOpAttrs>(attr-dict) `:` "
let assemblyFormat = "`(` operands `)` attr-dict `:` "
"functional-type(operands, results)";
}

Expand Down
4 changes: 2 additions & 2 deletions mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class LLVM_ArithmeticOpBase<Type type, string mnemonic,
LLVM_ScalarOrVectorOf<type>:$rhs);
let results = (outs LLVM_ScalarOrVectorOf<type>:$res);
let builders = [LLVM_OneResultOpBuilder];
let assemblyFormat = "$lhs `,` $rhs custom<LLVMOpAttrs>(attr-dict) `:` type($res)";
let assemblyFormat = "$lhs `,` $rhs attr-dict `:` type($res)";
string llvmInstName = instName;
}
class LLVM_IntArithmeticOp<string mnemonic, string instName,
Expand Down Expand Up @@ -118,7 +118,7 @@ class LLVM_UnaryFloatArithmeticOp<Type type, string mnemonic,
DefaultValuedAttr<LLVM_FastmathFlagsAttr, "{}">:$fastmathFlags);
let results = (outs type:$res);
let builders = [LLVM_OneResultOpBuilder];
let assemblyFormat = "$operand custom<LLVMOpAttrs>(attr-dict) `:` type($res)";
let assemblyFormat = "$operand attr-dict `:` type($res)";
string llvmInstName = instName;
string mlirBuilder = [{
auto op = $_builder.create<$_qualCppClassName>($_location, $operand);
Expand Down
11 changes: 0 additions & 11 deletions mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,17 +132,6 @@ static auto processFMFAttr(ArrayRef<NamedAttribute> attrs) {
return filteredAttrs;
}

static ParseResult parseLLVMOpAttrs(OpAsmParser &parser,
NamedAttrList &result) {
return parser.parseOptionalAttrDict(result);
}

static void printLLVMOpAttrs(OpAsmPrinter &printer, Operation *op,
DictionaryAttr attrs) {
auto filteredAttrs = processFMFAttr(attrs.getValue());
printer.printOptionalAttrDict(filteredAttrs);
}

/// Verifies `symbol`'s use in `op` to ensure the symbol is a valid and
/// fully defined llvm.func.
static LogicalResult verifySymbolAttrUse(FlatSymbolRefAttr symbol,
Expand Down
Loading