[PATCH] Add TF support for OpenBSD/i386 and OpenBSD/amd64

2012-10-06 Thread Mark Kettenis
Adds the necessary support bits to libgcc. All other mainstream i386/amd64 targets already have this. Tested on i386-unknown-openbsd5.2 and x86_64-unknown-openbsd5.2. Fixes a couple of testcases. libgcc/: 2012-10-06 Mark Kettenis * config.host (i[34567]86-*-openbsd* and x86_64-

Re: [google] AutoFDO implementation

2012-10-06 Thread Dehao Chen
On Sat, Oct 6, 2012 at 6:13 PM, Andi Kleen wrote: > Jan Hubicka writes: >> >> I think it is useful feature, yes (and was in my TODO list for quite some >> time). Unlike edge profiles, these profiles should be also more independent >> of >> source code/configuration changes. > > It would be good

Re: [google] AutoFDO implementation

2012-10-06 Thread Dehao Chen
On Sat, Oct 6, 2012 at 10:55 AM, Jan Hubicka wrote: >> Hi, >> >> This patch implements the fine-graind AutoFDO optimizations for GCC. >> It uses linux perf to collect sample profiles, and uses debug info to >> represent the profile. In GCC, it uses the profile to annotate CFG to >> drive FDO. This

Re: [google] AutoFDO implementation

2012-10-06 Thread Andi Kleen
Jan Hubicka writes: > > I think it is useful feature, yes (and was in my TODO list for quite some > time). Unlike edge profiles, these profiles should be also more independent of > source code/configuration changes. It would be good to look at the tool, but: - Does it use the perf LBR support to

Re: handle isl and cloog in contrib/download_prerequisites

2012-10-06 Thread NightStrike
On Sat, Oct 6, 2012 at 7:30 AM, Manuel López-Ibáñez wrote: > Hi, > > GCC now requires ISL and a very new CLOOG but download_prerequisites > does not download those. Also, there is only one sensible place to As of what version is isl/cloog no longer optional?

Re: [TILE-Gx, committed] support -mcmodel=MODEL

2012-10-06 Thread Gerald Pfeifer
On Fri, 14 Sep 2012, Walter Lee wrote: > How does this look: Good. Just, for some reason, the mail did not appear in my inbox and I was backlogged on gcc-patches; sorry for missing it. Here is a small markup change I applied on the wwwdocs side on top of your patch. Gerald Index: changes.html

[Patch, Fortran] PR 40453: Enhanced (recursive) argument checking

2012-10-06 Thread Janus Weil
Hi all, here is a rather straightforward patch, which does 'recursive' checking of dummy procedures. Regtested on x86_64-unknown-linux-gnu. Ok for trunk? Cheers, Janus 2012-10-06 Janus Weil PR fortran/40453 * interface.c (check_dummy_characteristics): Recursively check dumm

[Patch, libfortran] Fix usage of secure_getenv with glibc 2.17

2012-10-06 Thread Janne Blomqvist
Hi, glibc 2.17 has renamed the exported but ostensibly private symbol __secure_getenv to secure_getenv. The attached patch updates libgfortran to first check for the presence of this new symbol. See http://sourceware.org/glibc/wiki/Tips_and_Tricks/secure_getenv for more details. Committed as obvi

Re: [patch] fix libbacktrace build failure on arm-linux

2012-10-06 Thread Ian Lance Taylor
On Sat, Oct 6, 2012 at 8:09 AM, Matthias Klose wrote: > current trunk fails to build on arm-linux with: > > In file included from ../../../../src/libbacktrace/backtrace.c:35:0: > ../libgcc/unwind.h: In function '_Unwind_decode_typeinfo_ptr': > ../libgcc/unwind.h:42:45: error: unused parameter 'bas

Re: [PATCH] Rs6000 infrastructure cleanup (switches), revised patch #2c

2012-10-06 Thread Gunther Nikl
Michael Meissner wrote: > On Thu, Oct 04, 2012 at 06:33:33PM +0200, Gunther Nikl wrote: >> Michael Meissner schrieb: >>> On Tue, Oct 02, 2012 at 10:13:25AM +0200, Gunther Nikl wrote: Michael Meissner wrote: > Segher Boessenkool asked me on IRC to break out the fix in the last > change

Re: [PATCH] Rs6000 infrastructure cleanup (switches), revised patch #3

2012-10-06 Thread Gunther Nikl
Michael Meissner wrote: > @@ -10326,7 +10352,7 @@ static rtx > altivec_expand_ld_builtin (tree exp, rtx target, bool *expandedp) > { >tree fndecl = TREE_OPERAND (CALL_EXPR_FN (exp), 0); > - unsigned int fcode = DECL_FUNCTION_CODE (fndecl); > + enum rs6000_builtins fcode = (enum rs6000_built

Re: handle isl and cloog in contrib/download_prerequisites

2012-10-06 Thread Diego Novillo
On 2012-10-06 13:30 , Manuel López-Ibáñez wrote: +download_prerequisite() { +WHAT=$1 +VERSION=$2 +PACK=$3 +case $PACK in +tar.bz2) TARX="j";; +tar.gz) TARX="z";; +esac GNU tar has not needed 'j' or 'z' for a while. Not sure whether other tars have the sam

Re: [google] AutoFDO implementation

2012-10-06 Thread Jan Hubicka
> Hi, > > This patch implements the fine-graind AutoFDO optimizations for GCC. > It uses linux perf to collect sample profiles, and uses debug info to > represent the profile. In GCC, it uses the profile to annotate CFG to > drive FDO. This can bring 50% to 110% of the speedup derived by > traditi

handle isl and cloog in contrib/download_prerequisites

2012-10-06 Thread Manuel López-Ibáñez
Hi, GCC now requires ISL and a very new CLOOG but download_prerequisites does not download those. Also, there is only one sensible place to call this script from, so check for that. Also, factorize a bit the code. Tested by using it in the the GCC Compile Farm. I tried to build and install CLOOG

Re: [google] Emit relative addresses to function patch sections instead of absolute addresses. (issue6572065)

2012-10-06 Thread Xinliang David Li
Ok for google branches. Please consider resend the original xray patch to trunk (gcc-4_8) You need to make the runtime bits available publicly though. thanks, David On Fri, Sep 28, 2012 at 2:24 AM, Harshit Chopra wrote: > commit fc3a55ccec9bc770c79f8a221f5abd397befc8f6 > Author: Harshit Chopra

Re: *ping* [patch, libfortran] Fix PR 54736, memory corruption with GFORTRAN_CONVERT_UNIT

2012-10-06 Thread Thomas Koenig
Hi Steven, Ping? I would like to start committing patches so I don't have too many of them in my tree at the same time :-) This looks OK to me. Committed as rev. 192158. I'll commit to 4.7 and after that to 4.6 in a few days. Thanks a lot for the review! Thomas

Re: [google] Emit relative addresses to function patch sections instead of absolute addresses. (issue6572065)

2012-10-06 Thread Xinliang David Li
xray feature is not in trunk yet. David On Fri, Oct 5, 2012 at 3:53 PM, Diego Novillo wrote: > Harshit, why didn't you propose this patch for trunk? Why should we > make it a google-local patch? > > > Diego. > > On Fri, Sep 28, 2012 at 5:24 AM, Harshit Chopra wrote: >> commit fc3a55ccec9bc770c

[RFA] Support common C++ declarations inside GTY'd structures

2012-10-06 Thread Diego Novillo
This patch combines the changes from http://gcc.gnu.org/ml/gcc-patches/2012-08/msg02016.html with other additions to support C++ inside GTY'd structures. The main changes wrt Aaron's original patch are: - Support for function declarations inside classes. - Support scoping in identifiers. This d

Re: [wwwdocs] SH 4.8 changes update

2012-10-06 Thread Oleg Endo
On Sat, 2012-10-06 at 17:57 +0200, Gerald Pfeifer wrote: > Hi Oleg, > > have you considered also documenting the new __builtin_thread_pointer > and __builtin_set_thread_pointer built-ins? (I just noticed this by > chance.) Yes, sure. The documentation and www changes updates will follow soon.

Drop V1 plugin API hack

2012-10-06 Thread Jan Hubicka
Hi, this patch removes V1 API hack, making us to require V2 plugin api aware linker to get sane code quality on anything using COMDAT. Given that the V1 API linkers are quite old now, I think it is safe. I added a testcase that should fail with old linker and will update changes.html. The patch

Re: [ping patch] Predict for loop exits in short-circuit conditions

2012-10-06 Thread Jan Hubicka
> ping^2 > > Honza, do you think this patch can make into 4.8 stage 1? + if (check_value_one ^ integer_onep (val)) Probably better as != (especially because GNU coding standard allows predicates to return more than just boolean) +{ + edge e1; + edge_iterator ei; + tree

Re: [ping patch] Predict for loop exits in short-circuit conditions

2012-10-06 Thread Dehao Chen
ping^2 Honza, do you think this patch can make into 4.8 stage 1? Thanks, Dehao On Wed, Sep 26, 2012 at 2:34 PM, Dehao Chen wrote: > http://gcc.gnu.org/ml/gcc-patches/2012-05/msg01975.html > > Thanks, > Dehao

Re: [wwwdocs] SH 4.8 changes update

2012-10-06 Thread Gerald Pfeifer
Hi Oleg, have you considered also documenting the new __builtin_thread_pointer and __builtin_set_thread_pointer built-ins? (I just noticed this by chance.) On Thu, 4 Oct 2012, Oleg Endo wrote: > The atomic options of SH have been changed recently. The attached patch > updates the 4.8 changes.h

Re: Profile housekeeping 6/n (-fprofile-consistency-report)

2012-10-06 Thread Jan Hubicka
Hi, does this look better? Moving to cfg.c would importing tree-pass.h and rtl.h that is not cool either. predict.c does all of these. Obviously can also go to a separate file, if preferred. If it looks fine to you, I will commit it after testing. Honza Index: tree-pass.h ===

Re: patch to fix constant math - third small patch

2012-10-06 Thread Kenneth Zadeck
This is the third patch in the series of patches to fix constant math. this one changes some predicates at the rtl level to use the new predicate CONST_SCALAR_INT_P. I did not include a few that were tightly intertwined with other changes. Not all of these changes are strictly mechanical. Ric

Re: Profile housekeeping 6/n (-fprofile-consistency-report)

2012-10-06 Thread Jan Hubicka
> On Sat, Oct 6, 2012 at 4:39 PM, Steven Bosscher wrote: > > >> If there are no complains I will commit the patch tomorrow. > > > > +1 complaint. > > You're putting profile stuff and even RTL stuff in the pass manager. > > That is Just Wrong. > > You already committed the patch. Your tomorrow st

Re: Profile housekeeping 6/n (-fprofile-consistency-report)

2012-10-06 Thread Jan Hubicka
> On Sat, Oct 6, 2012 at 4:10 PM, Jan Hubicka wrote: > >> > Index: passes.c > >> > +/* Hold statistic about profile consistency. */ > >> ... > >> > >> I don't see why this should live in passes.c, can you please put it in > >> a more logical place (profile.c, perhaps)? > > > > Hmm, the problem he

Re: Profile housekeeping 6/n (-fprofile-consistency-report)

2012-10-06 Thread Steven Bosscher
On Sat, Oct 6, 2012 at 4:39 PM, Steven Bosscher wrote: >> If there are no complains I will commit the patch tomorrow. > > +1 complaint. > You're putting profile stuff and even RTL stuff in the pass manager. > That is Just Wrong. You already committed the patch. Your tomorrow started early? ;-)

Re: Profile housekeeping 6/n (-fprofile-consistency-report)

2012-10-06 Thread Jan Hubicka
> Jan. > > This patch also breaks bootstrap due compilation errors reported for > pases.c and toplev.c Sorry for that. I swapped files and used old version of the patch. It should be fixed now. Honza > > Graham

Re: Profile housekeeping 6/n (-fprofile-consistency-report)

2012-10-06 Thread Graham Stott
Jan. This patch also breaks bootstrap due compilation errors reported for pases.c and toplev.c Graham

[patch] fix libbacktrace build failure on arm-linux

2012-10-06 Thread Matthias Klose
current trunk fails to build on arm-linux with: In file included from ../../../../src/libbacktrace/backtrace.c:35:0: ../libgcc/unwind.h: In function '_Unwind_decode_typeinfo_ptr': ../libgcc/unwind.h:42:45: error: unused parameter 'base' [-Werror=unused-parameter] _Unwind_decode_typeinfo_ptr (_

Re: Profile housekeeping 6/n (-fprofile-consistency-report)

2012-10-06 Thread Steven Bosscher
On Sat, Oct 6, 2012 at 4:10 PM, Jan Hubicka wrote: >> > Index: passes.c >> > +/* Hold statistic about profile consistency. */ >> ... >> >> I don't see why this should live in passes.c, can you please put it in >> a more logical place (profile.c, perhaps)? > > Hmm, the problem here is that the cod

Re: Profile housekeeping 6/n (-fprofile-consistency-report)

2012-10-06 Thread Jan Hubicka
> > Index: passes.c > > +/* Hold statistic about profile consistency. */ > ... > > I don't see why this should live in passes.c, can you please put it in > a more logical place (profile.c, perhaps)? Hmm, the problem here is that the code is using passmanager's dumping bits to order the passes an

[Patch, Fortran, committed] PR 54832

2012-10-06 Thread Janus Weil
> This is now: > > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54832 ... which I have just fixed by an (obvious and regtested) patch: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=192160 Thanks again for reporting this, Janus > 2012/10/6 Rouson, Damian : >> The Gfortran 4.8.0 20120930 ICE

Re: [C++ Patch / RFC] PR 51422

2012-10-06 Thread Jason Merrill
On 09/27/2012 07:08 AM, Paolo Carlini wrote: Then checking error_operand_p (decl) in is_capture_proxy solves the problem but now the question is: do we have reasons to believe that such VAR_DECLs should never ever reach is_normal_capture_proxy? That depends on our error recovery strategy for an

Re: [C++ Patch] PR 54249

2012-10-06 Thread Jason Merrill
OK. Jason

Re: [C++ Patch] PR 52764

2012-10-06 Thread Jason Merrill
OK. Jason

Re: [SH] PR 54760 - Add thread pointer built-ins and GBR displacement addressing

2012-10-06 Thread Oleg Endo
On Sat, 2012-10-06 at 12:31 +0900, Kaz Kojima wrote: > Oleg Endo wrote: > > The attached patch is the next step that adds the thread pointer > > builtins. The GBR address mode stuff will follow afterwards separately. > > Tested on rev 192142 with 'make all' and > > 'make -k check-gcc RUNTESTFLAGS

Re: RFA: Simplifying truncation and integer lowpart subregs

2012-10-06 Thread Eric Botcazou
> I think modelling it as a TRUNCATE operation is correct for > !TRULY_NOOP_TRUNCATION (it's the bug that Andrew pointed out). > And we shouldn't generate an actual TRUNCATE rtx for > TRULY_NOOP_TRUNCATION (the thing about making > simplify_gen_unary (TRUNCATE, ...) no worse than simplify_gen_subre

Re: RFA: Simplifying truncation and integer lowpart subregs

2012-10-06 Thread Richard Sandiford
Thanks for the review. Eric Botcazou writes: >> Tested on x86_64-linux-gnu, mipsisa32-elf and mipsisa64-elf. Also tested >> by making sure that there were no code differences for a set of gcc .ii >> files on gcc20 (-O2 -march=native). OK to install? > > Are you sure that generating TRUNCATEs ou

Re: [Patch, Fortran, F08] PR 45521: GENERIC resolution with ALLOCATABLE/POINTER and PROCEDURE

2012-10-06 Thread Janus Weil
Hi, >> the attached patch implements an F08 feature, which allows to >> distinguish two specific procedures in a generic interface, based on >> the POINTER and ALLOCATABLE attribute of their arguments. >> >> In addition to this, the patch fixes a bug in rejecting data actual >> arguments passed to

Re: *ping* [patch, libfortran] Fix PR 54736, memory corruption with GFORTRAN_CONVERT_UNIT

2012-10-06 Thread Steven Bosscher
On Sat, Oct 6, 2012 at 1:31 PM, Thomas Koenig wrote: > Am 01.10.2012 20:34, schrieb Thomas Koenig: >> >> Hello world, >> >> the previous version of the patch has an issue that Shane pointed >> out in the PR. This version should work; at least it survived >> all the test cases I could come up with

[m68k] Remove anddi3, iordi3, xordi3, one_cmpldi2 patterns

2012-10-06 Thread Andreas Schwab
Letting the DImode logical ops being split by lower subreg tends to produce better code. Tested on m68k-linux and committed. Andreas. PR rtl-optimization/54739 * config/m68k/m68k.md (anddi3, iordi3, xordi3, one_cmpldi2): Remove. Index: config/m68k/m68k.md ===

*ping* [patch, libfortran] Fix PR 54736, memory corruption with GFORTRAN_CONVERT_UNIT

2012-10-06 Thread Thomas Koenig
Am 01.10.2012 20:34, schrieb Thomas Koenig: Hello world, the previous version of the patch has an issue that Shane pointed out in the PR. This version should work; at least it survived all the test cases I could come up with. Regression-tested (again). OK for trunk? Also for 4.6 and 4.7? P

Re: [patch, fortran] PR 54833 Don't wrap calls to free(a) in if (a != NULL)

2012-10-06 Thread Thomas Koenig
I wrote: the attached patch removes wrapping calls to free(a) by if (a != NULL) for some cases. It is not complete, because automatic deallocation of allocatable structure components is not yet covered. I accidentally posted an old version, which had a bug in coarrays (basically was just miss

Re: Propagate profile counts during switch expansion

2012-10-06 Thread Jan Hubicka
> > > >> > >> > + > >> > + default_edge->count = default_count; > >> > + if (count) > >> > +{ > >> > + edge e; > >> > + edge_iterator ei; > >> > + FOR_EACH_EDGE (e, ei, stmt_bb->succs) > >> > +e->probability = e->count * REG_BR_PROB_BASE / count; > >> > +} > >> > >>

[SH] PR 54685 - unsigned int comparison with 0x7FFFFFFF

2012-10-06 Thread Oleg Endo
Hello, The attached patch improves comparisons such as 'unsigned int <= 0x7FFF' on SH. As mentioned in the PR, for some reason, those comparisons do not go through the cstore expander. As a consequence the comparison doesn't get the chance to be canonicalized by the target code and ends up as

Re: RFA: Simplifying truncation and integer lowpart subregs

2012-10-06 Thread Eric Botcazou
> Tested on x86_64-linux-gnu, mipsisa32-elf and mipsisa64-elf. Also tested > by making sure that there were no code differences for a set of gcc .ii > files on gcc20 (-O2 -march=native). OK to install? Are you sure that generating TRUNCATEs out of nowhere in simplify_subreg is always correct?

Re: [Patch,avr]: Remove -mshort-calls option

2012-10-06 Thread Denis Chertykov
2012/10/5 Georg-Johann Lay : > As already discussed, this patch removes the -mshort-calls command option from > avr-gcc. > > Ok to apply? > > If the change is on order, changes to wwwdocs will follow, i.e. deprecate the > option in 4.7 and tell it is removed in the 4.8 caveats. > > Johann > > >

Re: [Patch, Fortran, F08] PR 45521: GENERIC resolution with ALLOCATABLE/POINTER and PROCEDURE

2012-10-06 Thread Mikael Morin
Hello, Le 04/10/2012 00:06, Janus Weil a écrit : > Hi all, > > the attached patch implements an F08 feature, which allows to > distinguish two specific procedures in a generic interface, based on > the POINTER and ALLOCATABLE attribute of their arguments. > > In addition to this, the patch fixes

RFA: Simplifying truncation and integer lowpart subregs

2012-10-06 Thread Richard Sandiford
[cc:ing sh, spu and tilegx maintainers] Richard Sandiford writes: > Andrew Pinski writes: >> On Thu, Sep 27, 2012 at 11:13 AM, Uros Bizjak wrote: >>> 2012-09-27 Uros Bizjak >>> >>> PR rtl-optimization/54457 >>> * simplify-rtx.c (simplify_subreg): >>> Simplify (subreg:

[patch, fortran] PR 54833 Don't wrap calls to free(a) in if (a != NULL)

2012-10-06 Thread Thomas Koenig
Hello world, the attached patch removes wrapping calls to free(a) by if (a != NULL) for some cases. It is not complete, because automatic deallocation of allocatable structure components is not yet covered. OK for trunk? Thomas 2012-10-06 Thomas König PR fortran/54833

Re: [RFC] Make vectorizer to skip loops with small iteration estimate

2012-10-06 Thread Jan Hubicka
Hi, I benchmarked the patch moving loop header copying and it is quite noticeable win. Some testsuite updating is needed. In many cases it is just because the optimizations are now happening earlier. There are however few testusite failures I have torubles to deal with: ./testsuite/gcc/gcc.sum:FA

Re: [PATCH] Fix PR54826

2012-10-06 Thread Jakub Jelinek
On Fri, Oct 05, 2012 at 07:24:53PM -0700, Dehao Chen wrote: > This patch fixes PR54826. When lowering the gimple, the block for call > arg also need to be reset. > > Bootstrapped and passed gcc regression test on x86. > > Okay for trunk? > > Thanks, > Dehao > > 2012-10-05 Dehao Chen > >