[RFA][PATCH]Fix 59019

2013-11-16 Thread Jeff Law
59019 is currently latent on the trunk, but it's likely to fail again at some point. The problem we have is combine transforms a conditional trap into an unconditional trap. conditional traps are not considered control flow insns, but unconditional traps are. Thus, if we turn a condition

Re: [PowerPC] libffi fixes and support for PowerPC64 ELFv2

2013-11-16 Thread Alan Modra
On Sat, Nov 16, 2013 at 10:18:05PM +1030, Alan Modra wrote: > The following six patches correspond to patches posted to the libffi > mailing list a few days ago to add support for PowerPC64 ELFv2. The The ChangeLog just became easier to write. :) * src/powerpc/ffitarget.h: Import from u

[PATCH, rs6000] Emit correct note for DWARF CFI information on LE prolog VSX stores

2013-11-16 Thread Bill Schmidt
Hi, For VSX in little endian we currently split vector register stores into a permute/store pair. For prolog stores, this results in a REG_FRAME_RELATED_EXPR note that doesn't have a simple register for its RHS, which it needs to have. This patch detects that situation and ensures we produce the

Re: [PATCH][1-3] New configure option to enable Position independent executable as default.

2013-11-16 Thread Ryan Hill
On Wed, 13 Nov 2013 23:28:45 +0100 Magnus Granberg wrote: > Hi > This patchset will add a new configure options --enable-default-pie. > With the new option enable will make it pass -fPIE and -pie from the gcc and > g++ frontend. Have only add the support for two targets but should work on > more

Re: [PATCH] Fix various reassoc issues (PR tree-optimization/58791, tree-optimization/58775)

2013-11-16 Thread H.J. Lu
On Tue, Oct 22, 2013 at 6:09 AM, Jakub Jelinek wrote: > Hi! > > I've spent over two days looking at reassoc, fixing spots where > we invalidly reused SSA_NAMEs (this results in wrong-debug, as the added > guality testcases show, even some ICEs (pr58791-3.c) and wrong range info > for SSA_NAMEs) an

Re: [wide-int] Documentation and comment tweaks

2013-11-16 Thread Kenneth Zadeck
On 11/16/2013 05:49 AM, Richard Sandiford wrote: Richard Sandiford writes: Some minor tweaks to the documentation and commentary. The hyphenation and "non zero"->"nonzero" changes are supposed to be per guidelines: http://gcc.gnu.org/codingconventions.html#Spelling Hope I got them right.

Re: [PATCH][ARM] Add Cortex-A53 rtx costs table

2013-11-16 Thread Richard Earnshaw (home)
On 15 Nov 2013, at 15:42, "Kyrill Tkachov" wrote: > Hi all, > > This patch adds the rtx costs table for the Cortex-A53. It goes in the new > aarch-cost-tables.h file because we will want to share it with AArch64. > > We add a corresponding tuning struct and set the tuning from generic cortex

Re: libbacktrace patch RFC: Look up variables in backtrace_syminfo

2013-11-16 Thread Ian Lance Taylor
On Fri, Nov 15, 2013 at 1:34 PM, Jakub Jelinek wrote: > On Fri, Nov 15, 2013 at 01:26:54PM -0800, Ian Lance Taylor wrote: >> Jakub asked whether it would be possible to extend backtrace_syminfo to >> work for variables as well as functions. It's a straightforward >> extension, implemented by this

[PING] [PATCH] Add POST_LINK_SPEC for adding possibility of additional steps after linking

2013-11-16 Thread Andris Pavenis
On 11/05/2013 02:09 PM, Andris Pavenis wrote: Attached patch adds a possibility to add additional build steps after linking. Without this patch only possibility is to redefine entire LINK_COMMAND_SPEC. Currently only DJGPP seems to need it 2013-11-05Andris Pavenis * gcc/gcc.c: Add

Re: [PATCH] Fix lto bootstrap verification failure with -freorder-blocks-and-partition

2013-11-16 Thread Jan Hubicka
> Note I haven't done an extensive check to see if compgotos is the only > phase that goes back into cfglayout mode after bb reordering is done, > that's just the one that hit this. Eventually it might be good to > prevent going into cfglayout mode after bb reordering. Can we just try to abort whe

Re: [PATCH] Fix lto bootstrap verification failure with -freorder-blocks-and-partition

2013-11-16 Thread Teresa Johnson
On Sat, Nov 16, 2013 at 12:33 AM, Jan Hubicka wrote: >> When testing with -freorder-blocks-and-partition enabled, I hit a >> verification failure in an LTO profiledbootstrap. Edge forwarding >> performed when we went into cfg layout mode after bb reordering >> (during compgotos) created a situatio

Re: [Patch, mips] MIPS performance patch for PR 56552

2013-11-16 Thread Richard Sandiford
Richard Sandiford writes: > "Steve Ellcey " writes: >> diff --git a/gcc/config/mips/mips.md b/gcc/config/mips/mips.md >> index 0cda169..49c2bf7 100644 >> --- a/gcc/config/mips/mips.md >> +++ b/gcc/config/mips/mips.md >> @@ -6721,7 +6721,7 @@ >> (define_insn "*mov_on_" >>[(set (match_operand:

Re: [2/10] Mechanical replacement of host_integerp (..., 0)

2013-11-16 Thread Richard Sandiford
Richard Sandiford writes: > This is the result of using sed to replace all single-line > "host_integerp (x, 0)"s with "tree_to_shwi_p (x)", taking care to handle > bracket nesting in "x". Bah, wrong patch, sorry. tree-fits-shwi-p.diff.bz2 Description: BZip2 compressed data

Re: [3/10] Mechanical replacement of host_integerp (..., 1)

2013-11-16 Thread Richard Sandiford
Richard Sandiford writes: > Like the previous patch, but for host_integerp (x, 1) -> tree_to_uhwi_p (x). Should have been this patch. tree-fits-uhwi-p.diff.bz2 Description: BZip2 compressed data

[10/10] Make tree_to_uhwi return unsigned

2013-11-16 Thread Richard Sandiford
This is probably the only non-obvious part of the series. I went through all callers to tree_to_uhwi to see whether they were used in a context where signedness mattered. If so, I tried to adjust the casting to match. This mostly meant removing casts to unsigned types. There are a couple of cas

[9/10] Remove host_integerp and tree_low_cst

2013-11-16 Thread Richard Sandiford
Remove the old functions, which are now unused. Thanks, Richard gcc/ * tree.h (host_integerp, tree_low_cst): Delete. * tree.c (host_integerp, tree_low_cst): Delete. Index: gcc/tree.h === --- gcc/tree.h 2013-11-16 0

[8/10] Mop up remaining tree_low_cst calls

2013-11-16 Thread Richard Sandiford
Handle tree_low_cst references that weren't caught by the sed. Thanks, Richard gcc/ada/ * gcc-interface/cuintp.c (UI_From_gnu): Use tree_to_shwi rather than tree_low_cst. gcc/c-family/ * c-common.c (fold_offsetof_1): Use tree_to_uhwi rather than tree_low_cst.

[7/10] Mechanical replacement of tree_low_cst (..., 1)

2013-11-16 Thread Richard Sandiford
Like the previous patch, but for tree_low_cst (x, 1) -> tree_to_uhwi_p (x). Thanks, Richard gcc/ada/ * gcc-interface/decl.c, gcc-interface/utils.c, gcc-interface/utils2.c: Replace tree_low_cst (..., 1) with tree_to_uhwi throughout. gcc/c-family/ * c-common.c, c-cppbuilti

[5/10] Add tree_to_shwi and tree_to_uhwi

2013-11-16 Thread Richard Sandiford
Add tree_to_shwi and tree_to_uhwi. Initially tree_to_uhwi returns a HOST_WIDE_INT, so that it's a direct replacement for tree_low_cst. Patch 10 makes it return unsigned HOST_WIDE_INT instead. Thanks, Richard gcc/ * tree.h (tree_to_shwi, tree_to_uhwi): Declare, with inline expansions.

[6/10] Mechanical replacement of tree_low_cst (..., 0)

2013-11-16 Thread Richard Sandiford
Like patch 2, but using sed to replace "tree_low_cst (x, 0)" with "tree_to_shwi (x)". Thanks, Richard gcc/c-family/ * c-common.c, c-format.c, c-omp.c, c-pretty-print.c: Replace tree_low_cst (..., 0) with tree_to_shwi throughout. gcc/c/ * c-parser.c: Replace tree_low_cst

[4/10] Mop up remaining host_integerp calls

2013-11-16 Thread Richard Sandiford
Handle host_integerp references that weren't caught by the sed. Thanks, Richard gcc/ada/ * gcc-interface/cuintp.c: Update comments to refer to tree_fits_shwi_p rather than host_integerp. * gcc-interface/decl.c (gnat_to_gnu_entity): Use tree_fits_uhwi_p rather than

[3/10] Mechanical replacement of host_integerp (..., 1)

2013-11-16 Thread Richard Sandiford
Like the previous patch, but for host_integerp (x, 1) -> tree_to_uhwi_p (x). Thanks, Richard gcc/ada/ * gcc-interface/decl.c, gcc-interface/misc.c, gcc-interface/utils.c: Replace host_integerp (..., 1) with tree_fits_uhwi_p throughout. gcc/c-family/ * c-ada-spec.c, c-com

[2/10] Mechanical replacement of host_integerp (..., 0)

2013-11-16 Thread Richard Sandiford
This is the result of using sed to replace all single-line "host_integerp (x, 0)"s with "tree_to_shwi_p (x)", taking care to handle bracket nesting in "x". Thanks, Richard gcc/ada/ * gcc-interface/cuintp.c: Replace host_integerp (..., 0) with tree_fits_shwi_p throughout. gcc/c-f

[1/10] Add tree_fits_shwi_p and tree_fits_uhwi_p

2013-11-16 Thread Richard Sandiford
Add tree_fits_shwi_p and tree_fits_uhwi_p. The implementations are taken directly from host_integerp. Thanks, Richard gcc/ * tree.h (tree_fits_shwi_p, tree_fits_uhwi_p): Declare. * tree.c (tree_fits_shwi_p, tree_fits_uhwi_p): Define. Index: gcc/tree.h ==

[0/10] Replace host_integerp and tree_low_cst

2013-11-16 Thread Richard Sandiford
After the patch that went in yesterday, all calls to host_integerp and tree_low_cst pass a constant "pos" argument. This series replaces each function with two separate ones: host_integerp (x, 0) -> tree_fits_shwi_p (x) host_integerp (x, 1) -> tree_fits_uhwi_p (x) tree_low_cst (x, 0) -> tre

Re: [PATCH][1/3] Re-submission of Altera Nios II port, gcc parts

2013-11-16 Thread Joseph S. Myers
On Sat, 16 Nov 2013, Chung-Lin Tang wrote: > >> +/* Local prototypes. */ > > > > I'd much prefer not to have any of those. Achieve this by putting > >> +struct gcc_target targetm = TARGET_INITIALIZER; > > along with all the necessary definitions at the end of the file (and > > reordering some ot

Re: Implement C11/C++11 set of UCNs allowed in identifiers

2013-11-16 Thread Joseph S. Myers
On Fri, 15 Nov 2013, Tom Tromey wrote: > > "Joseph" == Joseph S Myers writes: > > Joseph> Any comments on whether we should consider the Unicode character data > Joseph> - UnicodeData.txt and DerivedNormalizationProps.txt, a total of about > Joseph> 2MB - as source code for the generated ucn

Committed: arc.c: Make predication in delay slots explicit

2013-11-16 Thread Joern Rennecke
2013-11-16 Joern Rennecke * config/arc/arc.c (arc_predicate_delay_insns): New function. (pass_data_arc_predicate_delay_insns): New pass_data instance. (pass_arc_predicate_delay_insns): New subclass of rtl_opt_class. (make_pass_arc_predicate_delay_insns): New f

Committed: arc/constraints.md: simplify Rcq definition

2013-11-16 Thread Joern Rennecke
2013-11-16 Joern Rennecke * config/arc/constraints.md (Rcq): Simplify register number test. Index: config/arc/constraints.md === --- config/arc/constraints.md (revision 204899) +++ config/arc/constraints.md (revision

Tidy powerpc linux64_closure.S with defines for stack offsets

2013-11-16 Thread Alan Modra
This patch prepares for ELFv2, where sizes of these areas change. It also makes some minor changes to improve code efficiency. * src/powerpc/linux64.S (ffi_call_LINUX64): Tweak restore of r28. (.note.GNU-stack): Move inside outer #ifdef. * src/powerpc/linux64_closure.S (ST

Align powerpc64 structs passed by value as per ABI

2013-11-16 Thread Alan Modra
The powerpc64 ABIs align structs passed by value, a fact ignored by gcc for quite some time. Since gcc now does the correct alignment, libffi needs to follow suit. This ought to be made selectable via a new abi value, and the #ifdefs removed from ffi.c along with almost all the other #ifdefs pres

Support PowerPC64 ELFv2 ABI

2013-11-16 Thread Alan Modra
Finally, this adds _CALL_ELF == 2 support. ELFv1 objects can't be linked with ELFv2 objects, so this is one case where preprocessor tests in ffi.c are fine. Also, there is no need to define a new FFI_ELFv2 or somesuch value in enum ffi_abi. FFI_LINUX64 will happily serve both ABIs. * sr

Pass floating point values on powerpc64 as per ABI

2013-11-16 Thread Alan Modra
The powerpc64 support opted to pass floating point values both in the fpr area and the parameter save area, necessary when the backend doesn't know if a function argument corresponds to the ellipsis arguments of a variadic function. This patch adds powerpc support for variadic functions, and chang

libffi doc fixes

2013-11-16 Thread Alan Modra
This enshrines the current testsuite practice of using ffi_arg for returned values. It would be reasonable and logical to use the actual return argument type as passed to ffi_prep_cif, but this would mean changing a large number of tests that use ffi_arg and all backends that write results to an f

Reinstate powerpc bounce buffer copying in ffi.c

2013-11-16 Thread Alan Modra
The first patch in the series is a little different to the corresponding upstream libffi patch, because there I needed to revert some fixes first. The second patch in the series is entirely missing due to the testsuite already being fixed in gcc. This patch properly copies the bounce buffer to de

[PowerPC] libffi fixes and support for PowerPC64 ELFv2

2013-11-16 Thread Alan Modra
The following six patches correspond to patches posted to the libffi mailing list a few days ago to add support for PowerPC64 ELFv2. The patch series has been tested on powerpc-linux, powerpc64-linux, powerpc64le-linux and powerpc-freebsd by running the libffi testsuite, and on powerpc64-linux and

Re: [PATCH] Time profiler - phase 2

2013-11-16 Thread Jan Hubicka
> diff --git a/gcc/ChangeLog b/gcc/ChangeLog > index c566a85..1562098 100644 > --- a/gcc/ChangeLog > +++ b/gcc/ChangeLog > @@ -1,3 +1,15 @@ > +2013-11-13 Martin Liska > + Jan Hubicka > + > + * cgraphunit.c (node_cmp): New function. > + (ex

Re: [PATCH] Avoid some unnecessary set_cfun calls

2013-11-16 Thread Richard Sandiford
Jakub Jelinek writes: > On Wed, Nov 13, 2013 at 11:27:10AM +0100, Richard Biener wrote: >> > Also, I wonder if we couldn't defer the expensive ira_init, if the info >> > computed by it is used only during RTL optimization passes (haven't >> > verified >> > it yet), then supposedly we could just r

Re: [wide-int] Documentation and comment tweaks

2013-11-16 Thread Richard Sandiford
Richard Sandiford writes: > Some minor tweaks to the documentation and commentary. The hyphenation > and "non zero"->"nonzero" changes are supposed to be per guidelines: > >http://gcc.gnu.org/codingconventions.html#Spelling > > Hope I got them right. > > OK to install? Ping. > Index: gcc/df

Re: [PATCH] Generate a label for the split cold function while using -freorder-blocks-and-partition

2013-11-16 Thread Richard Sandiford
Cary Coutant writes: >>> Isn't this something that should be expressed in DWARF with >>> DW_AT_ranges? See DWARF4, section 2.17, >>> >>> Does GCC generate such ranges? >> >> GCC does generate these ranges. However, according to Cary many tools >> do not rely on dwarf info for locating the correspo

Re: [PATCH][2/3] Re-submission of Altera Nios II port, testsuite parts

2013-11-16 Thread Chung-Lin Tang
On 2013/10/17 10:20 PM, Bernd Schmidt wrote: > On 07/14/2013 09:54 AM, Chung-Lin Tang wrote: >> These are nios2 patches for the gcc testsuite. Some new testcases were >> added since the last posting. > >> Index: gcc/testsuite/gcc.c-torture/execute/builtins/lib/chk.c >>

Re: [PATCH][3/3] Re-submission of Altera Nios II port, libgcc parts

2013-11-16 Thread Chung-Lin Tang
On 2013/7/14 03:55 PM, Chung-Lin Tang wrote: > nios2 libgcc parts. Since the original post, the only main change has > been the fdpbit vs soft-fp issue raised by Joseph, which has been > resolved. Other parts are mostly the same. The Nios II libgcc parts have been further updated to include a sfp-

Re: [ia64] [PR target/57491] internal compiler error: in ia64_split_tmode -O2, quadmath

2013-11-16 Thread Eric Botcazou
> As far as I understand semantics of this insn: > (insn 200 199 0 (set (reg:DI 15 r15) > (mem:DI (post_dec:DI (reg/f:DI 15 r15 [447])) [3 > *_61[_12]{lb: 1 sz: 64}.text+8 S8 A64])) -1 (nil)) > What is done is (in that sequence). > 1. Calculate address of MEM: get r15 value. > 2.

Re: [PATCH] MIPS: MIPS32r2 FP indexed access instruction set support

2013-11-16 Thread Richard Sandiford
"Maciej W. Rozycki" writes: > 2013-11-14 Maciej W. Rozycki > > gcc/ > * config/mips/mips.h (ISA_HAS_FP4): Remove TARGET_FLOAT64 > restriction for ISA_MIPS32R2. > (ISA_HAS_FP_MADD4_MSUB4): Remove ISA_MIPS32R2 special-casing. > (ISA_HAS_NMADD4_NMSUB4): Likewise. >

Re: [PATCH] Fix lto bootstrap verification failure with -freorder-blocks-and-partition

2013-11-16 Thread Jan Hubicka
> When testing with -freorder-blocks-and-partition enabled, I hit a > verification failure in an LTO profiledbootstrap. Edge forwarding > performed when we went into cfg layout mode after bb reordering > (during compgotos) created a situation where a hot block was then > dominated by a cold block a

Re: [PATCH] MIPS: MIPS32r2 FP reciprocal instruction set support

2013-11-16 Thread Richard Sandiford
"Maciej W. Rozycki" writes: > Note that these instructions were allowed in either FPU mode in the MIPS > IV ISA, but for forward ISA compatibility this change does not enable them > for -march=mips4 in the 32-bit FPR mode because the original revision of > the MIPS64 ISA did not support it. Y

Re: [Patch, mips] MIPS performance patch for PR 56552

2013-11-16 Thread Richard Sandiford
"Steve Ellcey " writes: > diff --git a/gcc/config/mips/mips.md b/gcc/config/mips/mips.md > index 0cda169..49c2bf7 100644 > --- a/gcc/config/mips/mips.md > +++ b/gcc/config/mips/mips.md > @@ -6721,7 +6721,7 @@ > (define_insn "*mov_on_" >[(set (match_operand:GPR 0 "register_operand" "=d,d") >