[LLVMdev] PR400 - alignment for LD/ST

Christopher Lamb christopher.lamb at gmail.com
Sat Mar 31 23:08:22 PDT 2007


On Mar 31, 2007, at 4:16 PM, Reid Spencer wrote:

>> 3. Create pseudo ops for 'attributed' load/store instructions. These
>> instructions contain a set of optional attributes encoded in some  
>> way.
>> The current volatile load/store instructions could be subsumed by
>> these instructions.
>>
>> I'm leaning away from 1, but unsure whether 2 or 3 is better.
>
> 3 is best. opcodes are at a premium (six bits) and consuming 8 or more
> of them for load/store won't work (there isn't enough left). #2 could
> work but it penalizes the (hopefully more common) natural alignment
> case. So, I would just conver the Store+Volatile and Load+Volatile
> opcodes into Store+Attributes and Load+Attributes. Then the  
> volatile and
> alignment attributes can be added for those (relatively uncommon)  
> cases.

Sounds good.

Also I wanted to clear something up about the meaning of the  
alignment attribute. My thinking is that this indicates over/under  
alignment with respect to natural alignment for the type. This is to  
say in the Load/Store instruction classes the default alignment value  
will be zero, meaning natural alignment for the given type. If the  
alignment value is nonzero then the alignment value should be used  
over the natural or preferred alignment.

--
Christopher Lamb



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20070401/6f902e68/attachment.html>


More information about the llvm-dev mailing list