[pushed] LRA: Update insn sp offset if its input reload changes SP

2023-05-30 Thread Vladimir Makarov via Gcc-patches
The following patch fixes an LRA bug triggered by switching H8300 target from reload to LRA.  The description of the problem is in the commit message. The patch was successfully bootstrapped and tested on x86-64, aarch64, and ppc64le. commit 30038a207c10a2783fa2695b62c7c8458ef05e73 Author: V

[pushed] [PR109541] RA: Constrain class of pic offset table pseudo to general regs

2023-06-07 Thread Vladimir Makarov via Gcc-patches
The following patch fixes https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109541 The patch was successfully bootstrapped and tested on x86-64, aarcha64, and ppc64le.

Re: [pushed] [PR109541] RA: Constrain class of pic offset table pseudo to general regs

2023-06-07 Thread Vladimir Makarov via Gcc-patches
On 6/7/23 12:20, Jeff Law wrote: On 6/7/23 09:35, Vladimir Makarov via Gcc-patches wrote: The following patch fixes -ENOPATCH Sorry, here is the patch. commit 08ca31fb27841cb7f3bff7086be6f139136be1a7 Author: Vladimir N. Makarov Date: Wed Jun 7 09:51:54 2023 -0400 RA: Constrain

Re: [pushed][LRA][PR110372]: Refine reload pseudo class

2023-07-12 Thread Vladimir Makarov via Gcc-patches
On 7/12/23 06:07, Richard Sandiford wrote: Vladimir Makarov via Gcc-patches writes: diff --git a/gcc/lra-assigns.cc b/gcc/lra-assigns.cc index 73fbef29912..2f95121df06 100644 --- a/gcc/lra-assigns.cc +++ b/gcc/lra-assigns.cc @@ -1443,10 +1443,11 @@ assign_by_spills (void

Re: [pushed][LRA][PR110372]: Refine reload pseudo class

2023-07-12 Thread Vladimir Makarov via Gcc-patches
On 7/12/23 12:22, Richard Sandiford wrote: Vladimir Makarov writes: On 7/12/23 06:07, Richard Sandiford wrote: Vladimir Makarov via Gcc-patches writes: diff --git a/gcc/lra-assigns.cc b/gcc/lra-assigns.cc index 73fbef29912..2f95121df06 100644 --- a/gcc/lra-assigns.cc +++ b/gcc/lra

Re: [IRA] Skip empty register classes in setup_reg_class_relations

2023-07-13 Thread Vladimir Makarov via Gcc-patches
On 7/12/23 07:05, senthilkumar.selva...@microchip.com wrote: Hi, I've been spending some (spare) time trying to get LRA working for the avr target. Thank you for addressing this problem. The code you changing is very sensitive and was a source of multiple PRs in the past.  But I foun

[pushed][RA][PR109520]: Catch error when there are no enough registers for asm insn

2023-07-13 Thread Vladimir Makarov via Gcc-patches
The following patch solves https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109520 The patch was successfully bootstrapped and tested on x86-64, aarch64, and ppc64le. commit b175b4887f928118af997f6d4d75097a64dcec5d Author: Vladimir N. Makarov Date: Thu Jul 13 10:42:17 2023 -0400 [RA][PR10

[pushed][LRA]: Check and update frame to stack pointer elimination after stack slot allocation

2023-07-19 Thread Vladimir Makarov via Gcc-patches
The following patch is necessary for porting avr to LRA. The patch was successfully bootstrapped and tested on x86-64, aarch64, and ppc64le. There is still avr poring problem with reloading of subreg of frame pointer.  I'll address it later on this week. commit 2971ff7b1d564ac04b537d907c70e

[pushed][LRA]: Exclude reloading of frame pointer in subreg for some cases

2023-07-20 Thread Vladimir Makarov via Gcc-patches
The following patch improves code for avr LRA port.  More explanation for the patch can be found in the commit message. The patch was successfully bootstrapped and tested on x86-64, aarch64, and ppc64le. commit 4b8878fbf7b74ea5c3405c9f558df0517036f131 Author: Vladimir N. Makarov Date: Thu Ju

Re: [pushed][LRA]: Check and update frame to stack pointer elimination after stack slot allocation

2023-07-21 Thread Vladimir Makarov via Gcc-patches
On 7/20/23 16:45, Rainer Orth wrote: Hi Vladimir, The following patch is necessary for porting avr to LRA. The patch was successfully bootstrapped and tested on x86-64, aarch64, and ppc64le. There is still avr poring problem with reloading of subreg of frame pointer.  I'll address it later

[pushed][LRA]: Fix sparc bootstrap after recent patch for fp elimination for avr LRA port

2023-07-21 Thread Vladimir Makarov via Gcc-patches
The following patch fixes sparc solaris bootstrap.  The explanation of the patch is in the commit message. The patch was successfully bootstrap on x86-64, aarch64, and sparc64 solaris. commit d17be8f7f36abe257a7d026dad61e5f8d14bdafc Author: Vladimir N. Makarov Date: Fri Jul 21 20:28:50 202

Re: [PATCH] rtl-optimization/110587 - remove quadratic regno_in_use_p

2023-08-01 Thread Vladimir Makarov via Gcc-patches
On 7/25/23 09:40, Richard Biener wrote: The following removes the code checking whether a noop copy is between something involved in the return sequence composed of a SET and USE. Instead of checking for this special-case the following makes us only ever remove noop copies between pseudos - wh

Re: [PING][PATCH] ira: update allocated_hardreg_p[] in improve_allocation() [PR110254]

2023-08-02 Thread Vladimir Makarov via Gcc-patches
On 8/1/23 01:20, Surya Kumari Jangala wrote: Ping Sorry for delay with the answer. I was on vacation. On 21/07/23 3:43 pm, Surya Kumari Jangala via Gcc-patches wrote: The improve_allocation() routine does not update the allocated_hardreg_p[] array after an allocno is assigned a register. If

[pushed][LRA] Check input insn pattern hard regs against early clobber hard regs for live info

2023-08-04 Thread Vladimir Makarov via Gcc-patches
The following patch fixes a problem found by LRA port for avr target.  The problem description is in the commit message. The patch was successfully bootstrapped and tested on x86-64 and aarch64. commit abf953042ace471720c1dc284b5f38e546fc0595 Author: Vladimir N. Makarov Date: Fri Aug 4 08:04:

Re: [PATCH] rtl-optimization/110587 - speedup find_hard_regno_for_1

2023-08-08 Thread Vladimir Makarov via Gcc-patches
On 8/7/23 09:18, Richard Biener wrote: On Wed, 2 Aug 2023, Richard Biener wrote: On Mon, 31 Jul 2023, Jeff Law wrote: On 7/31/23 04:54, Richard Biener via Gcc-patches wrote: On Tue, 25 Jul 2023, Richard Biener wrote: The following applies a micro-optimization to find_hard_regno_for_1, r

[pushed][LRA]: Implement output stack pointer reloads

2023-08-11 Thread Vladimir Makarov via Gcc-patches
Sorry, I had some problems with email.  Therefore there are email duplication and they were sent to g...@gcc.gnu.org instead of gcc-patches@gcc.gnu.org On 8/9/23 16:54, Vladimir Makarov wrote: On 8/9/23 07:15, senthilkumar.selva...@microchip.com wrote: Hi,    After turning on FP -> SP el

[pushed]LRA]: Fix asserts for output stack pointer reloads

2023-08-13 Thread Vladimir Makarov via Gcc-patches
The following patch fixes useless asserts in my latest patch implementing output stack pointer reloads. commit 18b417fe1a46d37738243267c1f559cd0acc4886 Author: Vladimir N. Makarov Date: Sun Aug 13 20:54:58 2023 -0400 [LRA]: Fix asserts for output stack pointer reloads The patch im

Re: [pushed]LRA]: Fix asserts for output stack pointer reloads

2023-08-14 Thread Vladimir Makarov via Gcc-patches
On 8/14/23 14:37, Prathamesh Kulkarni wrote: On Mon, 14 Aug 2023 at 06:39, Vladimir Makarov via Gcc-patches wrote: The following patch fixes useless asserts in my latest patch implementing output stack pointer reloads. Hi Vladimir, It seems that this patch caused the following ICE on

[pushed][LRA]: Process output stack pointer reloads before emitting reload insns

2023-08-14 Thread Vladimir Makarov via Gcc-patches
The patch fixes a failure of building aarch64 port with my yesterday patch. The patch was successfully bootstrapped on x86-64 and aarch64. commit c4760c0161f92b92361feba11836e3d066bb330c Author: Vladimir N. Makarov Date: Mon Aug 14 16:06:27 2023 -0400 [LRA]: Process output stack pointer r

[pushed][LRA]: Spill pseudos assigned to fp when fp->sp elimination became impossible

2023-08-16 Thread Vladimir Makarov via Gcc-patches
The attached patch fixes recently found wrong insn removal in LRA port for AVR. The patch was successfully tested and bootstrapped on x86-64 and aarch64. commit 748a77558ff37761faa234e19327ad1decaace33 Author: Vladimir N. Makarov Date: Wed Aug 16 09:13:54 2023 -0400 [LRA]: Spill pseudo

[pushed][LRA]: When assigning stack slots to pseudos previously assigned to fp consider other spilled pseudos

2023-08-17 Thread Vladimir Makarov via Gcc-patches
The following patch fixes a problem with allocating the same stack slots to conflicting pseudos.  The problem exists only for AVR LRA port. The patch was successfully bootstrapped and tested on x86-64 and aarch64. commit c024867d1aa9d465e0236fc9d45d8e1d4bb6bd30 Author: Vladimir N. Makarov Date

Re: [pushed][LRA]: Spill pseudos assigned to fp when fp->sp elimination became impossible

2023-08-17 Thread Vladimir Makarov via Gcc-patches
On 8/17/23 07:19, senthilkumar.selva...@microchip.com wrote: On Wed, 2023-08-16 at 12:13 -0400, Vladimir Makarov wrote: EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe The attached patch fixes recently found wrong insn removal in LRA port for AVR.

[pushed] [RA] [PR110215] Ignore conflicts for some pseudos from insns throwing a final exception

2023-06-16 Thread Vladimir Makarov via Gcc-patches
The following patch solves https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110215 The patch was successfully tested and bootstrapped on x86-64, aarch64, and ppc64le. It is difficult to make a stable test for the PR.  So there is not test in the patch. commit 154c69039571c66b3a6d16ecfa9e6ff229

[pushed][LRA][PR110372]: Refine reload pseudo class

2023-07-07 Thread Vladimir Makarov via Gcc-patches
The following patch solves https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110372 The patch was successfully bootstrapped and tested on x86-64. commit 1f7e5a7b91862b999aab88ee0319052aaf00f0f1 Author: Vladimir N. Makarov Date: Fri Jul 7 09:53:38 2023 -0400 LRA: Refine reload pseudo class

[pushed] [PR108774] RA: Clear reg equiv caller_save_p flag when clearing defined_p flag

2023-02-13 Thread Vladimir Makarov via Gcc-patches
The following patch solves   https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108774 The patch was successfully bootstrapped and tested on i686, x86_64, and aarch64. commit a33e3dcbd15e73603796e30b5eeec11a0c8bacec Author: Vladimir N. Makarov Date: Mon Feb 13 16:05:04 2023 -0500 RA: Clear re

[pushed][PR90706] IRA: Use minimal cost for hard register movement

2023-03-02 Thread Vladimir Makarov via Gcc-patches
The following patch is for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90706 The patch was successfully bootstrapped and tested on i686, x86-64, aarch64, ppc64le. commit 23661e39df76e07fb4ce1ea015379c7601d947ef Author: Vladimir N. Makarov Date: Thu Mar 2 16:29:05 2023 -0500 IRA: Use

[pushed] [PR108999] LRA: For clobbered regs use operand mode instead of the biggest mode

2023-03-09 Thread Vladimir Makarov via Gcc-patches
The following patch solves https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108999 The patch was successfully bootstrapped and tested on i686, x86-64, aarch64, and ppc64 be/le. commit 3c75631fc09a22f2513fab80ef502c2a8b0f9121 Author: Vladimir N. Makarov Date: Thu Mar 9 08:41:09 2023 -0500 LR

Re: [PATCH] Only use NO_REGS in cost calculation when !hard_regno_mode_ok for GENERAL_REGS and mode.

2023-05-25 Thread Vladimir Makarov via Gcc-patches
On 5/17/23 02:57, liuhongt wrote: r14-172-g0368d169492017 replaces GENERAL_REGS with NO_REGS in cost calculation when the preferred register class are not known yet. It regressed powerpc PR109610 and PR109858, it looks too aggressive to use NO_REGS when mode can be allocated with GENERAL_REGS.

[committed] LRA: patch fixing PR98777

2021-01-21 Thread Vladimir Makarov via Gcc-patches
The following patch fixes recently reported https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98777 The patch was successfully bootstrapped on x86-64. [PR98777] LRA: Use preliminary created pseudo for in LRA elimination subpass LRA did not extend ira_reg_equiv after generation of a pseudo in elimi

[committed] [PR97684] IRA: Recalculate pseudo classes if we added new pseduos since last calculation before updating equiv regs

2021-01-27 Thread Vladimir Makarov via Gcc-patches
The patch solves the following problem:   https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97684 The patch was successfully bootstrapped and tested on x86-64. commit 238ea13cca75ad499f227b60a95c40174c6caf78 Author: Vladimir N. Makarov Date: Wed Jan 27 14:53:28 2021 -0500 [PR97684] IRA: Reca

[committed] [PR97701] LRA: Don't narrow class only for REG or MEM.

2021-01-29 Thread Vladimir Makarov via Gcc-patches
The following patch solves    https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97701 The patch was successfully bootstrapped and tested on x86-64, arm64, ppc64be. This patch variant is only for trunk.  GCC-10 branch will have a bit different patch. commit 449f17f23a7b8c4a340cc9342d68303ffa35c

[committed] [PR97701] Modify test for trunk

2021-01-29 Thread Vladimir Makarov via Gcc-patches
commit 0202fa3d6359911a9e6d605d33d0ac669e21eaf3 Author: Vladimir N. Makarov Date: Fri Jan 29 16:04:03 2021 -0500 [PR97701] Modify test for trunk Original test was for gcc-10. The modified one for trunk. gcc/testsuite/ChangeLog: PR target/97701

Re: [PATCH] PING lra: clear lra_insn_recog_data after simplifying a mem subreg

2021-02-02 Thread Vladimir Makarov via Gcc-patches
On 2021-01-28 5:40 a.m., Ilya Leoshkevich via Gcc-patches wrote: Hello, I would like to ping the following patch: lra: clear lra_insn_recog_data after simplifying a mem subreg https://gcc.gnu.org/pipermail/gcc-patches/2021-January/563428.html Sorry, I missed your original email.  The patch i

[committed] [PR97701] LRA: Don't narrow class only for REG or MEM. A version modified for gcc 10 branch.

2021-02-04 Thread Vladimir Makarov via Gcc-patches
It seem that my recent patch for PR97701 for the trunk did not create new problems.  Therefore I am committing the following patch into gcc-10-branch. commit 4918937f4c76b05eaa331f8d6f2571e2fddcc22b (HEAD -> releases/gcc-10) Author: Vladimir N. Makarov Date: Thu Feb 4 15:57:55 2021 -0500

[PATCH] PR98096: inline-asm: Take inout operands into account for access to labels by names.

2021-02-04 Thread Vladimir Makarov via Gcc-patches
The following patch solves    https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98096 The patch is for a new GCC extension -- asm goto with output reloads. GCC splits inout operands (with constraint "+") into output and new matched input operands during gimplfication.  Addressing input or output o

[committed] [PR96264] LRA: Check output insn hard regs when updating available rematerialization insns

2021-02-18 Thread Vladimir Makarov via Gcc-patches
The following patch fixes https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96264 The patch was successfully bootstrapped and tested on ppc64le. commit e0d3041c9caece8b48be016fa515747eb2746d35 Author: Vladimir Makarov Date: Thu Feb 18 22:40:54 2021 + [PR96264] LRA: Check output insn har

Re: [PATCH][PR98791]: IRA: Make sure allocno copy mode's are ordered

2021-02-19 Thread Vladimir Makarov via Gcc-patches
On 2021-02-19 5:53 a.m., Andre Vieira (lists) wrote: Hi, This patch makes sure that allocno copies are not created for unordered modes. The testcases in the PR highlighted a case where an allocno copy was being created for: (insn 121 120 123 11 (parallel [     (set (reg:VNx2QI 217)

[committed] [PR99123] inline-asm: Don't use decompose_mem_address to find used hard regs

2021-02-24 Thread Vladimir Makarov via Gcc-patches
The following patch solves   https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99123 The patch was successfully bootstrapped and tested on x86-64 commit b6680c2084521d2612c3a08aa01b274078c4f3e3 Author: Vladimir N. Makarov Date: Wed Feb 24 13:54:10 2021 -0500 [PR99123] inline-asm: Don't use

[committed] [PR99233] testsuite: Run test pr96264.c only for little endian target

2021-02-25 Thread Vladimir Makarov via Gcc-patches
The following patch solves https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99233 commit 557a0d3b1b389c46d5a8aa24e27abed4c401d17e Author: Vladimir N. Makarov Date: Thu Feb 25 11:20:32 2021 -0500 [PR99233] tesstsuite: Run test pr96264.c only for little endian The test in question is

[commited] [PR99378] LRA: Skip decomposing address for asm insn operand with unknown constraint

2021-03-05 Thread Vladimir Makarov via Gcc-patches
  The following patch fixes https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99378   The patch was successfully bootstrapped and tested on x86-64. commit e786c7547eda4edd90797f6cae0f5e6405d64773 (HEAD -> master) Author: Vladimir N. Makarov Date: Fri Mar 5 11:41:25 2021 -0500 [PR99378] LRA:

[committed] [PR99422] LRA: Skip modifiers when processing memory address.

2021-03-08 Thread Vladimir Makarov via Gcc-patches
The following patch solves https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99422 The patch was successfully bootstrapped and tested on ppc64le, x86-64 and arm64. commit 04b4828c6dd215385fde6964a5e13da8a01a78ba (HEAD -> master) Author: Vladimir N. Makarov Date: Mon Mar 8 09:24:57 2021 -0500

Re: PING^3 [GCC 10] [PATCH] IRA: Don't make a global register eliminable

2020-09-29 Thread Vladimir Makarov via Gcc-patches
On 2020-09-29 8:38 a.m., H.J. Lu wrote: On Fri, Sep 25, 2020 at 6:46 AM H.J. Lu wrote: OK for GCC 10 branch? Thanks. PING: https://gcc.gnu.org/pipermail/gcc-patches/2020-September/554268.html PING. PING. Sorry, I thought Jeff Law already approved this.  In any case the patch is also

[PUSHED] Patch to fix a LRA ICE [PR 97313]

2020-10-09 Thread Vladimir Makarov via Gcc-patches
The following patch has been committed into the main line.  The patch fixes https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97313 The patch was successfully bootstrapped and tested on x86-64. gcc/ChangeLog: 2020-10-09 Vladimir Makarov PR rtl-optimization/97313 * lra-constraints.c (match_re

[committed] [PR104637] LRA: Split hard regs as many as possible on one subpass

2022-02-28 Thread Vladimir Makarov via Gcc-patches
The following patch fixes https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104637 The patch was successfully bootstrapped and tested on x86-64, aarch64, and ppc64. commit ec1b9ba2d7913fe5e9deacc8e55e7539262f5124 Author: Vladimir N. Makarov Date: Mon Feb 28 16:43:50 2022 -0500 [PR104637] L

Re: [PATCH] rtl-optimization/104686 - speedup IRA allocno conflict test

2022-03-02 Thread Vladimir Makarov via Gcc-patches
On 2022-03-02 03:58, Richard Biener wrote: In this PR allocnos_conflict_p takes 90% of the compile-time via the calls from update_conflict_hard_regno_costs. This is due to the high number of conflicts recorded in the dense bitvector representation. Fortunately we can take advantage of the bit

Re: [PR103302] skip multi-word pre-move clobber during lra

2022-03-02 Thread Vladimir Makarov via Gcc-patches
On 2022-03-02 07:25, Alexandre Oliva wrote: Regstrapped on x86_64-linux-gnu, also tested on various riscv and arm targets (with gcc-11). Ok to install? Yes. Thank you on working this, Alex. for gcc/ChangeLog * lra-constraints.cc (undo_optional_reloads): Recognize and drop

[committed] [PR103074] LRA: Check new conflicts when splitting hard reg live range

2022-03-10 Thread Vladimir Makarov via Gcc-patches
The following patch solves https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103074 The patch was successfully bootstrapped and tested on x86-64 and aarch64. commit d8e5fff6b74b82c2ac3254be9a1f0fb6b30dbdbf Author: Vladimir N. Makarov Date: Thu Mar 10 16:16:00 2022 -0500 [PR103074] LRA: Check

Re: [PATCH] lra: Fix up debug_p handling in lra_substitute_pseudo [PR104778]

2022-03-14 Thread Vladimir Makarov via Gcc-patches
On 2022-03-12 14:37, Jakub Jelinek wrote: Hi! The following testcase ICEs on powerpc-linux, because lra_substitute_pseudo substitutes (const_int 1) into a subreg operand. First a subreg of subreg of a reg appears in a debug insn (which surely is invalid outside of debug insns, but in debug in

[committed] [PR104961] LRA: split hard reg for reload pseudo with clobber

2022-03-18 Thread Vladimir Makarov via Gcc-patches
The following patch fixes https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104961 The patch was successfully bootstrapped and tested on x86-64. commit 4e2291789a8b31c550271405782356e8aeddcee3 Author: Vladimir N. Makarov Date: Fri Mar 18 14:23:40 2022 -0400 [PR104961] LRA: split hard reg for

Re: [PATCH] rtl-optimization/105028 - fix compile-time hog in form_threads_from_copies

2022-03-23 Thread Vladimir Makarov via Gcc-patches
On 2022-03-23 07:49, Richard Biener wrote: form_threads_from_copies processes a sorted array of copies, skipping those with the same thread and conflicting threads and merging the first non-conflicting ones. After that it terminates the loop and gathers the remaining elements of the array, ski

[committed] [PR104971] LRA: check live hard regs to remove a dead insn

2022-03-25 Thread Vladimir Makarov via Gcc-patches
The following patch is for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104971 The PR was already fixed by Jakub but his patch did not fix a latent LRA bug mentioned in the PR comments.  The current patch fixes the latent bug. The patch was successfully bootstrapped and tested on x86-64 and a

[committed] [PR105032] LRA: modify loop condition to find reload insns for hard reg splitting

2022-03-30 Thread Vladimir Makarov via Gcc-patches
The following patch fixes https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105032 The patch was successfully bootstrapped and tested on x86-64. commit 25de4889c16fec80172a5e2d1825f3ff505d0cc4 Author: Vladimir N. Makarov Date: Wed Mar 30 13:03:44 2022 -0400 [PR105032] LRA: modify loop conditi

Re: [committed] [PR105032] LRA: modify loop condition to find reload insns for hard reg splitting

2022-03-30 Thread Vladimir Makarov via Gcc-patches
On 2022-03-30 15:18, Uros Bizjak wrote: On Wed, Mar 30, 2022 at 7:15 PM Vladimir Makarov via Gcc-patches wrote: The following patch fixes https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105032 The patch was successfully bootstrapped and tested on x86-64. diff --git a/gcc/testsuite/gcc.target

[pushed] [PR103676] LRA: Calculate and exclude some start hard registers for reload pseudos

2022-01-21 Thread Vladimir Makarov via Gcc-patches
The following patch solves https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103676 The patch was successfully bootstrapped and tested on x86_64, aarch64, and ppc64. commit 85419ac59724b7ce710ebb4acf03dbd747edeea3 Author: Vladimir N. Makarov Date: Fri Jan 21 13:34:32 2022 -0500 [PR103676] LR

[committed] [PR104400] LRA: Modify exclude start hard register calculation for insn alternative

2022-02-11 Thread Vladimir Makarov via Gcc-patches
The following patch solves https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104400 The patch was successfully tested and bootstrapped on x86-64 and aarch64. commit 274a4d29421e73c9b40c1641986c6ed904e20184 Author: Vladimir N. Makarov Date: Fri Feb 11 09:52:14 2022 -0500 [PR104400] LRA: Modify

Re: [pushed] LRA, rs6000, Darwin: Amend lo_sum use for forced constants [PR104117].

2022-02-14 Thread Vladimir Makarov via Gcc-patches
On 2022-02-14 04:44, Richard Sandiford via Gcc-patches wrote: Iain Sandoe via Gcc-patches writes: Two issues resulted in this PR, which manifests when we force a constant into memory in LRA (in PIC code on Darwin). The presence of such forced constants is quite dependent on other RTL optimis

Re: [pushed] LRA, rs6000, Darwin: Amend lo_sum use for forced constants [PR104117].

2022-02-14 Thread Vladimir Makarov via Gcc-patches
On 2022-02-14 11:00, Richard Sandiford wrote: Hi Vlad, Vladimir Makarov via Gcc-patches writes: Hi, Richard.  Change LRA is mine and I approved it for Iain's patch. I think there is no need for this code and it is misleading.  If 'mem[low_sum]' does not work, I don&#x

[committed] [PR104447] LRA: Do not split non-alloc hard regs

2022-02-17 Thread Vladimir Makarov via Gcc-patches
The patch solves the following PR: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104447 The patch was successfully bootstrapped and tested on x86-64. commit db69f666a728ce800a840115829f6b64bc3174d2 Author: Vladimir N. Makarov Date: Thu Feb 17 11:31:50 2022 -0500 [PR104447] LRA: Do not sp

Re: [pushed] LRA, rs6000, Darwin: Amend lo_sum use for forced constants [PR104117].

2022-02-22 Thread Vladimir Makarov via Gcc-patches
On 2022-02-20 12:34, Iain Sandoe wrote: ^^^ this is mostly for my education - the stuff below is a potential solution to leaving lra-constraints unchanged and fixing the Darwin bug…. I'd be really glad if you do manage to fix this w/o changing LRA. Richard has a legitimate point that my pro

Re: [PATCH] rtl-optimization/104686 - speed up conflict iteration

2022-02-25 Thread Vladimir Makarov via Gcc-patches
On 2022-02-25 09:14, Richard Biener wrote: The following replaces /* Skip bits that are zero. */ for (; (word & 1) == 0; word >>= 1) bit_num++; idioms in ira-int.h in the attempt to speedup update_conflict_hard_regno_costs which we're bound on in PR104686. The tric

[PR103437] [committed] IRA: Process multiplication overflow in priority calculation for allocno assignments

2021-12-02 Thread Vladimir Makarov via Gcc-patches
The following patch fixes https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103437 The patch was successfully bootstrapped and tested on x86-64. There is no test as the bug occurs on GCC built with sanitizing for an existing go test. commit c6cf5ac1522c54b2ced98fc687e973a9ff17ba1e Author: Vladimir

Re: [PR103437] [committed] IRA: Process multiplication overflow in priority calculation for allocno assignments

2021-12-02 Thread Vladimir Makarov via Gcc-patches
On 2021-12-02 09:00, Jakub Jelinek wrote: On Thu, Dec 02, 2021 at 08:53:31AM -0500, Vladimir Makarov via Gcc-patches wrote: The following patch fixes https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103437 The patch was successfully bootstrapped and tested on x86-64. There is no test as the

Re: [PR103437] [committed] IRA: Process multiplication overflow in priority calculation for allocno assignments

2021-12-02 Thread Vladimir Makarov via Gcc-patches
On 2021-12-02 09:29, Jakub Jelinek wrote: On Thu, Dec 02, 2021 at 09:23:20AM -0500, Vladimir Makarov wrote: On 2021-12-02 09:00, Jakub Jelinek wrote: On Thu, Dec 02, 2021 at 08:53:31AM -0500, Vladimir Makarov via Gcc-patches wrote: The following patch fixes https://gcc.gnu.org/bugzilla

Re: [PR103437] [committed] IRA: Process multiplication overflow in priority calculation for allocno assignments

2021-12-02 Thread Vladimir Makarov via Gcc-patches
On 2021-12-02 10:52, Christophe Lyon wrote: On Thu, Dec 2, 2021 at 3:38 PM Vladimir Makarov via Gcc-patches wrote: On 2021-12-02 09:29, Jakub Jelinek wrote: > On Thu, Dec 02, 2021 at 09:23:20AM -0500, Vladimir Makarov wrote: >> On 2021-12-02 09:00, Jakub Jeli

Re: [PR103437] [committed] IRA: Process multiplication overflow in priority calculation for allocno assignments

2021-12-02 Thread Vladimir Makarov via Gcc-patches
On 2021-12-02 11:13, Jakub Jelinek wrote: On Thu, Dec 02, 2021 at 11:03:46AM -0500, Vladimir Makarov wrote: --- a/gcc/ira-color.c +++ b/gcc/ira-color.c @@ -2797,6 +2797,7 @@ static void setup_allocno_priorities (ira_allocno_t *consideration_allocnos, int n) { int i, length, nrefs, prio

Re: [PR103437] [committed] IRA: Process multiplication overflow in priority calculation for allocno assignments

2021-12-02 Thread Vladimir Makarov via Gcc-patches
On 2021-12-02 12:06, Vladimir Makarov wrote: On 2021-12-02 11:13, Jakub Jelinek wrote: On Thu, Dec 02, 2021 at 11:03:46AM -0500, Vladimir Makarov wrote: --- a/gcc/ira-color.c +++ b/gcc/ira-color.c @@ -2797,6 +2797,7 @@ static void   setup_allocno_priorities (ira_allocno_t *consideration_allo

Re: [PR103437] [committed] IRA: Process multiplication overflow in priority calculation for allocno assignments

2021-12-02 Thread Vladimir Makarov via Gcc-patches
On 2021-12-02 12:21, Vladimir Makarov via Gcc-patches wrote: On 2021-12-02 12:06, Vladimir Makarov wrote: So simple problem and so many details :) This will require that long long is at least twice as large as int everywhere, I thought you wanted to do that only when

Re: [PATCH] IRA: Make sure array is big enough

2022-10-26 Thread Vladimir Makarov via Gcc-patches
On 2022-10-25 06:01, Torbjörn SVENSSON wrote: In commit 081c96621da, the call to resize_reg_info() was moved before the call to remove_scratches() and the latter one can increase the number of regs and that would cause an out of bounds usage on the reg_renumber global array. Without this patch

Re: [PATCH] [PR100106] Reject unaligned subregs when strict alignment is required

2022-05-06 Thread Vladimir Makarov via Gcc-patches
On 2022-05-05 02:52, Alexandre Oliva wrote: Regstrapped on x86_64-linux-gnu and ppc64le-linux-gnu, also tested targeting ppc- and ppc64-vx7r2. Ok to install? I am ok with the modified version of the patch.  It looks reasonable for me and I support its commit. But I think I can not approve

Re: [patch] Fixing ppc64 test failure after patch dealing with scratches in IRA

2020-11-01 Thread Vladimir Makarov via Gcc-patches
On 2020-10-30 7:36 p.m., Segher Boessenkool wrote: Thanks for the patch! But it has a problem: diff --git a/gcc/config/rs6000/vsx.md b/gcc/config/rs6000/vsx.md index 67e4f2fd037..78de85ccbbb 100644 --- a/gcc/config/rs6000/vsx.md +++ b/gcc/config/rs6000/vsx.md @@ -3717,7 +3717,7 @@ (v

Re: [patch] Fixing ppc64 test failure after patch dealing with scratches in IRA

2020-11-02 Thread Vladimir Makarov via Gcc-patches
On 2020-11-02 6:43 a.m., Segher Boessenkool wrote: Hi! On Sun, Nov 01, 2020 at 06:32:02PM -0500, Vladimir Makarov wrote: On 2020-10-30 7:36 p.m., Segher Boessenkool wrote: Thanks for the patch! But it has a problem: diff --git a/gcc/config/rs6000/vsx.md b/gcc/config/rs6000/vsx.md index 67

Re: [PATCH][PR target/97540] Don't extract memory from operand for normal memory constraint.

2020-11-02 Thread Vladimir Makarov via Gcc-patches
On 2020-10-27 2:53 a.m., Hongtao Liu wrote: Hi: For inline asm, there could be an operand like (not (mem:)), it's not a valid operand for normal memory constraint. Bootstrap is ok, regression test is ok for make check RUNTESTFLAGS="--target_board='unix{-m32,}'" gcc/ChangeLog PR

Re: [PATCH][PR target/97532] Fix invalid address for special memory constraint.

2020-11-02 Thread Vladimir Makarov via Gcc-patches
On 2020-10-27 2:52 a.m., Hongtao Liu wrote: Hi: Sorry for Incomplete test for my last patch at https://gcc.gnu.org/pipermail/gcc-patches/2020-October/555948.html. This patch should fix invalid address introduced by special memory constraint. Bootstrap is ok, regression test is ok for

Re: [committed] patch to deal with insn scratches in global RA

2020-11-02 Thread Vladimir Makarov via Gcc-patches
On 2020-11-02 3:12 p.m., Christophe Lyon wrote: Hi, This patch causes ICEs on arm (eg arm-none-linux-gnueabi) gcc.c-torture/compile/sync-3.c -O1 (internal compiler error) gcc.c-torture/compile/sync-3.c -O2 (internal compiler error) gcc.c-torture/compile/sync-3.c -O2 -fl

[committed] patch to fix arm sync-3.c failure after submitting patch to deal with scratches in IRA

2020-11-02 Thread Vladimir Makarov via Gcc-patches
After submitting the patch dealing with insn scratches in IRA, a report came that sync-3.c started to fail with x86_64-aarch64 cross-compiler.  The following patch fixes this problem.  The patch was successfully bootstrapped on x86-64. commit 885cbb4a0a677299de34d9e413818df5bb8272b1 Author: Vl

Re: [committed] patch to deal with insn scratches in global RA

2020-11-02 Thread Vladimir Makarov via Gcc-patches
On 2020-11-02 4:30 p.m., Vladimir Makarov via Gcc-patches wrote: On 2020-11-02 3:12 p.m., Christophe Lyon wrote: Hi, This patch causes ICEs on arm (eg arm-none-linux-gnueabi) gcc.c-torture/compile/sync-3.c   -O1  (internal compiler error) gcc.c-torture/compile/sync-3.c   -O2

Re: [PATCH]ira: recompute regstat as max_regno changes [PR97705]

2020-11-06 Thread Vladimir Makarov via Gcc-patches
On 2020-11-06 1:15 a.m., Kewen.Lin wrote: Hi, As PR97705 shows, my commit r11-4637 caused some dumping comparison difference error on pass ira. It exposed one issue about the newly introduced function remove_scratches, which can increase the largest pseudo reg number if it succeeds, later som

[PATCH] Implementation of asm goto outputs

2020-11-12 Thread Vladimir Makarov via Gcc-patches
  The following patch implements asm goto with outputs.  Kernel developers several times expressed wish to have this feature. Asm goto with outputs was implemented in LLVM recently.  This new feature was presented on 2020 linux plumbers conference (https://linuxplumbersconf.org/event/7/contributio

Re: [PATCH] Implementation of asm goto outputs

2020-11-13 Thread Vladimir Makarov via Gcc-patches
On 2020-11-13 4:00 a.m., Richard Biener wrote: On Thu, Nov 12, 2020 at 8:55 PM Vladimir Makarov via Gcc-patches wrote: The following patch implements asm goto with outputs. Kernel developers several times expressed wish to have this feature. Asm goto with outputs was implemented in LLVM

Re: [PATCH] Implementation of asm goto outputs

2020-11-13 Thread Vladimir Makarov via Gcc-patches
On 2020-11-13 10:51 a.m., Uros Bizjak wrote: diff --git a/gcc/testsuite/gcc.c-torture/compile/asmgoto-4.c b/gcc/testsuite/gcc.c-torture/compile/asmgoto-4.c new file mode 100644 index 000..8685ca2a1cb --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/asmgoto-4.c @@ -0,0 +1,14 @@ +/

[COMMITTED] Implementation of asm goto outputs

2020-11-13 Thread Vladimir Makarov via Gcc-patches
The original patch has been modified according to the reviewers comments and the following patch has been committed. commit e3b3b59683c1e7d31a9d313dd97394abebf644be Author: Vladimir N. Makarov Date: Fri Nov 13 12:45:59 2020 -0500 [PATCH] Implementation of asm goto outputs gcc/

[Committed] patch fixing LRA crash on s390x

2020-11-15 Thread Vladimir Makarov via Gcc-patches
My last patch implementing output reloads in asm goto resulted in LRA crash in compiling kernel on s390x.  Jeff Law reported it recently.  The culprit was in incorrect emitting reload insns in last empty BB.  The emitted insns got null BB which is wrong. Actually in this case we do not need to

[pushed] IRA: Make profitability calculation of RA conflict presentations independent of host compiler type sizes of RA conflict presentations independent of host compiler type sizes [PR102147]

2021-09-24 Thread Vladimir Makarov via Gcc-patches
The following patch solves https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102147 The patch was successfully bootstrapped and tested on x86-64. commit ec4c30b64942e615b4bb4b9761cd3b2635158608 (HEAD -> master) Author: Vladimir N. Makarov Date:   Fri Sep 24 10:06:45 2021 -0400     Make profitabil

Re: [backport gcc10, gcc9] Requet to backport PR97969

2021-05-31 Thread Vladimir Makarov via Gcc-patches
On 2021-05-25 5:14 a.m., Przemyslaw Wirkus wrote: Hi, Just a follow up after GCC 11 release. I've backported to gcc-10 branch (without any change to original patches) PR97969 and following PR98722 & PR98777 patches. Commits apply cleanly without changes. Built and regression tested on: * arm-

[committed] LRA: [PR102627] Use at least natural mode during splitting hard reg live range

2021-10-08 Thread Vladimir Makarov via Gcc-patches
The following patch fixes    https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102627 The patch was successfully bootstrapped and tested on x86-64. commit fab2d977e69539aad9bef81caff17de48e53aedf (HEAD -> master) Author: Vladimir N. Makarov Date: Fri Oct 8 10:16:09 2021 -0400 [PR102627] Use

[committed] [PR102842] LRA: Consider all outputs in generation of matching reloads

2021-10-26 Thread Vladimir Makarov via Gcc-patches
The following patch fixes https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102842 As the patch touches a sensitive LRA code, the patch was bootstrapped tested on x86-64, aarch64, and ppc64. I've committed the patch only in master branch.  Later (after some observation), I'll commit it into gcc-1

Re: [PATCH v4] ira: Support more matching constraint forms with param [PR100328]

2021-07-05 Thread Vladimir Makarov via Gcc-patches
On 2021-07-01 10:11 p.m., Kewen.Lin wrote: Hi Vladimir, on 2021/6/30 下午11:24, Vladimir Makarov wrote: Many thanks for your review! I've updated the patch according to your comments and also polished some comments and document words a bit. Does it look better to you? Sorry for the delay

[committed] [PR90706] IRA: Check that reg classes contain a hard reg of given mode in reg move cost calculation

2022-12-15 Thread Vladimir Makarov via Gcc-patches
The following patch solves a spill problem for   https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90706 There are still redundant moves which should be removed to solve PR. I'll continue my work on this in Jan. commit 12abd5a7d13209f79664ea603b3f3517f71b8c4f Author: Vladimir N. Makarov Date:

Re: [PATCH 01/13] [APX EGPR] middle-end: Add insn argument to base_reg_class

2023-09-06 Thread Vladimir Makarov via Gcc-patches
On 9/1/23 05:07, Hongyu Wang wrote: Uros Bizjak via Gcc-patches 于2023年8月31日周四 18:16写道: On Thu, Aug 31, 2023 at 10:20 AM Hongyu Wang wrote: From: Kong Lingling Current reload infrastructure does not support selective base_reg_class for backend insn. Add insn argument to base_reg_class for

Re: [PATCH 01/13] [APX EGPR] middle-end: Add insn argument to base_reg_class

2023-09-07 Thread Vladimir Makarov via Gcc-patches
On 9/7/23 02:23, Uros Bizjak wrote: On Wed, Sep 6, 2023 at 9:43 PM Vladimir Makarov wrote: On 9/1/23 05:07, Hongyu Wang wrote: I think the approach proposed by Intel developers is better. In some way we already use such approach when we pass memory mode to get the base reg class. Althou

[pushed][PR111225][LRA]: Don't reuse chosen insn alternative with special memory constraint

2023-09-07 Thread Vladimir Makarov via Gcc-patches
The following patch solves https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111225 The patch was successfully bootstrapped and tested on x86-64, aarch64, and ppc64le. commit f7bca44d97ad01b39f9d6e7809df7bf517eeb2fb Author: Vladimir N. Makarov Date: Thu Sep 7 09:59:10 2023 -0400 [LRA]: Don

Re: [PATCH 01/13] [APX EGPR] middle-end: Add insn argument to base_reg_class

2023-09-08 Thread Vladimir Makarov via Gcc-patches
On 8/31/23 04:20, Hongyu Wang wrote: @@ -2542,6 +2542,8 @@ the code of the immediately enclosing expression (@code{MEM} for the top level of an address, @code{ADDRESS} for something that occurs in an @code{address_operand}). @var{index_code} is the code of the corresponding index expres

Re: [PATCH 01/13] [APX EGPR] middle-end: Add insn argument to base_reg_class

2023-09-14 Thread Vladimir Makarov via Gcc-patches
On 9/10/23 00:49, Hongyu Wang wrote: Vladimir Makarov via Gcc-patches 于2023年9月9日周六 01:04写道: On 8/31/23 04:20, Hongyu Wang wrote: @@ -2542,6 +2542,8 @@ the code of the immediately enclosing expression (@code{MEM} for the top level of an address, @code{ADDRESS} for something that occurs

[pushed] [RA]: Improve cost calculation of pseudos with equivalences

2023-09-14 Thread Vladimir Makarov via Gcc-patches
I've committed the following patch.  The reason for this patch is explained in its commit message. The patch was successfully bootstrapped and tested on x86-64, aarch64, and ppc64le. commit 3c834d85f2ec42c60995c2b678196a06cb744959 Author: Vladimir N. Makarov Date: Thu Sep 14 10:26:48 2023

Re: [PATCH] ira: Consider save/restore costs of callee-save registers [PR110071]

2023-09-15 Thread Vladimir Makarov via Gcc-patches
On 9/14/23 06:45, Surya Kumari Jangala wrote: ira: Consider save/restore costs of callee-save registers [PR110071] In improve_allocation() routine, IRA checks for each allocno if spilling any conflicting allocnos can improve the allocation of this allocno. This routine computes the cost improv

Re: [PATCH] ira: Consider save/restore costs of callee-save registers [PR110071]

2023-09-18 Thread Vladimir Makarov via Gcc-patches
On 9/15/23 10:48, Vladimir Makarov wrote: On 9/14/23 06:45, Surya Kumari Jangala wrote: ira: Consider save/restore costs of callee-save registers [PR110071] In improve_allocation() routine, IRA checks for each allocno if spilling any conflicting allocnos can improve the allocation of this al

Re: [PATCH] lra: Canonicalize mult to shift in address reloads

2020-08-25 Thread Vladimir Makarov via Gcc-patches
On 2020-08-25 6:18 a.m., Alex Coplan wrote: The motivation here is to be able to remove several redundant patterns in the AArch64 backend. See the previous thread [1] for context. Testing: * Bootstrapped and regtested on aarch64-none-linux-gnu, x86_64-pc-linux-gnu. * New unit test whic

Re: [PATCH] lra: Canonicalize mult to shift in address reloads

2020-08-26 Thread Vladimir Makarov via Gcc-patches
On 2020-08-26 5:06 a.m., Richard Sandiford wrote: Alex Coplan writes: Minor nit, should be formatted as: static rtx canonicalize_reload_addr (rtx addr) Sorry for missing this.  Alex, it should be fixed anyway. I don't think we should we restrict this to (plus (mult X Y) Z), since addresse

Re: [PATCH] lra: Canonicalize mult to shift in address reloads

2020-08-26 Thread Vladimir Makarov via Gcc-patches
On 2020-08-26 11:15 a.m., Alex Coplan wrote: Thanks for the review, both. Please find a reworked version of the patch attached incorporating Richard's feedback. Testing: * Bootstrap and regtest on aarch64-none-linux-gnu, arm-none-linux-gnueabihf, and x86_64-pc-linux-gnu: no regressions.

Re: [PATCH] lra: Avoid cycling on certain subreg reloads [PR96796]

2020-09-04 Thread Vladimir Makarov via Gcc-patches
Richard, thank you for working on this issue and for as usually detailed explanation of the problem. On 2020-08-28 9:52 a.m., Richard Sandiford wrote: ... The patch is quite aggressive in that it does this for all reload pseudos in all reload instructions. I wondered about reusing the condi

  1   2   >