public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Maxim Kuvyrkov <maxim@codesourcery.com>
To: Paolo Bonzini <bonzini@gnu.org>
Cc: Jeff Law <law@redhat.com>,
	Steven Bosscher <stevenb.gcc@gmail.com>,
	 gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: 0005-Search-all-dominated-blocks-for-expressions-to-hoist.patch
Date: Wed, 23 Jun 2010 20:30:00 -0000	[thread overview]
Message-ID: <4C226618.9000409@codesourcery.com> (raw)
In-Reply-To: <4C225E7C.8080609@gnu.org>

On 6/23/10 11:20 PM, Paolo Bonzini wrote:
> On 06/23/2010 09:08 PM, Maxim Kuvyrkov wrote:
>> On 6/22/10 4:24 PM, Maxim Kuvyrkov wrote:
>>> On 6/22/10 12:18 AM, Jeff Law wrote:
>>>> On 06/21/10 13:28, Steven Bosscher wrote:
>>>>>
>>>>> I experimented with a patch similar to Maxim's already 2.5 years ago
>>>>> (and offered to work on it for CS, but there was no interest in this
>>>>> work at the time :-/) See these three Bugzilla comments:
>>>>>
>>>>> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33828#c2
>>>> Right. This is precisely the problem with using immediate dominators.
>>>> This doesn't argue that Maxim's approach is wrong or bad for compile
>>>> time performance or anything like that. It merely raises the same
>>>> issue.
>>>
>>> I agree with Steven that the search is better be constrained, possibly,
>>> with a large enough constant. I've added a new parameter and a
>>> dominance.c function to return dominated blocks up to depth N in the
>>> dominator tree (with N==1 being immediate dominators and N==0 being all
>>> dominators).
>>
>> The attached patch adds max-hoist-depth parameter to control depth of
>> descend in dominator tree. The default value of 30 should be enough for
>> most practical purposes.
>
> 30 seems like "infinite" for most practical cases.

Exactly.  The purpose of the parameter is to avoid quadratic behavior on 
weird CFGs.  For normal graphs code hoisting should traverse the whole 
structure.

The problem of excessive code hoisting that arises when looking for 
expressions in the whole dominator subtree [instead of just immediately 
dominated blocks] will be addressed in another patch I'm about to post. 
  The the GCSE-complex-constants thread.

Thanks,

-- 
Maxim Kuvyrkov
CodeSourcery
maxim@codesourcery.com
(650) 331-3385 x724

  reply	other threads:[~2010-06-23 19:53 UTC|newest]

Thread overview: 94+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-16 15:57 Improvements to code hoisting Maxim Kuvyrkov
2010-06-16 15:58 ` 0001-Add-hoist_insn-debug-counter.patch Maxim Kuvyrkov
2010-06-16 16:34   ` 0001-Add-hoist_insn-debug-counter.patch Jeff Law
2010-06-16 15:59 ` 0002-Allow-constant-MEMs-through-calls.patch Maxim Kuvyrkov
2010-06-16 16:52   ` 0002-Allow-constant-MEMs-through-calls.patch Jeff Law
2010-06-16 16:03 ` 0003-Improve-VBEout-computation.patch Maxim Kuvyrkov
2010-06-16 17:19   ` 0003-Improve-VBEout-computation.patch Paolo Bonzini
2010-06-16 17:23     ` 0003-Improve-VBEout-computation.patch Maxim Kuvyrkov
2010-06-16 17:32       ` 0003-Improve-VBEout-computation.patch Paolo Bonzini
2010-06-16 17:50         ` 0003-Improve-VBEout-computation.patch Maxim Kuvyrkov
2010-06-16 19:10           ` 0003-Improve-VBEout-computation.patch Paolo Bonzini
2010-06-16 19:25             ` 0003-Improve-VBEout-computation.patch Maxim Kuvyrkov
2010-06-16 19:31               ` 0003-Improve-VBEout-computation.patch Paolo Bonzini
2010-06-21 18:46                 ` 0003-Improve-VBEout-computation.patch Jeff Law
2010-06-21 18:58       ` 0003-Improve-VBEout-computation.patch Jeff Law
2010-06-21 19:00   ` 0003-Improve-VBEout-computation.patch Jeff Law
2010-06-22 12:30     ` 0003-Improve-VBEout-computation.patch Maxim Kuvyrkov
2010-06-23 19:25       ` 0003-Improve-VBEout-computation.patch Maxim Kuvyrkov
2010-06-29 19:08         ` 0003-Improve-VBEout-computation.patch Maxim Kuvyrkov
2010-06-30 17:14           ` 0003-Improve-VBEout-computation.patch Jeff Law
2010-06-16 16:20 ` 0005-Search-all-dominated-blocks-for-expressions-to-hoist.patch Maxim Kuvyrkov
2010-06-16 16:43   ` 0005-Search-all-dominated-blocks-for-expressions-to-hoist.patch Steven Bosscher
2010-06-21 19:45     ` 0005-Search-all-dominated-blocks-for-expressions-to-hoist.patch Jeff Law
2010-06-21 20:27       ` 0005-Search-all-dominated-blocks-for-expressions-to-hoist.patch Steven Bosscher
2010-06-21 21:35         ` 0005-Search-all-dominated-blocks-for-expressions-to-hoist.patch Jeff Law
2010-06-21 21:50           ` 0005-Search-all-dominated-blocks-for-expressions-to-hoist.patch Steven Bosscher
2010-06-21 22:21             ` 0005-Search-all-dominated-blocks-for-expressions-to-hoist.patch Jeff Law
2010-06-21 22:26               ` 0005-Search-all-dominated-blocks-for-expressions-to-hoist.patch Steven Bosscher
2010-06-22 15:17                 ` 0005-Search-all-dominated-blocks-for-expressions-to-hoist.patch Paolo Bonzini
2010-06-22 12:42           ` 0005-Search-all-dominated-blocks-for-expressions-to-hoist.patch Maxim Kuvyrkov
2010-06-23 19:50             ` 0005-Search-all-dominated-blocks-for-expressions-to-hoist.patch Maxim Kuvyrkov
2010-06-23 20:06               ` 0005-Search-all-dominated-blocks-for-expressions-to-hoist.patch Paolo Bonzini
2010-06-23 20:30                 ` Maxim Kuvyrkov [this message]
2010-06-23 21:23                   ` 0005-Search-all-dominated-blocks-for-expressions-to-hoist.patch Steven Bosscher
2010-06-23 21:30                     ` 0005-Search-all-dominated-blocks-for-expressions-to-hoist.patch Maxim Kuvyrkov
2010-06-24 17:11               ` 0005-Search-all-dominated-blocks-for-expressions-to-hoist.patch Maxim Kuvyrkov
2010-06-29 19:12                 ` 0005-Search-all-dominated-blocks-for-expressions-to-hoist.patch Maxim Kuvyrkov
2010-06-30  1:43                   ` 0005-Search-all-dominated-blocks-for-expressions-to-hoist.patch Steven Bosscher
2010-06-30  9:39                     ` 0005-Search-all-dominated-blocks-for-expressions-to-hoist.patch Maxim Kuvyrkov
2010-06-30 12:14                       ` 0005-Search-all-dominated-blocks-for-expressions-to-hoist.patch Steven Bosscher
2010-06-30 16:41                     ` 0005-Search-all-dominated-blocks-for-expressions-to-hoist.patch Jeff Law
2010-06-30 16:42                       ` 0005-Search-all-dominated-blocks-for-expressions-to-hoist.patch Steven Bosscher
2010-06-30 16:48                         ` 0005-Search-all-dominated-blocks-for-expressions-to-hoist.patch Jeff Law
2010-06-30 16:33                   ` 0005-Search-all-dominated-blocks-for-expressions-to-hoist.patch Jeff Law
2010-06-30 18:46                 ` 0005-Search-all-dominated-blocks-for-expressions-to-hoist.patch Jeff Law
2010-06-30 20:53                   ` 0005-Search-all-dominated-blocks-for-expressions-to-hoist.patch Maxim Kuvyrkov
2010-07-01 16:54                     ` 0005-Search-all-dominated-blocks-for-expressions-to-hoist.patch Jeff Law
2010-07-02 16:08                       ` 0005-Search-all-dominated-blocks-for-expressions-to-hoist.patch Maxim Kuvyrkov
2010-07-07 16:56                         ` 0005-Search-all-dominated-blocks-for-expressions-to-hoist.patch Jeff Law
2010-07-09 20:18                           ` 0005-Search-all-dominated-blocks-for-expressions-to-hoist.patch Maxim Kuvyrkov
2010-07-14 20:58                             ` 0005-Search-all-dominated-blocks-for-expressions-to-hoist.patch Jeff Law
2010-07-14 21:42                               ` 0005-Search-all-dominated-blocks-for-expressions-to-hoist.patch Maxim Kuvyrkov
2010-07-15 16:06                                 ` 0005-Search-all-dominated-blocks-for-expressions-to-hoist.patch Jeff Law
2010-07-15 19:22                                   ` 0005-Search-all-dominated-blocks-for-expressions-to-hoist.patch Maxim Kuvyrkov
2010-07-16 18:37                                     ` 0005-Search-all-dominated-blocks-for-expressions-to-hoist.patch Jeff Law
2010-07-17 16:41                                       ` 0005-Search-all-dominated-blocks-for-expressions-to-hoist.patch Maxim Kuvyrkov
2010-07-19 18:08                                         ` 0005-Search-all-dominated-blocks-for-expressions-to-hoist.patch Jeff Law
2010-07-19 18:39                                           ` 0005-Search-all-dominated-blocks-for-expressions-to-hoist.patch Maxim Kuvyrkov
2010-07-23  8:36                                             ` 0005-Search-all-dominated-blocks-for-expressions-to-hoist.patch Maxim Kuvyrkov
2010-07-27 18:41                                             ` 0005-Search-all-dominated-blocks-for-expressions-to-hoist.patch Jeff Law
2010-07-27 19:02                                               ` 0005-Search-all-dominated-blocks-for-expressions-to-hoist.patch Maxim Kuvyrkov
2010-06-29 19:22       ` 0005-Search-all-dominated-blocks-for-expressions-to-hoist.patch Maxim Kuvyrkov
2010-06-16 16:20 ` 0004-Set-pseudos-only-once.patch Maxim Kuvyrkov
2010-06-21 18:22   ` 0004-Set-pseudos-only-once.patch Jeff Law
2010-06-22 12:34     ` 0004-Set-pseudos-only-once.patch Maxim Kuvyrkov
2010-06-23 22:01       ` 0004-Set-pseudos-only-once.patch Jeff Law
2010-06-16 16:23 ` 0006-GCSE-complex-constants.patch Maxim Kuvyrkov
2010-06-16 17:18   ` 0006-GCSE-complex-constants.patch Jeff Law
2010-06-23 20:39     ` 0006-GCSE-complex-constants.patch Maxim Kuvyrkov
     [not found]       ` <4C2BBEB5.4080209@codesourcery.com>
2010-07-01 17:01         ` 0006-GCSE-complex-constants.patch Jeff Law
2010-06-16 16:25 ` 0007-Add-open-ended-comments.patch Maxim Kuvyrkov
2010-06-16 17:46   ` 0007-Add-open-ended-comments.patch Jeff Law
2010-06-23 20:45     ` 0007-Add-open-ended-comments.patch Maxim Kuvyrkov
2010-06-16 16:54 ` Improvements to code hoisting Richard Guenther
2010-07-01  9:00   ` Maxim Kuvyrkov
2010-06-23 20:42 ` Update compute_transpout Maxim Kuvyrkov
2010-06-23 21:57   ` Jeff Law
2010-06-23 21:20 ` ARM improvements for GCSE Maxim Kuvyrkov
2010-06-23 21:22   ` Maxim Kuvyrkov
2010-06-24 11:24     ` Richard Earnshaw
2010-06-23 21:30   ` Fix thumb1 size cost of small constants Maxim Kuvyrkov
2010-06-24 11:28     ` Richard Earnshaw
2010-06-23 21:35   ` Wrap calculation of PIC address into a single instruction Maxim Kuvyrkov
2010-06-23 21:38     ` Andrew Pinski
2010-06-23 21:41     ` Steven Bosscher
2010-06-23 22:23       ` Maxim Kuvyrkov
2010-06-24 11:56         ` Maxim Kuvyrkov
2010-06-29 19:18           ` Maxim Kuvyrkov
2010-07-01 12:40     ` Richard Earnshaw
2010-07-17 16:52   ` Tune hoisting for ARM Maxim Kuvyrkov
2010-07-19  8:09     ` Richard Earnshaw
2010-07-01 11:05 ` 0008-Don-t-kill-generated-expressions-in-hoist_expr_reach Maxim Kuvyrkov
2010-07-01 14:26   ` 0008-Don-t-kill-generated-expressions-in-hoist_expr_reach Jeff Law
2010-07-27 21:21 ` Improvements to code hoisting Maxim Kuvyrkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4C226618.9000409@codesourcery.com \
    --to=maxim@codesourcery.com \
    --cc=bonzini@gnu.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=law@redhat.com \
    --cc=stevenb.gcc@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).