[LLVMdev] Does current LLVM target-independent code generator supports my strange chip?

Wei wei.hu.tw at gmail.com
Wed Nov 26 01:38:34 PST 2008


> I disagree.  This should be handled by the type legalization
> infrastructure.

huh...
As far as I know, the type legalization is in the SelectionDAG phase,
and it is also in the backend. Am I right? or I miss something.

> there is currently no support for anything like f32 -> f24

You say "there is currently no support for anything like f32 -> f24",
does it means I can not write codes like below?

addRegisterClass(MVT::i24, XXXRegisterClass);

If the target-indenpendent codegen supports i24, then I can writes
codes like above, then does it means LLVM backend codegen can handle
any i32->i24 and f32->f24 for me automatically? So that I don't need
to worry about i32->i24 and f32->f24?

> On the other hand, as I mentioned in another email, I think
> i32 -> i24 can be done generically.

I don't think I got you here...
You mean using the legalizer to handle this for me? or modify the
target independent codegen to let it know i24?

Thanks.
Wei.

On Nov 26, 5:07 pm, Duncan Sands <baldr... at free.fr> wrote:
> On Wednesday 26 November 2008 09:31:26 Wei wrote:
>
> > O...k... I try to make some conclusions:
>
> > 1) The conversion from f32 to f24 or i32 to i24 should be written in
> > the backend.
>
> I disagree.  This should be handled by the type legalization
> infrastructure.  After all, that's what it is for!  However
> there is currently no support for anything like f32 -> f24.
> On the other hand, as I mentioned in another email, I think
> i32 -> i24 can be done generically.
>
> > 2) If we use MVT::getIntegerVT() to get i24 LLVM type, then the
> > problem will be:
> >   > target independent codegen's legalizer can not handle this.
> > Because the type legalizer currently assumes that all legal integer
> > types have a power-of-two number of bits.
>
> If i24 is added as a simple value type, then the type legalizer
> can be generalized to handle this without too much difficulty.
>
> Ciao,
>
> Duncan.
> _______________________________________________
> LLVM Developers mailing list
> LLVM... at cs.uiuc.edu        http://llvm.cs.uiuc.eduhttp://lists.cs.uiuc.edu/mailman/listinfo/llvmdev




More information about the llvm-dev mailing list