[LLVMdev] Type Legalizer Question.
sanjiv gupta
sanjiv.gupta at microchip.com
Wed Oct 1 03:01:41 PDT 2008
On Wed, 2008-10-01 at 11:12 +0200, Duncan Sands wrote:
> Hi,
>
> > I have another query related to type legalizer.
> > Can a target ignore certain nodes during legalize? Probably a hook for
> > target that can be called inside IgnoreNodeResults ()?
>
> while this could be done, I don't like the idea of doing an end-run
> around the whole type legalization infrastructure. So you would have
> to come up with a pretty convincing argument as to why this can't be
> done another way!
>
> > We want to keep certain nodes illegal, especially the pointer nodes.
> > Our target has 16-bit pointer and a few 16-bit insns to perform
> > arithmetic.
> > Rest of the stuff is 8-bit so we want to use legalizer to expand them.
>
> I think x86-32 is capable of doing a small number of 64 bit operations.
> I wonder how they are handled/generated given that i64 is not a legal type?
>
They might be using DAGCombine to convert the operations back to 64-bit.
Also, the pointer is still a legal type (i32) in X86-32.
In our case the pointers themselves are illegal (i16). We have 16-bit
registers that can only hold pointers during indirect addressing. All
other operations and registers are 8-bit. So we still want to expand
everything to 8-bit but still keep the pointer nodes as an i16 node, a
pair that in turn holds the expanded parts.
- Sanjiv
> Ciao,
>
> Duncan.
More information about the llvm-dev
mailing list