Re: constified note_stores

2008-06-10 Thread Joern Rennecke
On Tue, Jun 10, 2008 at 08:27:43PM +0200, Steven Bosscher wrote: > Actually, hold on a second please. You're only talking in terms of > solutions. But what *exactly* are you trying to do? You ave to > modify the SET_SRC of some SETs. What do these SET_SRCs look like? > This is important, becaus

Re: constified note_stores

2008-06-10 Thread Steven Bosscher
On Tue, Jun 10, 2008 at 8:22 PM, Joern Rennecke <[EMAIL PROTECTED]> wrote: > On Tue, Jun 10, 2008 at 01:44:08PM -0400, Kaveh R. GHAZI wrote: >> I don't understand the point about the asm. > > I need to modify the SET_SRC of the individual SETs presented by > note_stores. The caller of note_stores

Re: constified note_stores

2008-06-10 Thread Joern Rennecke
On Tue, Jun 10, 2008 at 01:44:08PM -0400, Kaveh R. GHAZI wrote: > I don't understand the point about the asm. I need to modify the SET_SRC of the individual SETs presented by note_stores. The caller of note_stores can't pass in the SET RTXes, since they vary for each call of the callback function

Re: constified note_stores

2008-06-10 Thread Kaveh R. GHAZI
On Tue, 10 Jun 2008, Joern Rennecke wrote: > > From: "Ian Lance Taylor" <[EMAIL PROTECTED]> > > >Use CONST_CAST_RTX where necessary. > > On Mon, Jun 09, 2008 at 04:45:14PM -0700, Kaveh R. Ghazi wrote: > > Or pass in a struct pointer to the "data" parameter containing both your > > hash table and t

Re: constified note_stores

2008-06-10 Thread Ian Lance Taylor
Joern Rennecke <[EMAIL PROTECTED]> writes: > Having another copy of note_stores seems simpler and is certainly > more portable. > What do you think about the name walk_stores? Following this approach strictly leads to considerable code duplication, which makes people unhappy. If you want to make

Re: constified note_stores

2008-06-10 Thread Joern Rennecke
> From: "Ian Lance Taylor" <[EMAIL PROTECTED]> > >Use CONST_CAST_RTX where necessary. I think sprinkling const qualifiers liberally over the code and then casting them away whenever they get in the way is worse than having no const qualifiers in the first place. It adds extra text to the code whi

Re: constified note_stores

2008-06-09 Thread Kaveh R. Ghazi
From: "Ian Lance Taylor" <[EMAIL PROTECTED]> Joern Rennecke <[EMAIL PROTECTED]> writes: I have been using note_stores to modify selected assignments. Now when I try to move this code to gcc 4.4, I find that I get a warning because my walker function takes a non-const rtx - and if I make it ta

Re: constified note_stores

2008-06-09 Thread Ian Lance Taylor
Joern Rennecke <[EMAIL PROTECTED]> writes: > I have been using note_stores to modify selected assignments. Now when I > try to move this code to gcc 4.4, I find that I get a warning because > my walker function takes a non-const rtx - and if I make it take a const rtx, > there will be a warning s

constified note_stores

2008-06-09 Thread Joern Rennecke
I have been using note_stores to modify selected assignments. Now when I try to move this code to gcc 4.4, I find that I get a warning because my walker function takes a non-const rtx - and if I make it take a const rtx, there will be a warning somewhere inside because there is a code path where a