Use of flags in selection dags

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Use of flags in selection dags

Bagel-2
Can someone tell me, or point me to documentation, that explains the use
of "flags" in the selection DAG?    I figured out that, if one is
present, it must be the last operand.  But when are "flags" used and why?

thanks,
Bagel

_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: Use of flags in selection dags

Duncan Sands
> Can someone tell me, or point me to documentation, that explains the use
> of "flags" in the selection DAG?    I figured out that, if one is
> present, it must be the last operand.  But when are "flags" used and why?

Please give details of the context, such as the kind of node you are looking at.

Thanks,

Duncan.
_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: Use of flags in selection dags

Bagel-2
Duncan Sands wrote:

>> Can someone tell me, or point me to documentation, that explains the use
>> of "flags" in the selection DAG?    I figured out that, if one is
>> present, it must be the last operand.  But when are "flags" used and why?
>>    
>
> Please give details of the context, such as the kind of node you are looking at.
>
> Thanks,
>
> Duncan.
>  
I'm looking at this in general as one would when writing patterns for a
new machine. It appears that flags are used in patterns that use or set
condition codes. Is this because the condition code register is not
modelled or is it more that the dags can't handle two outputs. I just
want to know what the rules are on when and how to use "flags".

Thanks,
Bagel

_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: Use of flags in selection dags

Evan Cheng-2

On Mar 20, 2008, at 9:39 AM, Bagel wrote:

> Duncan Sands wrote:
>>> Can someone tell me, or point me to documentation, that explains  
>>> the use
>>> of "flags" in the selection DAG?    I figured out that, if one is
>>> present, it must be the last operand.  But when are "flags" used  
>>> and why?
>>>
>>
>> Please give details of the context, such as the kind of node you  
>> are looking at.
>>
>> Thanks,
>>
>> Duncan.
>>
> I'm looking at this in general as one would when writing patterns  
> for a
> new machine. It appears that flags are used in patterns that use or  
> set
> condition codes. Is this because the condition code register is not
> modelled or is it more that the dags can't handle two outputs. I just
> want to know what the rules are on when and how to use "flags".

X86 does model condition register as a "physical register output". But  
other targets model them as flags. The later restrict scheduling  
freedom. But if you don't care that much about it, it's easier to get  
right.

Flags are also used in other cases when you want to ensure the  
instructions translated from the two selectiondag nodes are scheduled  
at the same time.

Evan

>
>
> Thanks,
> Bagel
>
> _______________________________________________
> LLVM Developers mailing list
> [hidden email]         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev

_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev