[PATCH: PR/40416] stop sinking expression if the target bb post dominates from bb

Daniel Berlin dannyb@google.com
Tue Jun 16 13:16:00 GMT 2009


On Tue, Jun 16, 2009 at 4:58 AM, Carrot Wei<carrot@google.com> wrote:
> Hi
>
> This patch is to fix the bug
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40416
>
> If the target bb post dominates from bb and we move the expression to target
> bb, it can't be executed less frequently. So we can't get any benefit from it.
>
> ChangeLog:
> 2009-06-16  Carrot Wei  <carrot@google.com>
>
>        PR/40416
>        * tree-ssa-sink.c: add code to stop sinking expression if the target
>        bb post dominates from bb.
>
> Test:
> x86 bootstrap.
> Gcc regression tests for x86.
> One new ICE testsuite/gcc.dg/pr35065.c. It is occurred in a very late rtl pass
> machine_reorg with an invalid x86 address expression. It should be caused by
> an unknown bug in rtl passes.
>

Two quick things:
1. You have to fix the bug it exposes, sadly.
You are welcome to ask for help if you can't figure it out and need assistance.
2. Can you please add the small testcase you had as ssa-sink-5.c?
If you aren't familiar with how the testsuite works, you should just
be able to copy the lines that appear in
testsuite/gcc.dg/tree-ssa/ssa-sink-1.c and change it from Sunk
Statements: 1 to Sunk Statements: 0.


Otherwise, looks good!



More information about the Gcc-patches mailing list