I would like to modify the compiler to classify variables, which will ultimately determine the position the variables are stored in memory. What would be the best approach to accomplish this? I was thinking of modifying the lexer and parser to add a new attribute and have the machine code generator handle memory mapping accordingly. Does anyone have experience with this sort of exercise? How would this best be done with the LLVM system? My target is an x86 machine. Thanks, C.J. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090925/98da1fef/attachment.html>
On Sep 25, 2009, at 8:49 AM, C.J. Manville wrote:> I would like to modify the compiler to classify variables, which > will ultimately determine the position the variables are stored in > memory. What would be the best approach to accomplish this? > > I was thinking of modifying the lexer and parser to add a new > attribute and have the machine code generator handle memory mapping > accordingly. Does anyone have experience with this sort of > exercise? How would this best be done with the LLVM system?Hi CJ, if you're interested at doing this at the source level, you might be interested in checking out Clang: http://clang.llvm.org. -Chris
Chris Lattner wrote:> On Sep 25, 2009, at 8:49 AM, C.J. Manville wrote: > > >> I would like to modify the compiler to classify variables, which >> will ultimately determine the position the variables are stored in >> memory. What would be the best approach to accomplish this? >> >> I was thinking of modifying the lexer and parser to add a new >> attribute and have the machine code generator handle memory mapping >> accordingly. Does anyone have experience with this sort of >> exercise? How would this best be done with the LLVM system? >> > > Hi CJ, if you're interested at doing this at the source level, you > might be interested in checking out Clang: http://clang.llvm.org. > > -Chris >This would be nice to have in frontend. Currently, for such cases PIC16 uses a workaround to encode the information in the section attribute for the variables. - Sanijv> _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >