[LLVMdev] default operation action
Tom Stellard
tom at stellard.net
Fri Dec 5 09:21:54 PST 2014
On Fri, Dec 05, 2014 at 12:00:41PM -0500, kewuzhang 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.
>
This will happen automatically if you don't declare i8 as a legal type.
Do you have something like addRegisterClass(MVT::i8, SomeRegClass) in
your TargetLowering constructor? If so, then remove it and see what
happens.
-Tom
> 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
More information about the llvm-dev
mailing list