forked from OSchip/llvm-project
[mlir] Clean up NVVM intrinsics definitions a little.
Differential Revision: https://reviews.llvm.org/D82750
This commit is contained in:
parent
1f228e572d
commit
67ecd7e296
|
@ -33,16 +33,25 @@ class NVVM_Op<string mnemonic, list<OpTrait> traits = []> :
|
|||
LLVM_OpBase<NVVM_Dialect, mnemonic, traits> {
|
||||
}
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// NVVM intrinsic operations
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
class NVVM_IntrOp<string mnem, list<int> overloadedResults,
|
||||
list<int> overloadedOperands, list<OpTrait> traits,
|
||||
bit hasResult>
|
||||
: LLVM_IntrOpBase<NVVM_Dialect, mnem, "nvvm_" # !subst(".", "_", mnem),
|
||||
overloadedResults, overloadedOperands, traits, hasResult>;
|
||||
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// NVVM special register op definitions
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
class NVVM_SpecialRegisterOp<string mnemonic,
|
||||
list<OpTrait> traits = []> :
|
||||
NVVM_Op<mnemonic, !listconcat(traits, [NoSideEffect])>,
|
||||
Results<(outs LLVM_Type:$res)>, Arguments<(ins)> {
|
||||
string llvmBuilder = "$res = createIntrinsicCall(builder,"
|
||||
# "llvm::Intrinsic::nvvm_" # !subst(".","_", mnemonic) # ");";
|
||||
NVVM_IntrOp<mnemonic, [], [], !listconcat(traits, [NoSideEffect]), 1>,
|
||||
Arguments<(ins)> {
|
||||
let assemblyFormat = "attr-dict `:` type($res)";
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue