Commit 63dfe6ff by Dorit Naishlos Committed by Dorit Nuzman

re PR tree-optimization/18181 (vectorizer: problem in the peeling mechanism in…

re PR tree-optimization/18181 (vectorizer: problem in the peeling mechanism in the presence of loop invariants that are used after the loop)

        PR tree-opt/18181
        * tree-vectorizer.c (slpeel_tree_peel_loop_to_edge): Peeling scheme
        changed to suppoer uses-after-loop and to void creating flow paths
        that shouldn't exist.
        (slpeel_update_phi_nodes_for_guard): Takes additional two arguments.
        Modified to fit the new peeling scheme. Avoid quadratic behavior.
        (slpeel_add_loop_guard): Takes additional argument.
        (slpeel_verify_cfg_after_peeling): New function.
        (vect_update_ivs_after_vectorizer): Takes additional argument. Updated
        documentation. Use 'exit-bb' instead of creating 'new-bb'.
        (rename_variables_in_bb): Don't update phis for BBs out of loop, to fit
        the new peeling scheme.
        (copy_phi_nodes): Function removed. Its functionality moved to
        update_phis_for_duplicate_loop.
        (slpeel_update_phis_for_duplicate_loop): Functionality of copy_phi_nodes
        moved here. Added documentation. Modified to fit the new peeling scheme.
        (slpeel_make_loop_iterate_ntimes): Setting loop->single_exit not not
        needed - done in slpeel_tree_peel_loop_to_edge.
        (slpeel_tree_duplicate_loop_to_edge_cfg): Debug printouts compacted.
        (vect_do_peeling_for_loop_bound): Add documentation. Call
        slpeel_verify_cfg_after_peeling. Call vect_update_ivs_after_vectorizer
        with additional argument.
        (vect_do_peeling_for_alignment): Call slpeel_verify_cfg_after_peeling.

        (vect_finish_stmt_generation): Avoid 80 column oveflow.

From-SVN: r90932
parent 335d3d54
2004-11-19 Dorit Naishlos <dorit@il.ibm.com>
PR tree-opt/18181
* tree-vectorizer.c (slpeel_tree_peel_loop_to_edge): Peeling scheme
changed to suppoer uses-after-loop and to void creating flow paths
that shouldn't exist.
(slpeel_update_phi_nodes_for_guard): Takes additional two arguments.
Modified to fit the new peeling scheme. Avoid quadratic behavior.
(slpeel_add_loop_guard): Takes additional argument.
(slpeel_verify_cfg_after_peeling): New function.
(vect_update_ivs_after_vectorizer): Takes additional argument. Updated
documentation. Use 'exit-bb' instead of creating 'new-bb'.
(rename_variables_in_bb): Don't update phis for BBs out of loop, to fit
the new peeling scheme.
(copy_phi_nodes): Function removed. Its functionality moved to
update_phis_for_duplicate_loop.
(slpeel_update_phis_for_duplicate_loop): Functionality of copy_phi_nodes
moved here. Added documentation. Modified to fit the new peeling scheme.
(slpeel_make_loop_iterate_ntimes): Setting loop->single_exit not not
needed - done in slpeel_tree_peel_loop_to_edge.
(slpeel_tree_duplicate_loop_to_edge_cfg): Debug printouts compacted.
(vect_do_peeling_for_loop_bound): Add documentation. Call
slpeel_verify_cfg_after_peeling. Call vect_update_ivs_after_vectorizer
with additional argument.
(vect_do_peeling_for_alignment): Call slpeel_verify_cfg_after_peeling.
(vect_finish_stmt_generation): Avoid 80 column oveflow.
2004-11-19 Dorit Naishlos <dorit@il.ibm.com>
* tree-vectorizer.c (slpeel_make_loop_iterate_ntimes): Last two
arguments removed.
(slpeel_tree_peel_loop_to_edge): Call slpeel_make_loop_iterate_ntimes
......
2004-11-19 Dorit Naishlos <dorit@il.ibm.com>
PR tree-opt/18181
* gcc.dg/vect/vect-85.c: New test.
* gcc.dg/vect/vect-86.c: New test.
* gcc.dg/vect/vect-87.c: New test.
* gcc.dg/vect/vect-88.c: New test.
2004-11-19 Ben Elliston <bje@au.ibm.com>
* gcc.dg/pr16286.c: Test __pixel and __bool keywords.
......
/* { dg-require-effective-target vect_int } */
#include <stdarg.h>
#include "tree-vect.h"
#define N 16
typedef int aint __attribute__ ((__aligned__(16)));
int main1 (int *a)
{
int i, j, k;
int b[N];
for (i = 0; i < N; i++)
{
for (j = 0; j < N; j++)
{
k = i + N;
a[j] = k;
}
b[i] = k;
}
for (j = 0; j < N; j++)
if (a[j] != i + N - 1)
abort();
for (j = 0; j < N; j++)
if (b[j] != j + N)
abort();
return 0;
}
int main (void)
{
aint a[N];
check_vect ();
main1 (a);
return 0;
}
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail *-*-* } } } */
/* { dg-require-effective-target vect_int } */
#include <stdarg.h>
#include "tree-vect.h"
#define N 16
int main1 (int n)
{
int i, j, k;
int a[N], b[N];
for (i = 0; i < n; i++)
{
for (j = 0; j < n; j++)
{
k = i + n;
a[j] = k;
}
b[i] = k;
}
for (j = 0; j < n; j++)
if (a[j] != i + n - 1)
abort();
for (i = 0; i < n; i++)
if (b[i] != i + n)
abort();
return 0;
}
int main (void)
{
check_vect ();
main1 (N);
main1 (0);
main1 (1);
main1 (2);
main1 (N-1);
return 0;
}
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
/* { dg-require-effective-target vect_int } */
#include <stdarg.h>
#include "tree-vect.h"
#define N 16
typedef int aint __attribute__ ((__aligned__(16)));
int main1 (int n, int *a)
{
int i, j, k;
int b[N];
for (i = 0; i < n; i++)
{
for (j = 0; j < n; j++)
{
k = i + n;
a[j] = k;
}
b[i] = k;
}
for (j = 0; j < n; j++)
if (a[j] != i + n - 1)
abort();
for (j = 0; j < n; j++)
if (b[j] != j + n)
abort();
return 0;
}
int main (void)
{
aint a[N];
check_vect ();
main1 (N, a);
main1 (0, a);
main1 (1, a);
main1 (2, a);
main1 (N-1, a);
return 0;
}
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
/* { dg-require-effective-target vect_int } */
#include <stdarg.h>
#include "tree-vect.h"
#define N 16
typedef int aint __attribute__ ((__aligned__(16)));
int main1 (int n, int *a)
{
int i, j, k;
int b[N];
for (i = 0; i < n; i++)
{
for (j = 0; j < n; j++)
{
k = i + n;
a[j] = k;
}
b[i] = k;
}
for (j = 0; j < n; j++)
if (a[j] != i + n - 1)
abort();
for (j = 0; j < n; j++)
if (b[j] != j + n)
abort();
return 0;
}
int main (void)
{
aint a[N+1];
check_vect ();
main1 (N, a+1);
main1 (0, a+1);
main1 (1, a+1);
main1 (2, a+1);
main1 (N-1, a+1);
return 0;
}
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment