<div dir="ltr"><div><div><div><div><div>Hi Kevin,<br><br></div>You can put your operations in an array and then you can loop around the setOperationAction, such as:<br><br></div>loop i:<br>     setOperationAction (your_array[i], MVT::i64, Expand)<br></div>end loop.<br><br></div>That's it.<br></div><br>Regards,<br>Erkan.<br><div><div><div><div><div><br> <br></div></div></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Dec 5, 2014 at 6:00 PM, kewuzhang <span dir="ltr"><<a href="mailto:kewu.zhang@amd.com" target="_blank">kewu.zhang@amd.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Guys,<br>
<br>
I noticed that the operation actions( promote/expand/custom) are set per operation basis.<br>
Wondering if we can set it up globally?<br>
<br>
For example,  I have native supported 32 bits registers,  to handle  8 bits value operations, I want to do promote.<br>
and to support 64 bit operations, I want to expand.<br>
<br>
If I can set up the operation actions for the same type globally, then I can avoid to list all the operations with the same action .<br>
like<br>
<br>
// expand type MVT::i64 to MVT::i32 for all the operations<br>
<br>
 instead of<br>
“<br>
        setOperationAction( ISD::ADD,  MVT::i64, Expand);<br>
        setOperationAction( ISD::SUB,  MVT::i64, Expand);<br>
        setOperationAction( ISD::MUL,  MVT::i64, Expand);<br>
…..<br>
“<br>
Or LLVM is smart enough to do it buy default?<br>
<br>
best<br>
<br>
kevin<br>
<br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
</blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature">Best Regards,<br>Erkan Diken<br>------------------<br></div>
</div>