[LLVMdev] Adding multiples-of-8 integer types to MVT
Ken Dyck
Ken.Dyck at onsemi.com
Thu Dec 3 04:16:34 PST 2009
On Wednesday, December 02, 2009 3:45 PM, Micah Villmow wrote:
>
> On Wednesday, December 02, 2009 12:33 PM, Ken Dyck wrote:
>
> > The main drawback of adding the new types is the extra
> > burden it would
> > put on back ends that don't use them, since they would need to add
> > special lowering code for all the types they don't use. On
> > the other
> > hand, it opens the possibility of targeting architectures that LLVM
> > previously couldn't.
>
> Instead of putting the burden on the back-ends to implement
> special lowering code, why not implement code in the
> legalizer that would automatically sign extend them to the
> next largest power of 2 integer if the specific integer types
> were not supported. This would then remove the need of the
> back-ends to implement anything as LLVM would just generate
> extend the values to i32/i64 silently.
I agree. It would be ideal to limit the changes to the legalizer. I've
been working on this in a private branch for a little while and so far I
haven't figured out a way to make it work. I'm fairly new to LLVM,
though, so there's a good chance my failure is due to a personal lack of
understanding rather than some fundamental technical issue. I'll keep
working on it.
-Ken
More information about the llvm-dev
mailing list