public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/65511] New: transform_to_exit_first_loop
@ 2015-03-22 10:32 vries at gcc dot gnu.org
  2015-03-22 12:46 ` [Bug tree-optimization/65511] transform_to_exit_first_loop looses edge probabilities vries at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: vries at gcc dot gnu.org @ 2015-03-22 10:32 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65511

            Bug ID: 65511
           Summary: transform_to_exit_first_loop
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: trivial
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: vries at gcc dot gnu.org

before transform_to_exit_first_loop the loop backedge/exit edge probabilities
are 99/1:
...
  if (i.0_21 < n_5(D))
    goto <bb 9>;
  else
    goto <bb 6>;
;;    succ:       9 [99.0%]  (TRUE_VALUE,EXECUTABLE)
;;                6 [1.0%]  (FALSE_VALUE,EXECUTABLE)
...

afterwards, they are 100/0:
...
  # ivtmp_25 = PHI <0(11), ivtmp_23(7)>
  if (ivtmp_25 < _12)
    goto <bb 13>;
  else
    goto <bb 14>;
;;    succ:       13 [100.0%]  (TRUE_VALUE,EXECUTABLE)
;;                14 (FALSE_VALUE,EXECUTABLE)
...


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug tree-optimization/65511] transform_to_exit_first_loop looses edge probabilities
  2015-03-22 10:32 [Bug tree-optimization/65511] New: transform_to_exit_first_loop vries at gcc dot gnu.org
@ 2015-03-22 12:46 ` vries at gcc dot gnu.org
  2015-03-22 12:52 ` vries at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: vries at gcc dot gnu.org @ 2015-03-22 12:46 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65511

--- Comment #2 from vries at gcc dot gnu.org ---
using tentative patch, we get:
...
  if (ivtmp_25 < _12)
    goto <bb 13>;
  else
    goto <bb 14>;
;;    succ:       13 [99.0%]  (TRUE_VALUE,EXECUTABLE)
;;                14 [1.0%]  (FALSE_VALUE,EXECUTABLE)
...


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug tree-optimization/65511] transform_to_exit_first_loop looses edge probabilities
  2015-03-22 10:32 [Bug tree-optimization/65511] New: transform_to_exit_first_loop vries at gcc dot gnu.org
  2015-03-22 12:46 ` [Bug tree-optimization/65511] transform_to_exit_first_loop looses edge probabilities vries at gcc dot gnu.org
@ 2015-03-22 12:52 ` vries at gcc dot gnu.org
  2015-03-31 11:26 ` vries at gcc dot gnu.org
  2015-06-14 14:17 ` vries at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: vries at gcc dot gnu.org @ 2015-03-22 12:52 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65511

--- Comment #3 from vries at gcc dot gnu.org ---
testcase:
...
#define N 1000

unsigned int a[N];
unsigned int b[N];
unsigned int c[N];

void __attribute__((noclone,noinline))
f (unsigned int n)
{
  int i;

#pragma omp parallel
  {
#pragma omp for
    for (i = 0; i < n; ++i)
      c[i] = a[i] + b[i];
  }
}
...

compiled with -O2 -ftree-parallelize-loops=2


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug tree-optimization/65511] transform_to_exit_first_loop looses edge probabilities
  2015-03-22 10:32 [Bug tree-optimization/65511] New: transform_to_exit_first_loop vries at gcc dot gnu.org
  2015-03-22 12:46 ` [Bug tree-optimization/65511] transform_to_exit_first_loop looses edge probabilities vries at gcc dot gnu.org
  2015-03-22 12:52 ` vries at gcc dot gnu.org
@ 2015-03-31 11:26 ` vries at gcc dot gnu.org
  2015-06-14 14:17 ` vries at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: vries at gcc dot gnu.org @ 2015-03-31 11:26 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65511

--- Comment #6 from vries at gcc dot gnu.org ---
bootstrapped and reg-tested:
- https://gcc.gnu.org/ml/gcc-patches/2015-03/msg01536.html
- https://gcc.gnu.org/ml/gcc-patches/2015-03/msg01537.html


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug tree-optimization/65511] transform_to_exit_first_loop looses edge probabilities
  2015-03-22 10:32 [Bug tree-optimization/65511] New: transform_to_exit_first_loop vries at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2015-03-31 11:26 ` vries at gcc dot gnu.org
@ 2015-06-14 14:17 ` vries at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: vries at gcc dot gnu.org @ 2015-06-14 14:17 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65511

--- Comment #7 from vries at gcc dot gnu.org ---
pinged patches at:
- https://gcc.gnu.org/ml/gcc-patches/2015-06/msg00976.html
- https://gcc.gnu.org/ml/gcc-patches/2015-06/msg00977.html


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-06-14 14:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-22 10:32 [Bug tree-optimization/65511] New: transform_to_exit_first_loop vries at gcc dot gnu.org
2015-03-22 12:46 ` [Bug tree-optimization/65511] transform_to_exit_first_loop looses edge probabilities vries at gcc dot gnu.org
2015-03-22 12:52 ` vries at gcc dot gnu.org
2015-03-31 11:26 ` vries at gcc dot gnu.org
2015-06-14 14:17 ` vries at gcc dot gnu.org

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).