[LLVMdev] Registers and isel type inference

Jakob Stoklund Olesen stoklund at 2pi.dk
Mon Sep 26 16:03:54 PDT 2011

On Sep 26, 2011, at 2:35 PM, David A. Greene wrote:

> Jakob Stoklund Olesen <stoklund at 2pi.dk> writes:
>>>> - Disable type inference for individual registers entirely, or
>>>> - Add a ValueType field to the Register tablegen class, so types are
>>>> not inferred by enumerating register classes.
>>> I tend to think the second would be preferable, but how would we handle
>>> registers than can hold different types of values?
>> AFAIK, the type inference is only a convenience, you can always use
>> explicit casts to get at the other types.
> True.  Wouldn't that also work for implicit defs?

Yes, I think so.

>> It's the use of HasOneImplicitDefWithKnownVT() that scares me, I don't
>> think there is any workaround for that.
> Can you explain more?  I'm not quiet following.  What workaround is
> needed?  Are you saying that in the current system it's broken because
> it relies on a single type for a register or that replacing it with
> something in a new scheme won't be possible?

It seems that the current system only works for singly typed registers. I don't know if that is a fundamental constraint. Possibly not.


More information about the llvm-dev mailing list