[LLVMdev] PR400 - alignment for LD/ST

Devang Patel dpatel at apple.com
Mon Apr 2 21:23:17 PDT 2007


On Apr 2, 2007, at 4:07 PM, Christopher Lamb wrote:

>
> On Apr 2, 2007, at 5:01 PM, Devang Patel wrote:
>
>>
>> However, that means, for loops this becomes "load is N bytes away
>> from a 8-byte aligned data" where N is dependent on IV.

I said, this but I am not sure it is OK to say

	%tmp = load i32* %tmp1, align N
>
> So in the loop case analysis of the IV is necessary to determine  
> the actual alignment?

only, if array index is based on IV

> Would the form for the loops require that the offset be tracked as  
> a multiple of the IV stride?

How to represent

	A[ I + 4],  where I is IV
?

> Would the IV stride analysis normally be performed in the front end  
> (and thus end up in the BC)?

unlikely. Induction variable analysis pass is more suitable to  
provide this info.

-
Devang

> If this is the the case then I'd take Chris's suggestion of the  
> <align, offs> pair, as it is clear in the static offset case and  
> the actual alignment could be deduced,  along with an <align,  
> stride> pair for the IV case. This the previous meaning of simply  
> <align> would be equivalent to <align, stride> where align == stride.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20070402/812c1942/attachment.html>


More information about the llvm-dev mailing list