From: Weddington, E. <Eri...@at...> - 2010-11-05 02:10:06
|
> -----Original Message----- > From: John Myers [mailto:ato...@gm...] > Sent: Thursday, November 04, 2010 5:43 PM > To: Weddington, Eric > Cc: Borja Ferrer; avr...@li... > Subject: Re: [avr-llvm-devel] Load / Store > > > > Another thing, i dont know how feasible is doing this, > > but should we make program and data space addrs transparent > > to the user? > > > > > > > On Mon, Nov 1, 2010 at 9:10 PM, Weddington, Eric > <Eri...@at...> wrote: > > > > > Yes I believe that would be a useful feature. > > I think we should try as much as possible without, of course, > > violating any language standards. > > It would allow users to write more portable/generic code. > > We probable should have a command line option to > > enable/disable this so users have more control. > > LLVM has an address space qualifier mechanism already so I > > don't think it will take too much work. > > > I definitely agree with the above, except for the part > about a command line option: I would suggest that there be no > command line option for this. It will just be extra work for > something that I doubt anyone will ever use (a command-line > option). Just implement the feature. > > > > Eric, > > I think transparently placing, for example, const qualified > objects in flash will only take creating an LLVM > transformation Pass. Which means the extra work has already > been done by the LLVM Pass Framework. Now if we have to do > work in the front end then I can see your point. > > --John Oh, I'm sorry, I didn't fully grasp what we're talking about here. It really is not appropriate to automatically put const qualified objects in flash. The keyword 'const' has a specific meaning (read-only value) which does not necessarily mean that it should be put into a specific memory space, even if it is a read-only value. We will need to have an additional memory space qualifier on the object to put it in a different address space. That way it is the least surprise to users who are used to using GCC and IAR (and other compilers). Eric |