[LLVMdev] default operation action

erkan diken erkandiken at gmail.com
Fri Dec 5 09:11:41 PST 2014


Hi Kevin,

You can put your operations in an array and then you can loop around the
setOperationAction, such as:

loop i:
     setOperationAction (your_array[i], MVT::i64, Expand)
end loop.

That's it.

Regards,
Erkan.



On Fri, Dec 5, 2014 at 6:00 PM, kewuzhang <kewu.zhang at amd.com> wrote:

> Hi Guys,
>
> I noticed that the operation actions( promote/expand/custom) are set per
> operation basis.
> Wondering if we can set it up globally?
>
> For example,  I have native supported 32 bits registers,  to handle  8
> bits value operations, I want to do promote.
> and to support 64 bit operations, I want to expand.
>
> 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 .
> like
>
> // expand type MVT::i64 to MVT::i32 for all the operations
>
>  instead of
>>         setOperationAction( ISD::ADD,  MVT::i64, Expand);
>         setOperationAction( ISD::SUB,  MVT::i64, Expand);
>         setOperationAction( ISD::MUL,  MVT::i64, Expand);
> …..
>> Or LLVM is smart enough to do it buy default?
>
> best
>
> kevin
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>



-- 
Best Regards,
Erkan Diken
------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20141205/f8b9ec13/attachment.html>


More information about the llvm-dev mailing list