Re: gen_lowpart called where 'truncate' needed?

2010-02-03 Thread Adam Nemet
Ian Lance Taylor writes: > Mat Hostetter writes: > >> Since the high bits are already zero, that would be less efficient on >> most platforms, so guarding it with something like this would probably >> be smarter: >> >> if (targetm.mode_rep_extended (mode, GET_MODE(x)) == SIGN_EXTEND) >> ret

Re: Support for export keyword to use with C++ templates ?

2010-02-03 Thread Richard Kenner
> It depends on who owns the code that you write. If you own the code, > then you need to sign papers as an individual contributor. I don't think it's that simple. "who owns the code" is not always clear. There's often a question of who that is. That's why if somebody HAS an employer we usually

Re: Support for export keyword to use with C++ templates ?

2010-02-03 Thread Richard Kenner
> I do not know the correct wording in English for this but I am legally > licensed as an individual to offer software consulting services and to > develop software. > > So the so-called employer is really my client, with whom I have signed > a contract for consulting services. If you have exactl

Re: Support for export keyword to use with C++ templates ?

2010-02-03 Thread Ian Lance Taylor
Timothy Madden writes: > On Wed, Feb 3, 2010 at 4:19 AM, Richard Kenner > wrote: >>> I see that what I need is an assignment for all future changes. If my >>> employer is not involved with any contributions of mine, the employer >>> disclaimer is not needed, right ? >> >> It's safest to have it.

Re: gen_lowpart called where 'truncate' needed?

2010-02-03 Thread Ian Lance Taylor
Mat Hostetter writes: > Since the high bits are already zero, that would be less efficient on > most platforms, so guarding it with something like this would probably > be smarter: > > if (targetm.mode_rep_extended (mode, GET_MODE(x)) == SIGN_EXTEND) > return simplify_gen_unary (TRUNCATE, m

Re: Long paths with ../../../../ throughout

2010-02-03 Thread Ian Lance Taylor
Jon writes: > Is there any information about how GCC start up constructors for C/C++ > are generated and called before main you could point me to please. I'd > like to understand how it works. Second half of http://www.airs.com/blog/archives/51 . > I've attached collect2 patch. Let me know what

Re: Support for export keyword to use with C++ templates ?

2010-02-03 Thread Timothy Madden
On Wed, Feb 3, 2010 at 4:19 AM, Richard Kenner wrote: >> I see that what I need is an assignment for all future changes. If my >> employer is not involved with any contributions of mine, the employer >> disclaimer is not needed, right ? > > It's safest to have it.  The best way to prove that your

Re: Long paths with ../../../../ throughout

2010-02-03 Thread Jon
Updated patch attached which includes collect2.h change to bool. Please include my address in any replies. Best regards, Jon Index: collect2.c === --- collect2.c (revision 156482) +++ collect2.c (working copy) @@ -174,7 +174,7 @@

Re: Long paths with ../../../../ throughout

2010-02-03 Thread Jon
Hello Ian Thank you for your reply. Ian Lance Taylor wrote: Jon writes: Is there a way to get collect2 to save the temporary .c file it generates to have a look at it? I believe it may be the __main() function, with the -debug option it gives the attached gplusplus_collect2_log.txt, looking

Re: Question about IRA (setup_allocno_priorities)

2010-02-03 Thread Jeff Law
On 01/28/10 12:30, Vladimir Makarov wrote: It is originated from the old register allocator. I don't think that just nrefs will work well because it is already reflected in the cost. IMHO, log2 (nrefs) is here for taking code size into account which affects code locality and as a consequenc

gen_lowpart called where 'truncate' needed?

2010-02-03 Thread Mat Hostetter
I am porting gcc-4.4.3 to TILE-Gx, a 64-bit VLIW RISC. It's gone pretty well so far; most tests work, Linux builds, etc. Thanks for writing such good documentation. This chip, like MIPS64, maintains the invariant that SImode values in DImode registers are always sign-extended. So I have impleme

Re: [trans-mem] ipa tm pass and dominator walks

2010-02-03 Thread Aldy Hernandez
> This part is ok. Committed. > > (ipa_tm_transform_calls_1): Rename from ipa_tm_transform_calls. > > Only process one block. > > (ipa_tm_transform_calls): Iterate through CFG and call helper > > function. > > This part isn't. As we discussed on IRC, you're missing a check > for

Re: [trans-mem] ipa tm pass and dominator walks

2010-02-03 Thread Richard Henderson
On 02/03/2010 10:26 AM, Aldy Hernandez wrote: I don't think that's true at all. You showed that the walking was incorrect; I don't see you you can now argue that it is correct, regardless of inlining and jump threading. All one needs to create the cfg that exhibits the problem is multiple exits

Re: [trans-mem] ipa tm pass and dominator walks

2010-02-03 Thread Aldy Hernandez
> I don't think that's true at all. You showed that the walking was > incorrect; I don't see you you can now argue that it is correct, > regardless of inlining and jump threading. > > All one needs to create the cfg that exhibits the problem is > multiple exits from the transaction. It's not ter

Re: Parser extension points for plug-ins

2010-02-03 Thread Ludovic Courtès
l...@gnu.org (Ludovic Courtès) writes: > I think it may be useful to allow plug-ins to process, e.g., #pragmas. Of course soon after posting I noticed ‘PLUGIN_PRAGMAS’... Sorry for the noise, Ludo’.

Re: insn length attribute and code size optimization

2010-02-03 Thread Daniel Jacobowitz
On Wed, Feb 03, 2010 at 06:23:19AM -0800, Ian Lance Taylor wrote: > fanqifei writes: > > > According to the internal manual, insn length attribute can be used to > > to calculate the length of emitted code chunks when verifying branch > > distances. > > Can it be used in code size optimization? >

Parser extension points for plug-ins

2010-02-03 Thread Ludovic Courtès
Hello, The current set of plug-in events does not appear to include extension points at the parser level. I think it may be useful to allow plug-ins to process, e.g., #pragmas. That would allow directives à la OpenMP to be added/extended, which is an increasingly popular way to augment C and othe

Re: insn length attribute and code size optimization

2010-02-03 Thread Ian Lance Taylor
fanqifei writes: > According to the internal manual, insn length attribute can be used to > to calculate the length of emitted code chunks when verifying branch > distances. > Can it be used in code size optimization? I suppose it could, but it isn't. Instead of asking the backend for the lengt

insn length attribute and code size optimization

2010-02-03 Thread fanqifei
According to the internal manual, insn length attribute can be used to to calculate the length of emitted code chunks when verifying branch distances. Can it be used in code size optimization? I may change TARGET_RTX_COSTS in my gcc port and return costs regarding the ins lengths. I can see code s

RE: GCC calling GNU assembler

2010-02-03 Thread Bingfeng Mei
GCC just literally emits the string in your asm expression together with other assembly code generated by compiler. Only in next step assembler is invoked by GCC driver. Typically, hard register number is not used so that GCC can do register allocation for inline assembly. Bingfeng > -O

Re: Support for export keyword to use with C++ templates ?

2010-02-03 Thread Paolo Bonzini
On 02/02/2010 05:04 AM, Michael Witten wrote: On Sun, Jan 31, 2010 at 6:38 PM, Paolo Carlini wrote: it's extremely unlikely that the C++ front-end maintainers could even consider reviewing patches from a novice for such an hard to implement feature. That says more about the tangled mess th

GCC calling GNU assembler

2010-02-03 Thread Nikola Ikonic
Hello all, Could anybody please answer me on following question: where is GCC callin assembler where it recognizes assembler code in C function? For example, let's say that there is this line in C code: asm("mov r1,r0"); So, the parser parses this as an assembler string. But where, in GCC code,