This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Proposal and patch: Allow whitespace in md constraints
- To: Michael Meissner <meissner at cygnus dot com>
- Subject: Re: Proposal and patch: Allow whitespace in md constraints
- From: Hans-Peter Nilsson <hp at bitrange dot com>
- Date: Mon, 14 Feb 2000 15:48:48 -0500 (EST)
- cc: gcc-patches at gcc dot gnu dot org
Thank you for reviewing this.
On Mon, 14 Feb 2000, Michael Meissner wrote:
> On Mon, Feb 14, 2000 at 06:09:32AM -0500, Hans-Peter Nilsson wrote:
> > + Use a simple method since we will not use it for large data. */
> > + strip_whitespace (s)
> On the other hand I don't like this particular implementation. First of all,
> you can't assume the use of memmove in the gen* programs ...
Oops missed that. Doh.
> It also is inefficient that it calls memmove and strlen for each
> space character found.
I believe part of good hacking is knowing when *not* to search further for
a more spiffy implementation. I didn't bother this time, since this code
is only used briefly when building the compiler. The head-comment warned
that it's not supposed to scale to large data. Anyway, with memmove
gone, your solution is the most straightforward one.
> A better implementation would be:
Ok, then. Is it ok to commit, replacing strip_whitespace with your
implementation? I'll add you to the ChangeLog entry, if you don't mind.
brgds, H-P