Dmitry Mikushin
2013-Feb-07 17:43 UTC
[LLVMdev] How to set isTarget bit for a complex intrinsic class in tblgen?
Dear all,
Let's say there is some complex tblgen intrinsic definition, for example:
class MEMBAR<string StrOp, Intrinsic IntOP> :
NVPTXInst<(outs), (ins),
StrOp, [(IntOP)]>;
def INT_MEMBAR_CTA : MEMBAR<"membar.cta;", int_nvvm_membar_cta>;
def INT_MEMBAR_GL : MEMBAR<"membar.gl;", int_nvvm_membar_gl>;
def INT_MEMBAR_SYS : MEMBAR<"membar.sys;", int_nvvm_membar_sys>;
Question: how to set an isTarget bit to the Intrinsic subclass of it?
In simple cases that would be
let isTarget = 1 in { ... }
How to make the same here?
Thanks,
- D.
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.llvm.org/pipermail/llvm-dev/attachments/20130207/d7f2c883/attachment.html>
Sean Silva
2013-Feb-08 00:17 UTC
[LLVMdev] How to set isTarget bit for a complex intrinsic class in tblgen?
One possibility is to derive a subclass and set isTarget to 1 in it and use
that class. e.g.
class MyMEMBAR<...> : MEMBAR<...> {
let isTarget = 1;
}
-- Sean Silva
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.llvm.org/pipermail/llvm-dev/attachments/20130207/a633284f/attachment.html>