Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
021a93e3
Commit
021a93e3
authored
Feb 22, 2007
by
Ira Rosen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* tree-data-ref.c (ptr_ptr_may_alias_p): Take alias sets into account.
From-SVN: r122226
parent
8fca6de5
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
96 additions
and
1 deletions
+96
-1
gcc/ChangeLog
+5
-0
gcc/testsuite/ChangeLog
+4
-0
gcc/testsuite/gcc.dg/vect/vect-106.c
+73
-0
gcc/tree-data-ref.c
+14
-1
No files found.
gcc/ChangeLog
View file @
021a93e3
2007-02-22 Zdenek Dvorak <dvorakz@suse.cz>
Ira Rosen <irar@il.ibm.com>
* tree-data-ref.c (ptr_ptr_may_alias_p): Take alias sets into account.
2007-02-22 Ira Rosen <irar@il.ibm.com>
PR tree-optimization/30843
...
...
gcc/testsuite/ChangeLog
View file @
021a93e3
2007
-
02
-
22
Ira
Rosen
<
irar
@il
.
ibm
.
com
>
*
gcc
.
dg
/
vect
/
vect
-
106
.
c
:
New
test
.
2007
-
02
-
22
Dorit
Nuzman
<
dorit
@il
.
ibm
.
com
>
Ira
Rosen
<
irar
@il
.
ibm
.
com
>
gcc/testsuite/gcc.dg/vect/vect-106.c
0 → 100755
View file @
021a93e3
/* { dg-require-effective-target vect_int } */
#include <stdlib.h>
#include <stdarg.h>
#include "tree-vect.h"
#define N 9
static
int
a
[
N
]
=
{
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
};
static
int
b
[
N
]
=
{
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
,
0
};
int
main1
()
{
int
i
;
int
*
p
,
*
q
,
*
p1
,
*
q1
;
p
=
(
unsigned
int
*
)
malloc
(
sizeof
(
unsigned
int
)
*
N
);
q
=
(
unsigned
int
*
)
malloc
(
sizeof
(
unsigned
int
)
*
N
);
p1
=
p
;
q1
=
q
;
/* Not vectorizable: because of the redundant cast (caused by ponter
arithmetics), alias analysis fails to distinguish between
the pointers. */
for
(
i
=
0
;
i
<
N
;
i
++
)
{
*
(
q
+
i
)
=
a
[
i
];
*
(
p
+
i
)
=
b
[
i
];
}
/* check results: */
for
(
i
=
0
;
i
<
N
;
i
++
)
{
if
(
*
q
!=
a
[
i
]
||
*
p
!=
b
[
i
])
abort
();
q
++
;
p
++
;
}
q
=
q1
;
p
=
p1
;
/* Vectorizable. */
for
(
i
=
0
;
i
<
N
;
i
++
)
{
*
q
=
b
[
i
];
*
p
=
a
[
i
];
q
++
;
p
++
;
}
q
=
q1
;
p
=
p1
;
/* check results: */
for
(
i
=
0
;
i
<
N
;
i
++
)
{
if
(
*
q
!=
b
[
i
]
||
*
p
!=
a
[
i
])
abort
();
q
++
;
p
++
;
}
return
0
;
}
int
main
(
void
)
{
check_vect
();
return
main1
();
}
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
/* { dg-final { scan-tree-dump-times "can't determine dependence" 1 "vect" } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
gcc/tree-data-ref.c
View file @
021a93e3
...
...
@@ -172,6 +172,7 @@ ptr_ptr_may_alias_p (tree ptr_a, tree ptr_b,
tree
tag_a
=
NULL_TREE
,
tag_b
=
NULL_TREE
;
struct
ptr_info_def
*
pi_a
=
DR_PTR_INFO
(
dra
);
struct
ptr_info_def
*
pi_b
=
DR_PTR_INFO
(
drb
);
bitmap
bal1
,
bal2
;
if
(
pi_a
&&
pi_a
->
name_mem_tag
&&
pi_b
&&
pi_b
->
name_mem_tag
)
{
...
...
@@ -192,7 +193,19 @@ ptr_ptr_may_alias_p (tree ptr_a, tree ptr_b,
if
(
!
tag_b
)
return
false
;
}
*
aliased
=
(
tag_a
==
tag_b
);
bal1
=
BITMAP_ALLOC
(
NULL
);
bitmap_set_bit
(
bal1
,
DECL_UID
(
tag_a
));
if
(
MTAG_P
(
tag_a
)
&&
MTAG_ALIASES
(
tag_a
))
bitmap_ior_into
(
bal1
,
MTAG_ALIASES
(
tag_a
));
bal2
=
BITMAP_ALLOC
(
NULL
);
bitmap_set_bit
(
bal2
,
DECL_UID
(
tag_b
));
if
(
MTAG_P
(
tag_b
)
&&
MTAG_ALIASES
(
tag_b
))
bitmap_ior_into
(
bal2
,
MTAG_ALIASES
(
tag_b
));
*
aliased
=
bitmap_intersect_p
(
bal1
,
bal2
);
BITMAP_FREE
(
bal1
);
BITMAP_FREE
(
bal2
);
return
true
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment