Christopher, On Mar 29, 2007, at 12:49 PM, Devang Patel wrote:> > On Mar 29, 2007, at 12:24 PM, Christopher Lamb wrote: > >> Is anyone actively working on this currently? It's marked as >> unassigned in BZ. > > In next few days I'll get to this. At the moment I'm enabling Packed > Structure support in llvm-gcc (based on patches developed by other > llvm developers) and adding support for packed bit fields. As part of > this work, alignment for LD/ST is required to access packed structure > fields which are not aligned naturally.I get many distractions per day, so do not hesitate if you want to take care of PR 400 now. - Devang
On Mar 29, 2007, at 3:54 PM, Devang Patel wrote:> Christopher, > > On Mar 29, 2007, at 12:49 PM, Devang Patel wrote: > >> >> On Mar 29, 2007, at 12:24 PM, Christopher Lamb wrote: >> >>> Is anyone actively working on this currently? It's marked as >>> unassigned in BZ. >> >> In next few days I'll get to this. At the moment I'm enabling Packed >> Structure support in llvm-gcc (based on patches developed by other >> llvm developers) and adding support for packed bit fields. As part of >> this work, alignment for LD/ST is required to access packed >> structure >> fields which are not aligned naturally. > > I get many distractions per day, so do not hesitate if you want to > take care of PR 400 now.I'm not really sure exactly what's left to do to fully implement what I need. I had assumed that this work would allow me to determine if a LD/ST was based on an aligned pointer or not, but this seems now like the tip of the iceberg. I'm hoping that I can declare aligned types and retain that information when I pass a pointer to one of these types to function, or declare a pointer to an aligned type as a local variable. It seems that implementing this not only requires the alignment attribute on loads and stores (in the LLVM bc) but propagation of this information from the frontend. Is this correct? -- Christopher Lamb christopher.lamb at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20070329/b5e6de49/attachment.html>
On Thu, 29 Mar 2007, Christopher Lamb wrote:>> I get many distractions per day, so do not hesitate if you want to >> take care of PR 400 now. > > I'm not really sure exactly what's left to do to fully implement what I need. > I had assumed that this work would allow me to determine if a LD/ST was based > on an aligned pointer or not, but this seems now like the tip of the iceberg. > > I'm hoping that I can declare aligned types and retain that information when > I pass a pointer to one of these types to function, or declare a pointer to > an aligned type as a local variable. It seems that implementing this not only > requires the alignment attribute on loads and stores (in the LLVM bc) but > propagation of this information from the frontend. > > Is this correct?Yes, but the front-end already has this information. I believe that the only missing piece (for over-aligned data) is being able to represent that info on the load/store instructions. -Chris -- http://nondot.org/sabre/ http://llvm.org/
On Mar 29, 2007, at 2:42 PM, Christopher Lamb wrote:> I'm not really sure exactly what's left to do to fully implement > what I need. I had assumed that this work would allow me to > determine if a LD/ST was based on an aligned pointer or not, but > this seems now like the tip of the iceberg. > > I'm hoping that I can declare aligned types and retain that > information when I pass a pointer to one of these types to > function, or declare a pointer to an aligned type as a local > variable. It seems that implementing this not only requires the > alignment attribute on loads and stores (in the LLVM bc) but > propagation of this information from the frontend.AFAIU, tasks are: 1) Update LLVM LD/ST instructions to maintain alignment information 2) Update FE to provide alignment info for LD/ST instructions if it is determined that memory reference is not aligned naturally. 3) Update target specific code gens to respect alignment information associated with LD/ST - Devang -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20070330/3de8d175/attachment.html>