[Patch] Nathan's improvements to basic_string

Jim Wilson wilson@tuliptree.org
Sat Jun 28 04:07:00 GMT 2003


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



More information about the Libstdc++ mailing list