[LLVMdev] Help on DAG pattern matching string
Javier Martinez
javier at jmartinez.org
Mon Jul 6 19:34:37 PDT 2009
>
> The patterns are identical since the types of operands
> involved are the same.
This looks like the case since the I32RC and P32RC are both based on
i32. Then, how can I make LLVM assign the pointer class to the register?
I just saw that ScheduleDAGSDNodesEmit.cpp in getInstrOperandRegCLass()
where there's a check of the operand's flag. If the flag has the
LookupPtrRegClass bit set then it looks like the target gets to return
the pointer class to be used for the register. Is this the right way to
proceed and if so how do I set the flag for an instruction?
Thanks,
Javier
On 7/6/2009 2:59 AM, Anton Korobeynikov wrote:
> Hello, Everyone
>
>
>> TargetSelectoinDAG.td and then why the two versions are "identical" in
>> TableGen's mind.
>>
> That's correct. The patterns are identical since the types of operands
> involved are the same. DAG pattern matching is done before regalloc,
> there are not regclasses actually at that point, thus both patterns
> tries to select the same thing...
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090706/9c673c47/attachment.html>
More information about the llvm-dev
mailing list