Re: [PATCH][AArch64] Only update assembler .arch directive when necessary

2016-02-11 Thread James Greenhalgh
On Thu, Feb 11, 2016 at 01:10:33PM +, Kyrill Tkachov wrote: > >>>Why not just keep the last string you printed, and use a string compare > >>>to decide whether to print or not? Sure we'll end up doing a bit more > >>>work, but the logic becomes simpler to follow and we don't need to pass > >>>a

Re: [PATCH] Fix PR69771, bogus CONST_INT during shift expansion

2016-02-12 Thread James Greenhalgh
On Fri, Feb 12, 2016 at 05:34:21PM +0100, Jakub Jelinek wrote: > On Fri, Feb 12, 2016 at 03:20:07PM +0100, Bernd Schmidt wrote: > > >>- mode1 = GET_MODE (xop1) != VOIDmode ? GET_MODE (xop1) : mode; > > >>+ mode1 = GET_MODE (xop1) != VOIDmode ? GET_MODE (xop1) : mode1; > > >>if (xmode1 != VOID

Re: [Patch AArch64] Use software sqrt expansion always for -mlow-precision-recip-sqrt

2016-02-15 Thread James Greenhalgh
On Mon, Feb 08, 2016 at 10:57:44AM +, James Greenhalgh wrote: > On Mon, Feb 01, 2016 at 01:59:34PM +0000, James Greenhalgh wrote: > > On Mon, Jan 25, 2016 at 11:21:25AM +0000, James Greenhalgh wrote: > > > On Mon, Jan 11, 2016 at 11:53:39AM +, James Greenhalgh wrote: &

Re: [Patch AArch64] GCC 6 regression in vector performance. - Fix vector initialization to happen with lane load instructions.

2016-02-15 Thread James Greenhalgh
On Mon, Feb 08, 2016 at 10:56:29AM +, James Greenhalgh wrote: > On Tue, Feb 02, 2016 at 10:29:29AM +0000, James Greenhalgh wrote: > > On Wed, Jan 20, 2016 at 03:22:11PM +0000, James Greenhalgh wrote: > > > > > > Hi, > > > > > > In a number of c

Re: [Patch AArch64] Restrict 16-bit sqrdml{sa}h instructions to FP_LO_REGS

2016-02-15 Thread James Greenhalgh
On Mon, Feb 08, 2016 at 12:52:00PM +, James Greenhalgh wrote: > On Tue, Jan 26, 2016 at 04:04:47PM +0000, James Greenhalgh wrote: > > > > Hi, > > > > In their forms using 16-bit lanes, the sqrdmlah and sqrdmlsh instruction > > available when compiling with

Re: [AArch64] Remove AARCH64_EXTRA_TUNE_RECIP_SQRT from Cortex-A57 tuning

2016-02-15 Thread James Greenhalgh
On Mon, Feb 08, 2016 at 10:57:10AM +, James Greenhalgh wrote: > On Mon, Feb 01, 2016 at 02:00:01PM +0000, James Greenhalgh wrote: > > On Mon, Jan 25, 2016 at 11:20:46AM +0000, James Greenhalgh wrote: > > > On Mon, Jan 11, 2016 at 12:04:43PM +, James Greenhalgh wrote: &

Re: [PATCH 2/4 v2][AArch64] Add support for FCCMP

2016-02-15 Thread James Greenhalgh
On Thu, Jan 21, 2016 at 04:55:40PM -0600, Evandro Menezes wrote: > > Got it. > > Let me try this again: > >Add support for the FCCMP insn types > >2016-01-21 Evandro Menezes > >gcc/ > * config/aarch64/aarch64.md (fccmp): Change insn type. > (fccmpe): Like

Re: add check for aarch64 in check_effective_target_section_anchors()

2016-02-15 Thread James Greenhalgh
On Thu, Feb 11, 2016 at 11:03:23PM +0530, Prathamesh Kulkarni wrote: > Hi, > aarch64 supports section anchors but it appears > check_effective_target_section_anchors() doesn't contain entry for it. > This patch adds for entry for aarch64. > OK for trunk ? OK. I presume you tested this, and the tes

Re: [PATCH][AArch64] Skip gcc.target/aarch64/assembler_arch_1.c if assembler does not support it

2016-02-16 Thread James Greenhalgh
On Tue, Feb 16, 2016 at 09:27:00AM +, Kyrill Tkachov wrote: > Hi all, > > As Christophe reported at: > https://gcc.gnu.org/ml/gcc-patches/2016-02/msg00784.html > > The test gcc.target/aarch64/assembler_arch_1.c fails to assemble on older > assemblers that don't support the LSE architecture ex

Re: [AArch64] Remove AARCH64_EXTRA_TUNE_RECIP_SQRT from Cortex-A57 tuning

2016-02-16 Thread James Greenhalgh
On Mon, Feb 15, 2016 at 11:24:53AM -0600, Evandro Menezes wrote: > On 02/15/16 04:50, James Greenhalgh wrote: > >On Mon, Feb 08, 2016 at 10:57:10AM +0000, James Greenhalgh wrote: > >>On Mon, Feb 01, 2016 at 02:00:01PM +, James Greenhalgh wrote: > >>>On Mon, Ja

Re: [PATCH][AArch64][v2] Skip gcc.target/aarch64/assembler_arch_1.c if assembler does not support it

2016-02-18 Thread James Greenhalgh
On Thu, Feb 18, 2016 at 11:31:02AM +0100, Christophe Lyon wrote: > On 17 February 2016 at 17:06, Kyrill Tkachov > wrote: > > Hi all, > > > > I've thought about this check a bit more and I think we can compactly > > auto-generate checks > > for any aarch64 architecture extension support in the asse

Re: [PATCH 1/2][AArch64] Implement AAPCS64 updates for alignment attribute

2016-02-26 Thread James Greenhalgh
On Mon, Feb 22, 2016 at 03:07:09PM +, Alan Lawrence wrote: > On 22/01/16 17:16, Alan Lawrence wrote: > > > >On 21/01/16 17:23, Alan Lawrence wrote: > >>On 18/01/16 17:10, Eric Botcazou wrote: > >>> > >>>Could you post the list of files that differ? How do they differ exactly? > >> > >>Hmmm. We

Re: [AArch64] Emit square root using the Newton series

2016-02-26 Thread James Greenhalgh
On Mon, Feb 22, 2016 at 06:50:44PM -0600, Evandro Menezes wrote: > In preparation for the patch adding the Newton series also for > square root, I'd like to propose this patch changing the name of the > existing tuning flag for the reciprocal square root. This is fine, other names like sw_rsqrt, e

Re: [PATCH][AArch64] Remove an unused reload hook.

2016-02-26 Thread James Greenhalgh
On Thu, Feb 25, 2016 at 12:00:58PM +0100, Yvan Roux wrote: > Hi, > > On 26 January 2015 at 18:01, Matthew Wahab wrote: > > Hello, > > > > The LEGITIMIZE_RELOAD_ADDRESS macro is only needed for reload. Since the > > Aarch64 backend no longer supports reload, this macro is not needed and this > > p

Re: [PATCH][AArch64] PR target/69613: Return zero TARGET_SHIFT_TRUNCATION_MASK when SHIFT_COUNT_TRUNCATED is false

2016-02-26 Thread James Greenhalgh
On Thu, Feb 25, 2016 at 09:25:45AM +, Kyrill Tkachov wrote: > Hi all, > > In this wrong-code PR we get bad code when synthesising a TImode right shift > by variable amount using DImode shifts during expand. > > The expand_double_word_shift function expands two paths: one where the > variable

Re: [PATCH][AArch64] Set TREE_TARGET_GLOBALS in aarch64_set_current_function when new tree is the default node to recalculate optab availability

2016-02-26 Thread James Greenhalgh
On Thu, Feb 25, 2016 at 11:04:21AM +, Kyrill Tkachov wrote: > Hi all, > > Seems like aarch64 is suffering from something similar to PR 69245 as well. > If a target pragma sets the target state to the same as the > target_option_default_node the node is just a pointer to > target_option_default

Re: [PATCH 1/3] Add aarch64-*-rtems* target

2016-02-26 Thread James Greenhalgh
On Thu, Feb 25, 2016 at 02:49:08PM -0600, Joel Sherrill wrote: > * gcc/config.gcc, libgcc/config.host: Add aarch64-*-rtems*. > * gcc/config/aarch64/rtems.h: New file. OK. Thanks, James > --- > gcc/config.gcc | 11 +-- > gcc/config/aarch64/rtems.h | 28 +++

Re: [PATCH 3/3] contrib/config-list.mk: Add aarch64-rtems and x86_64-rtems

2016-02-26 Thread James Greenhalgh
On Thu, Feb 25, 2016 at 02:49:10PM -0600, Joel Sherrill wrote: > * contrib/config-list.mk: Add aarch64-rtems and x86_64-rtems The AArch64 part of this is OK. Thanks, James > --- > contrib/config-list.mk | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-)

Re: [PATCH] Fix PR69951

2016-02-29 Thread James Greenhalgh
On Fri, Feb 26, 2016 at 09:32:53AM +0100, Richard Biener wrote: > > The following fixes PR69951, hopefully the last case of decl alias > issues with alias analysis. This time it's points-to and the DECL_UIDs > used in points-to sets not being canonicalized. > > The simplest (and cheapest) fix is

Re: [PATCH] Fix PR69951

2016-03-01 Thread James Greenhalgh
On Tue, Mar 01, 2016 at 10:21:27AM +0100, Richard Biener wrote: > On Mon, 29 Feb 2016, James Greenhalgh wrote: > > > On Fri, Feb 26, 2016 at 09:32:53AM +0100, Richard Biener wrote: > > > > > > The following fixes PR69951, hopefully the last case of decl alias &g

Re: [PATCH 1/9] gensupport: Fix define_subst operand renumbering.

2016-03-01 Thread James Greenhalgh
On Tue, Mar 01, 2016 at 10:29:28AM +0100, Andreas Krebbel wrote: > On 02/29/2016 02:36 PM, Bernd Schmidt wrote: > > On 02/29/2016 09:46 AM, Andreas Krebbel wrote: > >> Ok for mainline? > >> > >>* gensupport.c (process_substs_on_one_elem): Split loop to > >>complete mark_operands_used_in_mat

Re: [PATCH 1/9] gensupport: Fix define_subst operand renumbering.

2016-03-01 Thread James Greenhalgh
On Tue, Mar 01, 2016 at 01:35:18PM +0100, Andreas Krebbel wrote: > On 03/01/2016 01:15 PM, James Greenhalgh wrote: > > On Tue, Mar 01, 2016 at 10:29:28AM +0100, Andreas Krebbel wrote: > >> On 02/29/2016 02:36 PM, Bernd Schmidt wrote: > >>> On 02/29/2016 09:46 AM, An

Re: [PATCH] Fix PR69951

2016-03-02 Thread James Greenhalgh
On Tue, Mar 01, 2016 at 05:56:30PM +0100, Christophe Lyon wrote: > On 1 March 2016 at 10:51, James Greenhalgh wrote: > > On Tue, Mar 01, 2016 at 10:21:27AM +0100, Richard Biener wrote: > >> On Mon, 29 Feb 2016, James Greenhalgh wrote: > >> > >> > On Fri, Fe

[Patch testsuite] Change xfail conditions for bb-slp-34.c

2016-03-03 Thread James Greenhalgh
rch64-none-elf with no issues. OK? Thanks, James --- 2016-03-03 James Greenhalgh * gcc.dg/vect/bb-slp-34.c: Don't XFAIL for ARM/AArch64. diff --git a/gcc/testsuite/gcc.dg/vect/bb-slp-34.c b/gcc/testsuite/gcc.dg/vect/bb-slp-34.c index 418f2b5..7b9511a 100644 --- a/gcc/testsuite

Re: [PATCH][AArch64][testsuite] PR target/70004: Remove check using undefined behaviour

2016-03-04 Thread James Greenhalgh
On Fri, Mar 04, 2016 at 12:02:59PM +0100, Jakub Jelinek wrote: > On Fri, Mar 04, 2016 at 10:41:04AM +, Kyrill Tkachov wrote: > > Can do. I've moved the dodgy functions into their own separate compile test. > > The test passes. > > Ok? > > LGTM. OK from me too. James

Re: patch for elimination to SP when it is changed in RTL (PR57293)

2013-12-01 Thread James Greenhalgh
On Thu, Nov 28, 2013 at 10:11:26PM +, Vladimir Makarov wrote: > Committed as rev. 205498. > > 2013-11-28 Vladimir Makarov > > PR target/57293 > * ira.h (ira_setup_eliminable_regset): Remove parameter. > * ira.c (ira_setup_eliminable_regset): Ditto. Add > SUPPORTS_S

Re: [PATCH][ARM] Initial support for Cortex-A12

2013-12-09 Thread James Greenhalgh
On Mon, Dec 09, 2013 at 11:43:24AM +, Kyrill Tkachov wrote: > 2013-12-09 Kyrylo Tkachov > > * config/arm/arm.md (generic_sched): Add cortexa12. > (generic_vfp): Likewise. > * config/arm/arm.c (cortexa12_extra_costs): New cost table. > (arm_cortex_a12_tune): New tuning st

[ARM 2/5 big.LITTLE] Allow tuning parameters without unique tuning targets.

2013-12-17 Thread James Greenhalgh
ption. Bootstrapped in series and checked on arm-none-linux-gnueabi and arm-none-eabi. OK? Thanks, James --- gcc/ 2013-12-17 James Greenhalgh * config/arm/arm-cores.def: Add new column for TUNE_IDENT. * config/arm/genopt.sh: Improve layout. * config/arm/arm-tune.md: Regen

[ARM 5/5 big.LITTLE] Add support for -mcpu=cortex-a57.cortex-a53

2013-12-17 Thread James Greenhalgh
Hi, This patch wires up -mcpu=cortex-a57.cortex-a53 as an option to -mcpu. Bootstrapped in series, and sanity checked. OK? Thanks, James --- 2013-12-17 James Greenhalgh * config/arm/arm-cores.def (cortex-a57.cortex-a53): New. * doc/invoke.texi: Document -mcpu=cortex-a57

[ARM 3/5 big.LITTLE] Add support for -mcpu=cortex-a15.cortex-a7

2013-12-17 Thread James Greenhalgh
Hi, This patch wires up -mcpu=cortex-a15.cortex-a7 as an option to -mcpu. Bootstrapped in series, with --with-cpu=cortex-a15.cortex-a7. OK? Thanks, James --- 2013-12-17 James Greenhalgh * config/arm/arm-cores.def (cortex-a15.cortex-a7): New. * doc/invoke.texi: Document

[ARM 4/5 big.LITTLE] Add support for -mcpu=cortex-a57

2013-12-17 Thread James Greenhalgh
--- 2013-12-17 James Greenhalgh * config/arm/arm-cores.def (cortex-a57): New. * doc/invoke.texi: Document -mcpu=cortex-a57. * config/arm/arm-tables.opt: Regenerate. * config/arm/arm-tune.md: Regenerate. * config/arm/bpabi.h (BE8_LINK_SPEC): Handle -mcpu=c

[Patch ARM] Add big.LITTLE tuning options

2013-12-17 Thread James Greenhalgh
Hi, This patch series adds machinery and functionality to enable tuning for big.LITTLE systems when compiling for the ARM target. We take the convention for names to -mcpu that for some big.LITTLE system where the big core is 'x' and the little core is 'y', the -mcpu name will be x.y In order to

[ARM 1/5 big.LITTLE] Add driver support for rewriting -mcpu names

2013-12-17 Thread James Greenhalgh
character we see. Thus -mcpu=cortex-a15.cortex-a7 would be truncated to -mcpu=cortex-a15. Bootstrapped on a ChromeBook and checked for an arm-none-eabi and an arm-none-linux-gnueabi build. Thanks, James --- gcc/ 2013-12-17 James Greenhalgh * common/config/arm/ar

[AArch64 1/3 big.LITTLE] Driver rewriting of big.LITTLE names.

2013-12-18 Thread James Greenhalgh
these specs. Tested on aarch64-none-elf with no regressions, built on aarch64-none-linux-gnu with no problems. OK? Thanks, James --- 2013-12-18 James Greenhalgh * common/config/aarch64/aarch64-common.c (aarch64_rewrite_selected_cpu): New. (aarch64_rewrite_mcpu)

[AArch64 0/3 big.LITTLE]

2013-12-18 Thread James Greenhalgh
Hi, This patch series adds support for tuning for big.LITTLE systems when compiling for the AArch64 target. The patch series progresses as the one for the ARM backend did yesterday. (http://gcc.gnu.org/ml/gcc-patches/2013-12/msg01475.html) As with the ARM backend, we take the convention that for

[AArch64 3/3 big.LITTLE] Add support for -mcpu=cortex-a57.cortex-a53

2013-12-18 Thread James Greenhalgh
Hi, This patch wires up support for -mcpu=cortex-a57.cortex-a53. Tested on aarch64-none-elf with no regressions. OK? --- 2013-12-18 James Greenhalgh * config/aarch64/aarch64-cores.def: Add support for -mcpu=cortex-a57.cortex-a53. * config/aarch64/aarch64-tune.md

[AArch64 2/3 big.LITTLE] Allow tuning parameters without unique tuning targets.

2013-12-18 Thread James Greenhalgh
x-gnu with no issues. OK? Thanks, James --- 2013-12-18 James Greenhalgh * config/aarch64/aarch64-cores.def: Add new column for SCHEDULER_IDENT. * config/aarch64/aarch64-opts.h (AARCH64_CORE): Handle SCHEDULER_IDENT. * config/aarch64/aarch64.c (AA

[AArch64 4.8-branch] Backport: Fix CM instruction generation.

2013-12-18 Thread James Greenhalgh
anyone desires, but they make more sense as this coherent blob. Tested on aarch64-none-elf. OK for 4.8-branch? Thanks, James --- gcc/ 2013-12-18 James Greenhalgh Backport from Mainline. 2013-05-01 James Greenhalgh * config/aarch64/aarch64-simd-builtins.def (cmhs

[AArch64] big.LITTLE option rewriting bug

2014-01-07 Thread James Greenhalgh
Ugh. Now we have two ASM_SPECs which try to handle -mcpu as input. One of them just returns the input, the other does the cpu rewriting we actually want, so we can end up with: gcc -mcpu=cortex-a57.cortex-a53 Getting passed through to the assembler as: as -mcpu=cortex-a57 -mcpu=cortex-a57

Re: [Patch AArch64] Implement Vector Permute Support

2014-01-08 Thread James Greenhalgh
On Wed, Jan 08, 2014 at 12:10:13AM +, Andrew Pinski wrote: > On Tue, Jan 7, 2014 at 4:05 PM, Marcus Shawcroft > wrote: > > > > Andrew, We know that there are numerous issues with aarch64 BE advsimd > > support in GCC. The aarch64_be support is very much a work in progress. > > Tejas sorted

Re: [PATCH][AArch64][testsuite] Adjust some arith+compare tests for potentially more aggressive if-conversion

2015-07-10 Thread James Greenhalgh
On Fri, Jul 10, 2015 at 01:21:05PM +0100, Kyrill Tkachov wrote: > Hi all, > > Some of the testcases in aarch64.exp can fail their scan-assembler patterns > if if-conversion becomes more aggressive. > > This patch adjusts the testcases in case the branches are eliminated and > further optimisations

Re: [PATCH AArch64]Handle wrong cost for addition of minus immediate in aarch64_rtx_costs.

2015-07-15 Thread James Greenhalgh
On Wed, Jul 15, 2015 at 09:22:01AM +0100, Bin.Cheng wrote: > Ping^2 > +/* ADD -(immediate). */ I'd like to see a more detailed comment in this case. Probably something along the lines of: /* The canonical form of subtract of immediate is (add op0 minus_imm). Catch that here, m

Re: [PATCH][AArch64] Use cinc mnemonic for *csinc2_insn

2015-07-15 Thread James Greenhalgh
On Wed, Jul 15, 2015 at 02:44:40PM +0100, Kyrill Tkachov wrote: > Hi all, > This pattern performs a csinc of the same register in both operands. > This form can be written using the shorter alias CINC. > The ARMv8-A ARM says: > > "CINC , , > is equivalent to > CSINC , , , invert()" > > So the pa

Re: [PATCH v3] [AArch64] PR63870 Improve error messages for NEON single lane memory access intrinsics

2015-07-17 Thread James Greenhalgh
On Fri, Jun 26, 2015 at 08:14:55PM +0100, Charles Baylis wrote: > Since the last ping, I've tweaked the test cases a bit... > > Since I've been working on doing the same changes for the ARM backend, > I've moved the tests into the advsimd-intrinsics directory, marked as > XFAIL for ARM targets for

Re: [PATCH][AArch64][1/14] Add ident field to struct processor

2015-07-17 Thread James Greenhalgh
On Thu, Jul 16, 2015 at 04:20:30PM +0100, Kyrill Tkachov wrote: > Hi all, > > This first patch adds a field to the processor structure that uniquely > identifies that processor. Note that the current 'core' field is actually > just the core for which to schedule the instructions. With this patch

Re: [PATCH][AArch64][2/14] Refactor arches handling, add arch enum identifier

2015-07-17 Thread James Greenhalgh
On Thu, Jul 16, 2015 at 04:20:33PM +0100, Kyrill Tkachov wrote: > Hi all, > > In this second patch I want to get to the point where I can get an enum that > I can use to index all_architectures to get the current architecture being > used, similar to what we > do in patch 1/N. > > The closest thi

Re: Fix two more memory leaks in threader

2015-07-20 Thread James Greenhalgh
On Wed, May 20, 2015 at 05:36:25PM +0100, Jeff Law wrote: > > These fix the remaining leaks in the threader that I'm aware of. We > failed to properly clean-up when we had to cancel certain jump threading > opportunities. So thankfully this wasn't a big leak. Hi Jeff, I don't have a reduced

Re: [PATCH][AArch64][3/14] Refactor option override code

2015-07-20 Thread James Greenhalgh
On Thu, Jul 16, 2015 at 04:20:37PM +0100, Kyrill Tkachov wrote: > Hi all, > > This one is more meaty than the previous ones. It buffs up the parsing > functions for > the mcpu, march, mtune options, decouples them and makes them return an enum > describing > the errors that may occur. This will

Re: [PATCH][AArch64][4/14] Create TARGET_FIX_ERR_A53_835769 and use that instead of aarch64_fix_a53_err835769

2015-07-20 Thread James Greenhalgh
On Thu, Jul 16, 2015 at 04:48:43PM +0100, Kyrill Tkachov wrote: > Sorry, had sent out the wrong version. > This is the right patch. > > Thanks, > Kyrill > > On 16/07/15 16:20, Kyrill Tkachov wrote: > > Hi all, > > > > This patch transforms the Cortex-A53 erratum 835769 workaround checks into > >

Re: [PATCH][AArch64][5/14] Make flag_omit_leaf_frame_pointer intialize to 2. Define and use TARGET_OMIT_LEAF_FRAME_POINTER

2015-07-21 Thread James Greenhalgh
On Thu, Jul 16, 2015 at 04:20:45PM +0100, Kyrill Tkachov wrote: > Hi all, > > This patch wraps aarch64_frame_pointer_required into a > TARGET_OMIT_LEAF_FRAME_POINTER macro > and initializes aarch64_frame_pointer_required to 2 instead of 1, allowing us > to detect from > aarch64_frame_pointer_req

Re: [PATCH][AArch64][6/14] Implement TARGET_OPTION_SAVE/TARGET_OPTION_RESTORE

2015-07-21 Thread James Greenhalgh
On Fri, Jul 17, 2015 at 03:19:20PM +0100, Kyrill Tkachov wrote: > > > This is a slight respin of this patch, handling the -moverride string more > gracefully. > We need to explicitly save and restore it in TARGET_OPTION_SAVE otherwise the > option gen machinery > gets confused about its type an

Re: [PATCH][AArch64][7/14] Implement TARGET_SET_CURRENT_FUNCTION

2015-07-21 Thread James Greenhalgh
On Thu, Jul 16, 2015 at 04:20:56PM +0100, Kyrill Tkachov wrote: > Hi all, > > This patch implements TARGET_SET_CURRENT_FUNCTION and defines > SWITCHABLE_TARGET. > With this patch in the series, we should be far enough to get LTO option > switching to work properly. > > The implementation if TAR

Re: [PATCH][AArch64][8/14] Implement TARGET_OPTION_VALID_ATTRIBUTE_P

2015-07-21 Thread James Greenhalgh
On Thu, Jul 16, 2015 at 04:20:59PM +0100, Kyrill Tkachov wrote: > Hi all, > > This patch implements target attribute support via the > TARGET_OPTION_VALID_ATTRIBUTE_P hook. > The aarch64_handle_option function in common/config/aarch64/aarch64-common.c > is exported to the > backend and beefed up

Re: [PATCH][AArch64][9/14] Implement TARGET_CAN_INLINE_P

2015-07-21 Thread James Greenhalgh
On Thu, Jul 16, 2015 at 04:21:02PM +0100, Kyrill Tkachov wrote: > Hi all, > > This patch implements the target-specific inlining rules. > The basic philosophy is that we want to definitely reject inlining if the > callee's architecture > is not a subset, feature-wise, of the caller's. > > Beyond

Re: [PATCH][AArch64][10/14] Implement target pragmas

2015-07-21 Thread James Greenhalgh
On Thu, Jul 16, 2015 at 04:21:05PM +0100, Kyrill Tkachov wrote: > Hi all, > > This patch implements target pragmas for aarch64. > The pragmas accepted are the same as for target attributes (as required). > In addition pragmas will need to redefine the target-specific preprocessor > macros if appro

Re: [PATCH][AArch64][12/14] Target attributes and target pragmas tests

2015-07-21 Thread James Greenhalgh
On Thu, Jul 16, 2015 at 04:21:15PM +0100, Kyrill Tkachov wrote: > Hi all, > > These are the tests for target attributes and pragmas. > I've tried to test for the inlining rules, some of the possible errors and > the preprocessor macros changed from target pragmas. > > Ok for trunk? Mechanical ch

Re: [PATCH][AArch64][14/14] Reuse target_option_current_node when passing pragma string to target attribute

2015-07-21 Thread James Greenhalgh
On Thu, Jul 16, 2015 at 04:21:22PM +0100, Kyrill Tkachov wrote: > Hi all, > > This patch improves compilation times for code using the arm_neon.h > intrinsics. > The problem there is that since we now wrap all the intrinsics in arm_neon.h > inside a pragma, > the midend will apply the pragma str

Re: [PATCH][AArch64][11/14] Re-layout SIMD builtin types on builtin expansion

2015-07-22 Thread James Greenhalgh
On Tue, Jul 21, 2015 at 05:59:39PM +0100, Kyrill Tkachov wrote: > Sorry, here's the correct version, which uses initialized instead of inited > in one of the variable names. Some nits below. > > Kyrill > > 2015-07-21 Kyrylo Tkachov > > * config/aarch64/aarch64.c (aarch64_option_valid_

Re: [AArch64] PR 63521. define REG_ALLOC_ORDER/HONOR_REG_ALLOC_ORDER

2015-07-22 Thread James Greenhalgh
On Wed, May 20, 2015 at 01:35:41PM +0100, Jiong Wang wrote: > Current IRA still use both target macros in a few places. > > Tell IRA to use the order we defined rather than with it's own cost > calculation. Allocate caller saved first, then callee saved. > > This is especially useful for LR/x30,

[Patch ARM/AArch64 obvious] Fix typo: Rename insn_reservation cortex_53_advsimd to cortex_a53_advsimd

2015-07-22 Thread James Greenhalgh
Hi, As subject. This makes the naming scheme for insn_reservations consistent in config/arm/cortex-a53.md. Checked that we still build a compiler after this cosmetic change, and committed as obvious as revision 226069. Thanks, James 2015-07-22 James Greenhalgh * config/arm/cortex

Re: [AArch64/wwwdoc] Document -fpic support for small memory model

2015-07-22 Thread James Greenhalgh
On Fri, Jun 26, 2015 at 02:45:39PM +0100, Jiong Wang wrote: > > Marcus Shawcroft writes: > > 2015-06-26 Jiong Wang > > wwwdocs/ > * htdocs/gcc-6/changes.html (AArch64): Document -fpic for small model. > > Index: gcc-6/changes.html >

Re: [AArch64/wwwdoc] Document -fpic support for small memory model

2015-07-23 Thread James Greenhalgh
On Thu, Jul 23, 2015 at 09:38:26AM +0100, Jiong Wang wrote: > > James Greenhalgh writes: > > > On Fri, Jun 26, 2015 at 02:45:39PM +0100, Jiong Wang wrote: > >> > >> Marcus Shawcroft writes: > >> > >> 2015-06-26 Jiong Wang > >>

Re: [Revert][AArch64] PR 63521 Define REG_ALLOC_ORDER/HONOR_REG_ALLOC_ORDER

2015-07-27 Thread James Greenhalgh
On Mon, Jul 27, 2015 at 10:52:58AM +0100, pins...@gmail.com wrote: > > On Jul 27, 2015, at 2:26 AM, Jiong Wang wrote: > > > > Andrew Pinski writes: > > > >>> On Fri, Jul 24, 2015 at 2:07 AM, Jiong Wang wrote: > >>> > >>> James Gre

Re: [PATCH][AArch64] Improve spill code - swap order in shl pattern

2015-07-27 Thread James Greenhalgh
On Mon, Jul 27, 2015 at 03:38:40PM +0100, Wilco Dijkstra wrote: > ping > > Various instructions are supported as integer operations as well as SIMD on > > AArch64. When > > register pressure is high, lra-constraints inserts spill code without > > taking the allocation > > class into account, and

Re: [PATCH][AArch64] Improve spill code - swap order in shr patterns

2015-07-27 Thread James Greenhalgh
On Mon, Jul 27, 2015 at 03:38:55PM +0100, Wilco Dijkstra wrote: > This is basically the same as the shl version but for the shr patterns. > > Various instructions are supported as integer operations as well as SIMD on > AArch64. When > register pressure is high, lra-constraints inserts spill code

Re: [PATCH 10/15][AArch64] Implement vcvt_{,high_}f16_f32

2015-07-29 Thread James Greenhalgh
On Tue, Jul 28, 2015 at 12:26:09PM +0100, Alan Lawrence wrote: > gcc/ChangeLog: > > * config/aarch64/aarch64-simd.md (aarch64_float_truncate_lo_v2sf): > Reparameterize to... > (aarch64_float_truncate_lo_): ...this, for both V2SF and V4HF. > (aarch64_float_truncate_hi_v4sf):

Re: [PATCH 9/15][AArch64] vld{2,3,4}{,_lane,_dup}, vcombine, vcreate

2015-07-29 Thread James Greenhalgh
On Tue, Jul 28, 2015 at 12:25:55PM +0100, Alan Lawrence wrote: > gcc/ChangeLog: > > * config/aarch64/aarch64.c (aarch64_split_simd_combine): Add V4HFmode. > * config/aarch64/aarch64-builtins.c (VAR13, VAR14): New. > (aarch64_scalar_builtin_types, aarch64_init_simd_builtin_scalar_

Re: [PATCH 6/15][AArch64] Add basic FP16 support

2015-07-29 Thread James Greenhalgh
On Tue, Jul 28, 2015 at 12:25:06PM +0100, Alan Lawrence wrote: > gcc/ChangeLog: > > * config/aarch64/aarch64-builtins.c (aarch64_fp16_type_node): New. > (aarch64_init_builtins): Make aarch64_fp16_type_node, use for __fp16. > > * config/aarch64/aarch64-modes.def: Add HFmode. > >

Re: [PATCH 7/15][ARM/AArch64 Testsuite] Add basic fp16 tests

2015-07-29 Thread James Greenhalgh
On Tue, Jul 28, 2015 at 12:25:26PM +0100, Alan Lawrence wrote: > gcc/testsuite/ChangeLog: > > * gcc.target/aarch64/fp16/fp16.exp: New. > * gcc.target/aarch64/fp16/f16_convs_1.c: New. > * gcc.target/aarch64/fp16/f16_convs_2.c: New. OK. Thanks, James

Re: [PATCH 8/15][AArch64] Add support for float14x{4,8}_t vectors/builtins

2015-07-29 Thread James Greenhalgh
On Tue, Jul 28, 2015 at 12:25:40PM +0100, Alan Lawrence wrote: > gcc/ChangeLog: > > * config/aarch64/aarch64.c (aarch64_vector_mode_supported_p): Support > V4HFmode and V8HFmode. > (aarch64_split_simd_move): Add case for V8HFmode. > * config/aarch64/aarch64-builtins.c (v4hf

Re: [PATCH 10/15][AArch64] Implement vcvt_{,high_}f16_f32

2015-07-29 Thread James Greenhalgh
On Wed, Jul 29, 2015 at 10:10:09AM +0100, Alan Lawrence wrote: > James Greenhalgh wrote: > > On Tue, Jul 28, 2015 at 12:26:09PM +0100, Alan Lawrence wrote: > >> gcc/ChangeLog: > >> > >>* config/aarch64/aarch64-simd.md (aarch64_float_truncate

Re: [PATCH 11/15][AArch64] vreinterpret(q?), vget_(low|high), vld1(q?)_dup

2015-07-29 Thread James Greenhalgh
On Tue, Jul 28, 2015 at 12:26:22PM +0100, Alan Lawrence wrote: > gcc/ChangeLog: > > * config/aarch64/arm_neon.h (vreinterpret_p8_f16, vreinterpret_p16_f16, > vreinterpret_f16_f64, vreinterpret_f16_s8, vreinterpret_f16_s16, > vreinterpret_f16_s32, vreinterpret_f16_s64, vreinterpre

Re: [PATCH 12/15][AArch64] Add vcvt(_high)?_f32_f16 intrinsics, with BE RTL fix

2015-07-29 Thread James Greenhalgh
On Tue, Jul 28, 2015 at 12:26:35PM +0100, Alan Lawrence wrote: > commit 214fcc00475a543a79ed444f9a64061215397cc8 > Author: Alan Lawrence > Date: Wed Jan 28 13:01:31 2015 + > > AArch64 6/N: vcvt{,_high}_f32_f16 (using vect_par_cnst_hi_half, fixing > bigendian indices) > > diff --git a/

Re: [AArch64] Remove unused VRL2/3/4 iterator values (was: Re: [PATCH 8/15][AArch64] Add support for float14x{4,8}_t vectors/builtins)

2015-07-30 Thread James Greenhalgh
On Thu, Jul 30, 2015 at 12:47:20PM +0100, Alan Lawrence wrote: > James Greenhalgh wrote: > > On Tue, Jul 28, 2015 at 12:25:40PM +0100, Alan Lawrence wrote: > > > > I'd have preferred the unrelated changes here as separate patches. If you > > pull them out, they

Re: [AArch64] Remove unused VRL2/3/4 iterator values

2015-07-30 Thread James Greenhalgh
On Thu, Jul 30, 2015 at 04:06:22PM +0100, Alan Lawrence wrote: > James Greenhalgh wrote: > >> > >> (define_mode_attr VRL2 [(V8QI "V32QI") (V4HI "V16HI") > >>(V2SI "V8SI") (V2SF "V8SF") > >> -

Re: [PATCH][AArch64][3/14] Refactor option override code

2015-08-03 Thread James Greenhalgh
On Fri, Jul 24, 2015 at 09:21:46AM +0100, Kyrill Tkachov wrote: > > Thanks for the review, here's an updated version. > In the end, I chose to retain the use alloca (other patches in the series > are reworked to use it too). > > How's this? A nit or two from code you were moving or that got caug

Re: [PATCH][AArch64][8/14] Implement TARGET_OPTION_VALID_ATTRIBUTE_P

2015-08-03 Thread James Greenhalgh
On Fri, Jul 24, 2015 at 11:43:32AM +0100, Kyrill Tkachov wrote: > > On 21/07/15 16:37, James Greenhalgh wrote: > > On Thu, Jul 16, 2015 at 04:20:59PM +0100, Kyrill Tkachov wrote: > >> Hi all, > >> > >> This patch implements target attribute support via th

Re: [PATCH][AArch64][9/14] Implement TARGET_CAN_INLINE_P

2015-08-03 Thread James Greenhalgh
On Thu, Jul 23, 2015 at 11:17:20AM +0100, Kyrill Tkachov wrote: > Thanks, I've implemented the suggestions. > Re-bootstrapped and tested on aarch64. > How's this? This is good. OK for trunk. Thanks, James

Re: [PATCH][AArch64][10/14] Implement target pragmas

2015-08-03 Thread James Greenhalgh
On Mon, Aug 03, 2015 at 10:36:17AM +0100, Kyrill Tkachov wrote: > And here is a rebased version to resolve a conflict after Alan's patches went > in. > OK with the nits below fixed. > 2015-08-03 Kyrylo Tkachov > > * config.gcc (aarch64*-*-*): Specify c_target_objs and cxx_target_objs.

Re: [PATCH][AArch64][11/14] Re-layout SIMD builtin types on builtin expansion

2015-08-03 Thread James Greenhalgh
On Fri, Jul 24, 2015 at 09:38:34AM +0100, Kyrill Tkachov wrote: > Thanks, here's an updated version. > > 2015-07-24 Kyrylo Tkachov > > * config/aarch64/aarch64.c (aarch64_option_valid_attribute_p): > Initialize simd builtins if TARGET_SIMD. > * config/aarch64/aarch64-builtins.c

Re: [PATCH][AArch64][12/14] Target attributes and target pragmas tests

2015-08-03 Thread James Greenhalgh
On Fri, Jul 24, 2015 at 09:40:28AM +0100, Kyrill Tkachov wrote: > > On 21/07/15 18:14, James Greenhalgh wrote: > > On Thu, Jul 16, 2015 at 04:21:15PM +0100, Kyrill Tkachov wrote: > >> Hi all, > >> > >> These are the tests for target attributes and pragmas. &

Re: [PATCH][AArch64][1/3] Expand signed mod by power of 2 using CSNEG

2015-08-03 Thread James Greenhalgh
On Fri, Jul 24, 2015 at 11:55:33AM +0100, Kyrill Tkachov wrote: > Hi all, > > This patch implements an aarch64-specific expansion of the signed modulo by a > power of 2. > The proposed sequence makes use of the conditional negate instruction CSNEG. > For a power of N, x % N can be calculated with

Re: [PATCH][AArch64] Change aarch64 vector cost to match vectorizer

2015-08-03 Thread James Greenhalgh
On Mon, Jul 27, 2015 at 02:22:41PM +0100, Pawel Kupidura wrote: > diff --git a/gcc/ChangeLog b/gcc/ChangeLog > index 10df325..ffafc3f 100644 > --- a/gcc/ChangeLog > +++ b/gcc/ChangeLog > @@ -1,3 +1,7 @@ > +2015-07-27 Pawel Kupidura Two spaces between your name and your email address, like so: 2

Re: [PATCH][AArch64][8/14] Implement TARGET_OPTION_VALID_ATTRIBUTE_P

2015-08-04 Thread James Greenhalgh
On Mon, Aug 03, 2015 at 04:20:13PM +0100, Kyrill Tkachov wrote: > Ok, I've removed usages of 'ret' in favor of returning when appropriate. > In this last one I left the ret (but cleaned up the control flow a bit) > because if the processing fails we need to clean up a bit of state before > returnin

Re: [PATCH][AArch64][8/14] Implement TARGET_OPTION_VALID_ATTRIBUTE_P

2015-08-04 Thread James Greenhalgh
On Tue, Aug 04, 2015 at 09:58:37AM +0100, Kyrill Tkachov wrote: > > On 04/08/15 09:53, James Greenhalgh wrote: > > On Mon, Aug 03, 2015 at 04:20:13PM +0100, Kyrill Tkachov wrote: > >> Ok, I've removed usages of 'ret' in favor of returning when appropriate.

Re: [AArch64] Improve TLS Descriptor pattern to release RTL loop IV opt

2015-08-04 Thread James Greenhalgh
On Tue, Jul 28, 2015 at 02:12:36PM +0100, Jiong Wang wrote: > > The instruction sequences for preparing argument for TLS descriptor > runtime resolver and the later function call to resolver can actually be > hoisted out of the loop. > > Currently we can't because we have exposed the hard registe

Re: [AArch64] Tighten direct call pattern to repair -fno-plt

2015-08-04 Thread James Greenhalgh
On Thu, Jul 16, 2015 at 11:21:25AM +0100, Jiong Wang wrote: > > Jeff Law writes: > > > On 06/23/2015 02:29 AM, Ramana Radhakrishnan wrote: > > > >>> If you try disabling the REG_EQUAL note generation [*], you'll probably > >>> find a > >>> performance regression on arm32 (and probably on aarch64

Re: [AArch64][sibcall]Tighten direct call pattern to repair -fno-plt

2015-08-04 Thread James Greenhalgh
On Tue, Jul 21, 2015 at 01:42:35PM +0100, Jiong Wang wrote: > > Jiong Wang writes: > > > Alexander Monakov writes: > > > >>> Attachment is the patch which repair -fno-plt support for AArch64. > >>> > >>> aarch64_is_noplt_call_p will only be true if: > >>> > >>> * gcc is generating position in

Re: [PATCH][AArch64] PR target/66731 Fix fnmul insn with -frounding-math

2015-08-04 Thread James Greenhalgh
On Thu, Jul 16, 2015 at 10:24:20AM +0100, Szabolcs Nagy wrote: > On 06/07/15 11:24, James Greenhalgh wrote: > > > > Please make sure in a follow-up patch that the costing logic in > > aarch64_rtx_costs also gets updated. > > > > Tested with aarch64-none-linux

Re: [PATCH][AArch64] Change aarch64 vector cost to match vectorizer

2015-08-04 Thread James Greenhalgh
On Tue, Aug 04, 2015 at 11:06:11AM +0100, Pawel Kupidura wrote: > Hi, > > I'm sorry about the issues with formatting, it should be fixed now. > Here's corrected version with diff to current trunk. Hi Pawel, I'm still having trouble getting this patch to apply, I'm not sure whether it is the for

Re: [PATCH] Add X != !X pattern

2015-08-05 Thread James Greenhalgh
On Wed, Aug 05, 2015 at 12:09:35PM +0100, Richard Biener wrote: > On Wed, 5 Aug 2015, Andrew Pinski wrote: > > > On Wed, Aug 5, 2015 at 3:16 AM, Richard Biener wrote: > > > On Wed, 5 Aug 2015, Andreas Schwab wrote: > > > > > >> Richard Biener writes: > > >> > > >> > * gimple-fold.c (gimple_f

Re: [PATCH] Add X != !X pattern

2015-08-05 Thread James Greenhalgh
On Wed, Aug 05, 2015 at 02:38:01PM +0100, Richard Biener wrote: > On Wed, 5 Aug 2015, James Greenhalgh wrote: > > > On Wed, Aug 05, 2015 at 12:09:35PM +0100, Richard Biener wrote: > > > On Wed, 5 Aug 2015, Andrew Pinski wrote: > > > > > > > On W

Re: [PATCH] Add X != !X pattern

2015-08-05 Thread James Greenhalgh
On Wed, Aug 05, 2015 at 02:56:08PM +0100, Richard Biener wrote: > For reference see below (testing on aarch64 appreciated). Looks good to me on aarch64-none-elf. Thanks, James > Bootstrap & regtest running on x86_64-unknown-linux-gnu. > > Richard. > > 2015-08-05 Richard Biener > > *

Re: [PATCH][AArch64][12/14] Target attributes and target pragmas tests

2015-08-05 Thread James Greenhalgh
On Mon, Aug 03, 2015 at 12:32:15PM +0100, James Greenhalgh wrote: > On Fri, Jul 24, 2015 at 09:40:28AM +0100, Kyrill Tkachov wrote: > > > > On 21/07/15 18:14, James Greenhalgh wrote: > > > On Thu, Jul 16, 2015 at 04:21:15PM +0100, Kyrill Tkachov wrote: > > >>

[AArch64] Implement copysign[ds]f3

2015-09-16 Thread James Greenhalgh
using copysign or SIGN from fortran. OK? Thanks, James --- gcc/ 2015-09-16 James Greenhalgh * config/aarch64/aarch64.md (copysigndf3): New. (copysignsf3): Likewise. gcc/testsuite/ 2015-09-16 James Greenhalgh * gcc.target/aarch64/copysign_1.c: New

Re: [Aarch64] Use vector wide add for mixed-mode adds

2015-09-17 Thread James Greenhalgh
On Mon, Sep 07, 2015 at 06:54:30AM +0100, Michael Collison wrote: > This patch is designed to address code that was not being vectorized due > to missing widening patterns in the aarch64 backend. Code such as: > > int t6(int len, void * dummy, short * __restrict x) > { >len = len & ~31; >i

Re: [AArch64][PATCH 1/5] Use atomic instructions for swap and fetch-update operations.

2015-09-18 Thread James Greenhalgh
On Thu, Sep 17, 2015 at 05:37:55PM +0100, Matthew Wahab wrote: > Hello, > > ARMv8.1 adds atomic swap and atomic load-operate instructions with > optional memory ordering specifiers. This patch series adds the > instructions to GCC, making them available with -march=armv8.1-a or > -march=armv8+lse,

Re: [AArch64][PATCH 2/5] Add BIC instruction.

2015-09-18 Thread James Greenhalgh
On Thu, Sep 17, 2015 at 05:40:48PM +0100, Matthew Wahab wrote: > Hello, > > ARMv8.1 adds atomic swap and atomic load-operate instructions with > optional memory ordering specifiers. This patch adds an expander to > generate a BIC instruction that can be explicitly called when > implementing the at

Re: [AArch64][PATCH 3/5] Add atomic load-operate instructions.

2015-09-18 Thread James Greenhalgh
On Thu, Sep 17, 2015 at 05:42:35PM +0100, Matthew Wahab wrote: > Hello, > > ARMv8.1 adds atomic swap and atomic load-operate instructions with > optional memory ordering specifiers. This patch adds the ARMv8.1 atomic > load-operate instructions. > > Tested the series for aarch64-none-linux-gnu wi

Re: [AArch64][PATCH 4/5] Use atomic load-operate instructions for fetch-update patterns.

2015-09-18 Thread James Greenhalgh
On Thu, Sep 17, 2015 at 05:47:43PM +0100, Matthew Wahab wrote: > Hello, > > ARMv8.1 adds atomic swap and atomic load-operate instructions with > optional memory ordering specifiers. This patch uses the ARMv8.1 atomic > load-operate instructions to implement the atomic_fetch_ > patterns. This patch

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