This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch] Nathan's improvements to basic_string
- From: Jim Wilson <wilson at tuliptree dot org>
- To: Jan Hubicka <jh at suse dot cz>
- Cc: gcc-patches at gcc dot gnu dot org, libstdc++ at gcc dot gnu dot org
- Date: Fri, 27 Jun 2003 21:05:35 -0700
- Subject: Re: [Patch] Nathan's improvements to basic_string
- References: <3EE8CDF1.6070103@unitus.it><20030612201400.GY8942@tofu.dreamhost.com><20030613215934.GC8942@tofu.dreamhost.com> <u83ci7dqv1.fsf@gromit.moeb><20030619063103.GF17267@kam.mff.cuni.cz><20030619161947.GY8942@tofu.dreamhost.com><20030621125637.GA30588@kam.mff.cuni.cz>
Jan Hubicka wrote:
Nathan Myers <ncm-nospam@cantrip.org> writes:
gnu/include/c++/3.4/x86_64-unknown-linux-gnu/bits/atomicity.h: In
function `int main()':
/amd/ncm/gnu/include/c++/3.4/x86_64-unknown-linux-gnu/bits/atomicity.h:43: error: inconsistent
operand constraints in an `asm'
I don't see any response from Nathan indicating whether or not this
patch fixes his problem. I don't see how it can be related.
You didn't give very good details of what the patch does, but I am
assuming that you have an extended asm with an operand with a +m
constraint, and another operand that is supposed to match the first
operand. This can fail if the two operands get folded differently. Is
this correct? If not, please explain the scenario.
This doesn't seem to apply to the libstdc++ problem, because the
matching operands are supposed to be in a register, not memory.
Change "avoid" to "prevent".
I'm concerned about what this will do to the performance of the
find_best_addr function. It is already an expensive function, and now
you are adding more copy/folding/etc calls inside a loop. Maybe this
could be structured differently? Instead of doing all of this extra
work before calling validate_change, how after doing it afterwards?
This ensures that you only do it once. Otherwise, if we have 100
addresses with the same value, and all 100 of them fail the
validate_change call, then you are doing all of this extra work 100
times. I've seen cases like this before, though I don't know if it
still happens with current sources.
Jim