Re: [PATCH][RFT] Optimization pass-pipeline re-organization [1/n]

2008-08-14 Thread Paolo Bonzini
Richard Guenther wrote: These changes improve tramp3d runtime performance by up to 280%(!) (72s to 25s). Great! Can you check the impact on PR33604? Paolo

Re: Update libtool?

2008-08-06 Thread Paolo Bonzini
That said, updating in trunk is a different matter. There, the question IMHO is mostly which libtool version to update to. The git version may still have a regression or two, but 2.2.4 doesn't have the -fPIC on HP/IA patch from Steve (which would be trivial to backport of course). Alternativel

Re: configuring in-tree gmp/mpfr with "none"?

2008-08-04 Thread Paolo Bonzini
Jay wrote: Because at some point, no released version worked on intel macs. Long since passed and can be removed? I don't think so, http://gmp.darwinports.com/ shows that it is still a problem with 4.2.2. Besides, GMP's authors say that it is often a stress test for compilers, so using mor

Re: GNAT build failure on cross

2008-08-01 Thread Paolo Bonzini
have been changes recently in the libada and ada Makefiles by Paolo Bonzini that might be related. I agree with Arnaud that the most likely explanation is not-recent-enough native tools. But you can try reverting to r138299 to see if my patches are at fault. Paolo

Re: configuring in-tree gmp/mpfr with "none"?

2008-07-31 Thread Paolo Bonzini
Jay wrote: Andrew, Can you explain more why? Because at some point, no released version worked on intel macs. And then gmp/configure runs flex. And then sometimes?always flex tries to run getenv("M4") || "m4". Yes, Flex uses m4. gmp/configure probably should not be setting M4 Yes, I thi

Re: GCC 4.3.2 Status Report (2008-07-31)

2008-07-31 Thread Paolo Bonzini
Ralf Wildenhues wrote: Hi Paolo, * Paolo Bonzini wrote on Thu, Jul 31, 2008 at 02:53:21PM CEST: PR35752, which is a P2 regression caused by libtool, is waiting for approval upstream. Should we make an exception to the usual rules and apply the fix on the branch? If by exception to the

Re: GCC 4.3.2 Status Report (2008-07-31)

2008-07-31 Thread Paolo Bonzini
As we are approaching the intended release date of 4.3.2 we need to address the P1 bugs or downgrade them accordingly. Two of the P1s have patches posted (more than 3 resp. 2 weeks ago), so they just need reviewing. For the record, these are: http://gcc.gnu.org/ml/gcc-patches/2008-07/msg0072

Re: GCC 4.3.2 Status Report (2008-07-31)

2008-07-31 Thread Paolo Bonzini
Priority # Change from Last Report --- --- P13 - 5 P2 115 - 2 P32 - 1 --- --- Total 120 - 8 PR35752, which is a P2 regression

Support for OpenVMS host supports

2008-07-30 Thread Paolo Bonzini
I stumbled in this while looking at how x-* host files are used. There are two files in this configuration that "must be compiled with DEC C". One is vcrt0.o, which has about 5 lines of executable code. This makes me think that it would be best if someone with access to the OS would compile

Re: lto gimple types and debug info

2008-07-29 Thread Paolo Bonzini
For that matter, "print sizeof(X)" should print the same value when debugging optimized code as when debugging unoptimized code, even if the compiler has optimized X away to an empty structure! I disagree. sizeof(X) in the code will return a value as small as possible in that case (so that

Re: lto gimple types and debug info

2008-07-28 Thread Paolo Bonzini
Mark Mitchell wrote: For that matter, "print sizeof(X)" should print the same value when debugging optimized code as when debugging unoptimized code, even if the compiler has optimized X away to an empty structure! I disagree. sizeof(X) in the code will return a value as small as possible in

Re: [Ada] multilib patch take three

2008-07-25 Thread Paolo Bonzini
Laurent GUERBY wrote: On Fri, 2008-07-25 at 10:55 +, Joseph S. Myers wrote: i686-linux-gnu --enable-targets=all and x86_64-linux-gnu are equivalent, differing only in whether the default is 32-bit or 64-bit. Do you select the right files for both multilibs of i686-linux-gnu, as well as for

Re: [Ada] multilib patch take three

2008-07-25 Thread Paolo Bonzini
I volunteer to check if there is support for --enable-multilib=libstdc++-v3,libjava and if not add it. Unfortunately, --disable-multilib=ada cannot work (because --disable-xxx is the same as --enable-multilib=no). Does that mean that libgcc is implicitely multilibed if --enable-multilib= is

Re: [Ada] multilib patch take three

2008-07-25 Thread Paolo Bonzini
Arnaud Charlet wrote: Yes I volunteer. We're in stage1 so we have some time to sort out reported issues before release. OK. I'm still concerned that there is no simple fallback for all targets that will break, except for --disable-multilib which is too strong since it impacts other languages.

Re: [Ada] multilib patch / -imultilib and language drivers

2008-07-22 Thread Paolo Bonzini
What triggers the passing of -imultilib to a language driver? It is passed together with -isystem, -iprefix and friends when %I is in a spec. I'm sure you can define a new spec function and use it to pass the multilib_dir variable down to the Ada driver (see default_compilers, I guess you

Re: [Ada] multilib patch take two => multilib build working

2008-07-22 Thread Paolo Bonzini
Arnaud Charlet wrote: The idea currently is to make these values explicit so that when people read system.ads, they know right away what the right value is. That's "when people read system.ads", not "when people read system-linux-x86.ads". In other words, he's not necessarily against automatic

Re: [Ada] multilib patch take two => multilib build working

2008-07-22 Thread Paolo Bonzini
I think you will end up having to support generating different source trees for each multilib variant to be safe and correct. Yes, that comes out naturally if the RTS is built in libada. In fact, Arnaud said: The idea currently is to make these values explicit so that when people read sys

Re: [Ada] multilib patch take two => multilib build working

2008-07-22 Thread Paolo Bonzini
There is a Standard'Default_Bit_Order so it's the same as Word_Size: we just loose "source" documentation (and gain less diff between target file). Yes, but Arnaud said that system-* constants are written down for a reason. I don't understand *what* is the reason, but that's just because I

Re: [Ada] multilib patch take two => multilib build working

2008-07-22 Thread Paolo Bonzini
Paolo, do you know where to look for the list of multilibs on a given platform in the GCC sources? And if we want to disable some of them for Ada? In the makefile fragments t-*, in places like config/i386/t-linux64 MULTILIB_OPTIONS = m64/m32 MULTILIB_DIRNAMES = 64 32 MULTILIB_OSDIRNAMES = ../

Re: [Ada] multilib patch take two => multilib build working

2008-07-22 Thread Paolo Bonzini
This will need some additionals tests on MULTILIB in the LIBGNAT_TARGET_PAIRS machinery (3 files for x86 vs x86_64, solaris looks like already done, powerpc seem 32 bits only right now, s390/s390x, others?) but it doesn't seem like a blocking issue with the proposed design since each MULTILIB rt

Re: [Ada] multilib patch take two => multilib build working

2008-07-22 Thread Paolo Bonzini
Arnaud Charlet wrote: I had to solve one rts source issue though: gcc/ada/system-linux-x86_64.ads and x86.ads do hardcode the number of bits for a word (64 and 32 respectively), I changed them both to be completely the same and use GNAT defined Standard'Word_Size attribute. - Word_Size: co

Re: [Ada] multilib patch take two => multilib build working

2008-07-22 Thread Paolo Bonzini
I had to solve one rts source issue though: gcc/ada/system-linux-x86_64.ads and x86.ads do hardcode the number of bits for a word (64 and 32 respectively), I changed them both to be completely the same and use GNAT defined Standard'Word_Size attribute. - Word_Size: constant := 64; - Mem

Re: [Ada] multilib first patch

2008-07-20 Thread Paolo Bonzini
To build and be later able to install more than one version of the ada library we need to change (at least) this assumption in some way and keep more than one library build result around. The best way would be to bite the bullet, and move the RTS for real to libada (instead of having libada a

Re: Is this the expected behavior?

2008-07-16 Thread Paolo Bonzini
Mohamed Shafi wrote: 2008/7/15 Ramana Radhakrishnan <[EMAIL PROTECTED]>: I agree with you, but what about when there are still caller save register are available and there are no register restrictions for any instructions? In my case i find that GCC has used only the argument registers, sta

Re: Inefficient loop unrolling.

2008-07-10 Thread Paolo Bonzini
Bingfeng Mei wrote: Steven, I just created a bug report. You should receive a CCed mail now. I can see these issues are solvable at RTL-level, but require lots of efforts. The main optimization in loop unrolling pass, split iv, can reduce dependence chain but not extra ADDs and alias issue. What

Re: 4.3.0 and 4.3.1 don't build startfiles (crtXXX.o files)

2008-06-08 Thread Paolo Bonzini
1) Binutils 2) Whatever bits of compiler are required to produce... 3) libc headers 4) A basic C compiler+libgcc that is sufficient to build... 5) libc 6) A full compiler+runtime, c++, fortran, etc. If someone is willing to expand on the above and explain what exactly do I need to do in step 2,

Re: 4.3.0 and 4.3.1 don't build startfiles (crtXXX.o files)

2008-06-08 Thread Paolo Bonzini
Then, running "make all-target-libgcc" built them, but I finally settled for just "make" - it didn't error out. Yes, the advantage of Paul's suggested process are not only that the installations are reproducible and always use the complete feature set of the underlying libc (that's the big p

Re: Question about building hash values from pointers

2008-05-30 Thread Paolo Bonzini
it's uintptr_t which should be used, if only as an intermediate cast - (unsigned long)(uintptr_t)ptr. That's not possible because, IIRC, gcc must compile on C90 systems. Right, so the only type remaining is size_t. IIRC there is problem for this type on some targets, too. AFAIC there are 24-

Re: [RFC] Adjust output for strings in tree-pretty-print.c

2008-05-19 Thread Paolo Bonzini
FX wrote: I think the best thing to do is to have a langhook then. It seems a bit weird to have a langhook for a one-character difference, but if there's a consensus on it, I'll go along. To me too, but I still maintain that it's better to print in UTF-8 (which would make the langhook more u

Re: [RFC] Adjust output for strings in tree-pretty-print.c

2008-05-19 Thread Paolo Bonzini
Notice the added final '\0' in the C case; I don't know if it's bad to have it there, but I don't see a way to not output it and still have the correct output for Fortran (whose strings are not NUL-terminated). I think the best thing to do is to have a langhook then. I'm actually not sure th

Re: Division using FMAC, reciprocal estimates and Newton-Raphson - eg ia64, rs6000, SSE, ARM MaverickCrunch?

2008-05-09 Thread Paolo Bonzini
I'd like to implement something similar for MaverickCrunch, using the integer 32-bit MAC functions, but there is no reciprocal estimate function on the MaverickCrunch. I guess a lookup table could be implemented, but how many entries will need to be generated, and how accurate will it have to b

Re: Weird result for modulus operation

2008-04-30 Thread Paolo Bonzini
Thanks for the speedy reply. But why this code: int a = 17, b = 16; a = a++ % 16; Huh? Now you got me confused. Since it is an undefined behaviour, gcc is free to whatever it likes. Sure, but if you ask gcc to signal a warning, it is supposed to do so. :-) It is a bug that

Re: Weird result for modulus operation

2008-04-29 Thread Paolo Bonzini
Ang Way Chuang wrote: Ang Way Chuang wrote: Andrew Pinski wrote: On Tue, Apr 29, 2008 at 9:08 PM, Ang Way Chuang <[EMAIL PROTECTED]> wrote: Thanks for the speedy reply. But why this code: int a = 17, b = 16; a = a++ % 16; results in a = 2 then? I think I need to know what i

Re: Security vulernarability or security feature?

2008-04-27 Thread Paolo Bonzini
I think Java handles it OK for floats. I.e. Tests for positive infinity and negative infinity etc. I don't think Java handles it for integer maths. Java integer math is mandated to have wrap-around semantics. So you can do something like if ((b^c) > 0 && (a^c) < 0 && (a^b) < 0) overflow

Re: IRA for GCC 4.4

2008-04-24 Thread Paolo Bonzini
(The testcase is 400k lines of preprocessed Fortran code, 16M is size, available here: http://www.pci.unizh.ch/vandevondele/tmp/all_cp2k_gfortran.f90.gz) Thanks, I'll check it. Vlad, I think you should also try to understand what does trunk do with global (and without local allocation)

Re: US-CERT Vulnerability Note VU#162289

2008-04-15 Thread Paolo Bonzini
A theoretical argument for why somebody might write problematic code is http://www.fefe.de/openldap-mail.txt . But that's like "putting the cart before the horses" (and complaining that it does not work). You find a security problem, you find a solution, you find the compiler optimizes awa

Re: US-CERT Vulnerability Note VU#162289

2008-04-13 Thread Paolo Bonzini
(as an aside, as most target implementations treat pointers as unsigned values, its not clear that presuming signed integer overflow semantics are a reasonable choice for pointer comparison optimization) The point is not of presuming signed integer overflow semantics (I was corrected on this

Re: Copyright assignment wiki page

2008-04-08 Thread Paolo Bonzini
Then I suggest changing our contribute page from contact us (either via the gcc@gcc.gnu.org list or the GCC maintainer that is taking care of your contributions) to obtain the relevant forms to contact us (either via the gcc@gcc.gnu.org list or a GCC Steering Commitee member) to obtain the

Re: US-CERT Vulnerability Note VU#162289

2008-04-07 Thread Paolo Bonzini
Rainer Emrich wrote: http://www.kb.cert.org/vuls/id/162289 Any comments? See http://www.airs.com/blog/archives/120 for a good blog post by Ian Lance Taylor about this issue. -Wstrict-overflow=5 can be used to find cases where optimizations break not standard specified overflow cases, sinc

Re: RFC Test suite fix testing of no_trampolines

2008-04-05 Thread Paolo Bonzini
Andy H wrote: There are several test in testsuite that use trampolines that are still run with dejagnu switch set to no_trampolines. Its on my TODO list for AVR target but a recent email reminded me that it affects testing of other targets than can't or won't support trampolines. Theres a

Re: Bootstrap comparison failures on i586

2008-04-03 Thread Paolo Bonzini
Eric Botcazou wrote: Hi, Since yesterday I'm having seemingly random bootstrap comparisons failures on i586-suse-linux: for caller-save.o yesterday, for build/gensupport.o today at revision 133861. But a second tree at the same revision bootstrapped fine. Is anyone else seeing this? Have

Re: Bootstrap failure due to a typo in gcc/fwprop.c

2008-04-02 Thread Paolo Bonzini
This is due to revision 133828 and fixed by the following patch: --- ../_gcc_clean/gcc/fwprop.c 2008-04-02 12:12:57.0 +0200 +++ gcc/fwprop.c2008-04-02 13:44:07.0 +0200 @@ -231,7 +231,7 @@ PR_HANDLE_MEM is set when the source of the propagation was not anothe

Re: GSOC Student application

2008-04-01 Thread Paolo Bonzini
Joe> It's best to ignore J.C. Pizarro. He's an attention-seeking troll, Joe> who has just enough technical knowledge to derail conversation. I think that if we've reached the point where an SC member feels the need to post disclaimers about someone's posts, then that someone ought to simply be

Re: GSOC Student application

2008-03-30 Thread Paolo Bonzini
There are issues of Garbage Collection from libgcc or Boehms's GC Two mistakes in one line. Congratulations J.C. for confusing a prospective GSoC contributor. So far your messages were just useless and decreasing signal-to-noise ratio. Now you've escalated to actually damaging activity.

Re: Official GCC git repository

2008-03-26 Thread Paolo Bonzini
I was only suggesting it as a nicity, if people are happy with the login name alone. What about "Real Name <[EMAIL PROTECTED]>"? The overseers have the mapping, or you can sort of guess it from the names in the ChangeLog. This has to be decided before the first push, so it's kind of urgent

Re: [trunk] Addition to subreg section of rtl.text.

2008-03-24 Thread Paolo Bonzini
The second is to say explicitly that subregs of subregs are not legal. Yes, you should always use (directly or indirectly) simplify_gen_subreg. Paolo

Re: Different *CFLAGS in gcc/Makefile.in

2008-03-21 Thread Paolo Bonzini
## the C flags (without any gcc -I...stuff) to be included in ## compilation of MELT generated C code thru the melt-cc-script ## do not put $(INTERNAL_CFLAGS) $(COVERAGE_FLAGS) $(WARN_CFLAGS) ##there! MELT_CFLAGS= $(X_CFLAGS) $(T_CFLAGS) $(CFLAGS) $(XCFLAGS) But I'm not sure of the T_CFLAGS (i

Re: [trunk] Addition to subreg section of rtl.text.

2008-03-20 Thread Paolo Bonzini
Bernd Schmidt wrote: Joern Rennecke wrote: And @code{(subreg:SI (reg:DF 10) 0)} would be a natural way to express that you are using the floating point register as a 32 bit integer register, with writes clobbering the entire 64 bit of the register. Yes, this is one possible definition. But th

Re: [trunk] Addition to subreg section of rtl.text.

2008-03-20 Thread Paolo Bonzini
(Yes, the documentation suggests byte_mode for MEMs, but the SH port uses zero_extracts of SImode MEMs as well, so presumably we're supposed to support other modes besides the documented ones.) I think it is just that no one cares about a MEM's mode in this case. Paolo

Re: [trunk] Addition to subreg section of rtl.text.

2008-03-20 Thread Paolo Bonzini
Richard Sandiford wrote: Paolo Bonzini <[EMAIL PROTECTED]> writes: I think one reason is that allowing zero_extracts of multi-word modes is (like this subreg thing) a little hard to pin down. What happens when WORDS_BIG_ENDIAN && !BYTES_BIG_ENDIAN Unless I had my grep wrong,

Re: [trunk] Addition to subreg section of rtl.text.

2008-03-20 Thread Paolo Bonzini
I think one reason is that allowing zero_extracts of multi-word modes is (like this subreg thing) a little hard to pin down. What happens when WORDS_BIG_ENDIAN && !BYTES_BIG_ENDIAN Unless I had my grep wrong, the only such machines to do this are PDP11 and ARM with special flags (-mbig-endia

Re: why don't have 'umul' rtx code

2008-03-18 Thread Paolo Bonzini
Eric Fisher wrote: hi I'm not clear why we have 'udiv', but don't have 'umul' for Standard Pattern Names. Does I need to define a nameless pattern for it? Because non-widening multiplication is the same for signed and unsigned. We have: mul3 mul3 (signed x signed) umul3 (u

Re: Official GCC git repository

2008-03-14 Thread Paolo Bonzini
My current plan is to bug a few of our devs to try git, and a few to try hg (for a few weeks each), giving them whatever tutorials are around, and see if they find it better enough than subversion. I can try to use git, but I'm already quite experienced in it so I'm not representative. (Pe

Re: Official GCC git repository

2008-03-14 Thread Paolo Bonzini
Bernardo Innocenti wrote: Harvey Harrison wrote: A few things I'd like to clean up if we move a copy over: 1) generate a author's file so the commits have better than just a login name as the commiter/author. Or in the ChangeLog. Paolo

Re: Official GCC git repository

2008-03-14 Thread Paolo Bonzini
I could never understand why anyone would use anything but CVS (if that works for them), or git. The VCS-du-jour craze just confuses me. I could understand a lot why people would use subversion and not CVS. Not that I like subversion a lot (the trunk/branches/tags system seems a bit ad-hoc f

Re: Possible gcc-4.3 regression wrt bootstrapping the toolchain

2008-03-10 Thread Paolo Bonzini
If you just want to build just gcc and libgcc, not any other target libraries, do make all-gcc && make all-target-libgcc ah great. that should work. can you tell me the equivalent of install-gcc,too? make install-gcc install-target-libgcc Or, just configure with --disable-libmudflap if it

Re: RELEASE BLOCKER: Linux doesn't follow x86/x86-64 ABI wrt direction flag

2008-03-06 Thread Paolo Bonzini
If the malicious process can send a signal to another process, it could also ptrace() it. Which is more useful, if you wanted to be malicious? And more to the point, it can happen before GCC 4.3.0. Yes, and that's why the kernel should just fix it, and the fix should be backported and trea

Re: RELEASE BLOCKER: Linux doesn't follow x86/x86-64 ABI wrt direction flag

2008-03-06 Thread Paolo Bonzini
Jack Lloyd wrote: On Thu, Mar 06, 2008 at 07:13:20PM +0100, Paolo Bonzini wrote: A process can send a signal via kill. IOW, a malicious process can *control when the process would be interrupted* in order to get it into the signal handler with DF=1. If the malicious process can send a

Re: RELEASE BLOCKER: Linux doesn't follow x86/x86-64 ABI wrt direction flag

2008-03-06 Thread Paolo Bonzini
Olivier Galibert wrote: On Thu, Mar 06, 2008 at 09:58:41AM -0800, Joe Buck wrote: If the kernel allows state to leak from one process to another, for example from a process running as root to a process running as an ordinary user, it's a bug, with possible security implications. I don't think

Re: RELEASE BLOCKER: Linux doesn't follow x86/x86-64 ABI wrt direction flag

2008-03-06 Thread Paolo Bonzini
Another story, the sad story of the intel chip (I think it was the 80188) where Intel made use of Int 5, which was documented as reserved. Unfortunately, Microsoft/IBM had used this for print screen or some such. Intel was absolutely right that their documentation was clear and it was wrong to h

Re: RELEASE BLOCKER: Linux doesn't follow x86/x86-64 ABI wrt direction flag

2008-03-06 Thread Paolo Bonzini
Olivier Galibert wrote: On Wed, Mar 05, 2008 at 05:12:07PM -0800, H. Peter Anvin wrote: It's a kernel bug, and it needs to be fixed. I'm not convinced. It's been that way for 15 years, it's that way in the BSD kernels, at that point it's a feature. The bug is in the documentation, nowhere el

Re: [RFA] optimizing predictable branches on x86

2008-03-03 Thread Paolo Bonzini
I hope so too. For the kernel we have some parts where __builtin_expect is used quite a lot and noticably helps, and could help even more if we cut down the use of cmov too. I guess on architectures with even more predictated instructions it could be even more useful too. Looking at kernel's __

Re: [RFA] optimizing predictable branches on x86

2008-03-03 Thread Paolo Bonzini
/* High branch cost, expand as the bitwise OR of the conditions. Do the same if the RHS has side effects, because we're effectively turning a TRUTH_OR_EXPR into a TRUTH_ORIF_EXPR. */ ! if (BRANCH_COST (!optimize_size, false)>= 4 ! || TREE_SIDE_EFFECTS (TR

Re: [PATCH][4.3] Deprecate -ftrapv

2008-03-03 Thread Paolo Bonzini
Unless printing "This application has requested the Runtime to terminate it in an unusual way." counts an issuing a contraint_error in Ada, it seems to me that -ftrapv and Ada have differing requirements. How can you portabilty and correctly generate a constraint_error if the code generated by -

Re: [PATCH][4.3] Deprecate -ftrapv

2008-03-01 Thread Paolo Bonzini
I missed once point noticed by Joseph also, that the libgcc implementation uses signed types in the implementation of the trapping arithmetics. Where we of course optimize away the overflow check, so the libgcc routines will never trap. (if it does work in some cases then this would be a missed o

Re: [PATCH][4.3] Deprecate -ftrapv

2008-03-01 Thread Paolo Bonzini
Well presumably one would want to use target dependent stuff for detecting overflow where it exists (sticky overflow bits on power, O flag on PC, trapping add on MIPS etc). On the whole I think you'd want to benefit from tree-ssa optimizing overflow checks where possible (including optimizing

Re: birthpoints in rtl.

2008-03-01 Thread Paolo Bonzini
And there's another special-case treatment for libcalls. On top of REG_LIBCALL/REG_RETVAL/REG_LIBCALL_ID. This is bug prone. For GCC 4.3 alone, I've fixed half a dozen libcall blocks related bugs, and others have fixed at least as many. Not to mention all the extra work they caused for the peop

Re: [PATCH][4.3] Deprecate -ftrapv

2008-03-01 Thread Paolo Bonzini
Richard Kenner wrote: int f(int a, int b) { return 0 * (a + b); } get the potentially trapping arithmetic folded away. If -ftrapv is to have properly defined semantics, those must include trapping if (a + b) overflows in the above code. Why? Is there any language that requires such semanti

Re: [PATCH][4.3] Deprecate -ftrapv

2008-03-01 Thread Paolo Bonzini
Seems a pity, this feature is really needed for Ada, which requires efficient overflow checking for signed arithmetic, and it seems useful for C, where signed overflow is undefined, and it would be nice to enable trapping. Right now, Ada uses really horrible double length arithmetic to do trapp

Re: birthpoints in rtl.

2008-03-01 Thread Paolo Bonzini
Diego Novillo wrote: On 2/29/08 7:04 PM, Steven Bosscher wrote: I am not sure what would happen if GCC would start using FUD chains. Is it like in SSA that every register is assigned only once? But this would only affect the UD chains built by the DF code. Yes, that's what I meant by "no su

Re: birthpoints in rtl.

2008-03-01 Thread Paolo Bonzini
By the way, I still don't understand how birth points would work. Can someone give an example of what the insn stream would look like with birth points, and what the DU/UD chains would look like? With a big IIUC, and using a high-level IR for simplicity if (a < 5) goto BB1; else goto BB2;

Re: birthpoints in rtl.

2008-02-28 Thread Paolo Bonzini
Thanks for the quick response. As it turns out, the libcall issue will soon be gone, as bonzini will be deleting them. We have finally overcome that issue. Not really. There seems always to be something that prevents them from being deleted, and I have no time to spend on GCC at work righ

Re: decl_constant_value_for_broken_optimization

2008-02-27 Thread Paolo Bonzini
In the current compiler, it seems very likely that every call to decl_constant_value_for_broken_optimization can simply be removed. The constant propagation passes should implement the optimization. What about format checking for constant arrays? :-( That's the testcase that Joseph wrote for

Re: Redundant logical operations left after early splitting

2008-02-25 Thread Paolo Bonzini
What's important here is that reg1 is being set multiple times. You'd be better off if you can twiddle the splitters to avoid this behavior. If you need a new pseudo, then get one :-) I agree with this, but... Once you do that, local would propagate these things better. That still leaves t

Re: Redundant logical operations left after early splitting

2008-02-21 Thread Paolo Bonzini
Putting fwprop after combine is no problem - but is too early - none of the patterns would be split at that time - preventing byte level propagations. Yeah, I meant "after split" actually. Anyway, the problem is that if the RHS becomes a constant, fwprop does not propagate the LHS anymore.

Re: Redundant logical operations left after early splitting

2008-02-20 Thread Paolo Bonzini
This would indicate that simplify-rtx inside fwprop is removing OR Rx,0 but not picking up the the additionally revealed forward propagation oppertunities This would seem to be an avoidable limitation. Yes, can you send me your MD patch and a simple testcase? fwprop is supposed to be "cas

Re: Redundant logical operations left after early splitting

2008-02-20 Thread Paolo Bonzini
Propagating REG_EQUIV notes across register-register moves would seem to a obviously simple way to fix this. Thoughts? I am not sure local-alloc is the best place to address the overall problem, I doubt it is intended to provide such optimizations. An additional cse pass after split would see

Re: Redundant logical operations left after early splitting

2008-02-20 Thread Paolo Bonzini
As I understand it (perhaps wrongly), actual splitting only occurs after combine pass (by split1 pass). Combine has some limited splitting capabilities. For example it can try to combine 3 insns, which might not match a pattern, but can match a splitter which generates 2 insns. I don't recall

Re: Redundant logical operations left after early splitting

2008-02-20 Thread Paolo Bonzini
Is there any particular function or pass that should be dealing with IOR rx,0 - that I could trace thru and figure out why it does not like it (or never gets there)? I would be looking in combine and simplify-rtx (which is called by combine). If your splitter triggers after combine, then I'm

Re: GCC 4.3 branch created, 4.4 opens for stage1

2008-02-19 Thread Paolo Bonzini
PR34950 - Jason/Mark, could you help with this? It is 4.2/4.3 regression, so perhaps doesn't need to hold the rc PR35218 - I believe the latest patch worked for the tester, so we now have a patch and just need an approval? PR35232 - I'

Re: GCC 4.3 branch created, 4.4 opens for stage1

2008-02-19 Thread Paolo Bonzini
Ralf Wildenhues wrote: * Jakub Jelinek wrote on Tue, Feb 19, 2008 at 12:18:02AM CET: PR35218 - I believe the latest patch worked for the tester, so we now have a patch and just need an approval? Yes, the patch is at

Re: omp_get_num_procs() not working on macintosh?

2008-02-18 Thread Paolo Bonzini
If so, someone familiar with Darwin needs to provide (a tested) darwin specific proc.c implementation which can be added to libgomp/config/darwin/proc.c to replace the libgomp/config/posix/proc.c version. Here is code that does so: #include #include int main() { int mib[2] = {

Re: Problem with libiberty's hash tables

2008-02-15 Thread Paolo Bonzini
If the latter, of course you could write pointer_map_delete yourself; it might be worthwhile since pointer maps are a tad faster than libiberty hashtabs. It's on my todo list, but I wrote pointer_map for my private work on gcc and it was not needed at the time. But didn't you say the need t

Re: Problem with libiberty's hash tables

2008-02-15 Thread Paolo Bonzini
The structures left at the end (which correspond to memory leaks) are then displayed to allow the user to fix his leaks. The CPU usage is probably the limiting factor, here, as I want to avoid slowing the program down more than necessary. Sure it's faster this way, but what's wrong with valgr

Re: Problem with libiberty's hash tables

2008-02-15 Thread Paolo Bonzini
FX wrote: Hi all, I've started using libiberty's hashtab in libgfortran for some of my gfortran work to track memory allocations in the library. I store custom structures in a hash table, each structure containing a unique pointer (it is a malloc'ed address) that is used for the hash. When I tra

Re: How to implement efficiently builtins for dual-result instructions ?

2008-02-07 Thread Paolo Bonzini
[(set (subreg:SI (match_operand:DI 0 "register_operand") 0) (unspec [...] SUPER_LD32_LO)) (set (subreg:SI (match_operand:DI 0 "register_operand") 4) (unspec [...] SUPER_LD32_HI))] I finally looked at my code instead of going by memory. :-) I think you should turn what you h

Re: How to implement efficiently builtins for dual-result instructions ?

2008-02-07 Thread Paolo Bonzini
In the response of Paolo I also don't understand how the DI pseudo could be mapped on two consecutive SI regs. I think gcc always will map a multiword pseudo on consecutive word-size regs. Am I wrong here ? Oops, I forgot a part. In the RTL description don't write [(set (match_operand:D

Re: How to implement efficiently builtins for dual-result instructions ?

2008-02-04 Thread Paolo Bonzini
To invoke this instruction from the source level, a compiler builtin is provided. Since C syntax doesn't provide functions with two results, this builtin refers to them via pointers:__super_ld32( int* x, int *y, int *a) I did something similar in a private port by folding the builtin to lon

Re: Mainline is now regression and documentation fixes only

2008-01-25 Thread Paolo Bonzini
Jakub Jelinek wrote: On Wed, Jan 23, 2008 at 06:50:02PM +0100, Bernhard Fischer wrote: On Wed, Jan 23, 2008 at 12:06:22PM +0100, Richard Guenther wrote: As we now reached the goal of less than 100 open serious regressions against GCC 4.3, we are as of now in regression and documentation fixes o

Re: Plugin Branch

2008-01-22 Thread Paolo Bonzini
Brendon Costa wrote: Can we count on the fact that the SVN branch will be synced from time to time to the mainline ? synchronized ...from... the mainline... Yes. When you say it will be synchronized from time to time, is it possible to make it so that at least for each mainline GCC relea

Re: GCC 4.3 target deprecation proposals

2008-01-22 Thread Paolo Bonzini
I work for a company that makes significant use of gcc to target vax. The people involved are users, not developers, of gcc. Does any part of the deprecation requirements take into account user base, or just developer base? Neither, actually. It's tester base that counts the most. Paolo

Re: Segmentation fault in df-scan.c

2008-01-21 Thread Paolo Bonzini
However,making this simpler works: rtx tmp_reg_rtx = copy_to_mode_reg (QImode,gen_rtx_MEM (QImode, addr1)); emit_move_insn (addr1, gen_rtx_PLUS (Pmode, addr1, const1_rtx)); aka Rx=[Ry] Ry=Ry+1 For now I have gone back to the second case, though the code is not quite as good. When your patter

Re: A simple sample code involving templates, friends and lookup

2008-01-17 Thread Paolo Bonzini
template struct Foo { template friend void func(const Foo &); }; void check(const Foo & x) { // Foo weird; // uncomment this line and all works func(x);// <-- ERROR } Tested with gcc 4.0 - 4.3, and all behave the same: "error: 'func' was not declared in this scope

Re: Changes in C++ FE regarding pedwarns to be errors are harmful

2008-01-14 Thread Paolo Bonzini
Ismail Dönmez wrote: Sunday 13 January 2008 18:03:20 tarihinde Andreas Schwab şunları yazmıştı: Ismail Dönmez <[EMAIL PROTECTED]> writes: That was just an example, real life testcase shows that problem stems from autoconf and its config.h. Projects end up defining things like HAVE_STDLIB_H twic

Re: -Wparentheses lumps too much together

2008-01-12 Thread Paolo Bonzini
Andreas Schwab wrote: Ian Lance Taylor <[EMAIL PROTECTED]> writes: I'm inclined to approve this if -Wprecedence stays in -Wall, but I'd like to hear if anybody else has anything to say. The name of the option is rather poor, IMHO. -Wparentheses warns about precedences, so what is the differe

Re: How to stop gcc from not calling noinline functions

2008-01-12 Thread Paolo Bonzini
(Yeah, new attributes "impure" and/or "nonconst" would solve this, but only for IPA and there's already the existing option and asm I mentioned. And if you say different files/compilation units, I say LTO.) I think the asm is your best bet. Paolo

Re: Changes in C++ FE regarding pedwarns to be errors are harmful

2008-01-09 Thread Paolo Bonzini
Not at all!!! -fpermissive can (in weird cases, agreed) change code generation. I'm pretty sure you don't want to risk that only to silence an error. What? That doesn't make any sense. And it is certainly not documented in the manual. I will be very interested in an example, no matter how wei

Re: Changes in C++ FE regarding pedwarns to be errors are harmful

2008-01-09 Thread Paolo Bonzini
Andrew Pinski wrote: On 1/8/08, Ismail Dönmez <[EMAIL PROTECTED]> wrote: Oh that clears up my confusion. So the right fix would be downgrading this redefinition problem to be pedwarn instead. But I see no point in creating a bug report if its just gonna be closed as invalid, so I hope we can dis

Re: Something is broken in repack

2007-12-14 Thread Paolo Bonzini
I'm thinking about "git clone --keep" to mark initial packs precious. But 'git clone' is under rewrite to C. Let's wait until C rewrite is done. It should be the default, IMHO. Paolo

Re: Something is broken in repack

2007-12-13 Thread Paolo Bonzini
Is there an alternative to "git repack -a -d" that repacks everything but the first pack? That would be a pretty good idea for big repositories. If I were to implement it, I would actually add a .git/config option like pack.permanent so that more than one pack could be made permanent; then

<    1   2   3   4   5   6   7   8   9   10   >