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
4f6843aa
Commit
4f6843aa
authored
Dec 04, 2013
by
Xinliang David Li
Committed by
Xinliang David Li
Dec 04, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update changed bit when constraint set changes
From-SVN: r205677
parent
d80608d0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
8 deletions
+28
-8
gcc/ChangeLog
+7
-0
gcc/tree-ssa-structalias.c
+21
-8
No files found.
gcc/ChangeLog
View file @
4f6843aa
2013
-
12
-
03
Xinliang
David
Li
<
davidxl
@
google
.
com
>
*
tree
-
ssa
-
structalias
.
c
(
constraint_set_union
):
Change
return
type
from
void
to
bool
.
(
merge_node_constraints
):
Ditto
.
(
unify_nodes
):
Update
changed
set
when
constraints
set
changes
.
2013
-
12
-
04
H
.
J
.
Lu
<
hongjiu
.
lu
@
intel
.
com
>
2013
-
12
-
04
H
.
J
.
Lu
<
hongjiu
.
lu
@
intel
.
com
>
*
configure
.
ac
:
Append
gdbasan
.
in
to
.
gdbinit
if
CFLAGS
contains
*
configure
.
ac
:
Append
gdbasan
.
in
to
.
gdbinit
if
CFLAGS
contains
gcc/tree-ssa-structalias.c
View file @
4f6843aa
...
@@ -892,14 +892,16 @@ constraint_vec_find (vec<constraint_t> vec,
...
@@ -892,14 +892,16 @@ constraint_vec_find (vec<constraint_t> vec,
return
found
;
return
found
;
}
}
/* Union two constraint vectors, TO and FROM. Put the result in TO. */
/* Union two constraint vectors, TO and FROM. Put the result in TO.
Returns true of TO set is changed. */
static
void
static
bool
constraint_set_union
(
vec
<
constraint_t
>
*
to
,
constraint_set_union
(
vec
<
constraint_t
>
*
to
,
vec
<
constraint_t
>
*
from
)
vec
<
constraint_t
>
*
from
)
{
{
int
i
;
int
i
;
constraint_t
c
;
constraint_t
c
;
bool
any_change
=
false
;
FOR_EACH_VEC_ELT
(
*
from
,
i
,
c
)
FOR_EACH_VEC_ELT
(
*
from
,
i
,
c
)
{
{
...
@@ -907,8 +909,10 @@ constraint_set_union (vec<constraint_t> *to,
...
@@ -907,8 +909,10 @@ constraint_set_union (vec<constraint_t> *to,
{
{
unsigned
int
place
=
to
->
lower_bound
(
c
,
constraint_less
);
unsigned
int
place
=
to
->
lower_bound
(
c
,
constraint_less
);
to
->
safe_insert
(
place
,
c
);
to
->
safe_insert
(
place
,
c
);
any_change
=
true
;
}
}
}
}
return
any_change
;
}
}
/* Expands the solution in SET to all sub-fields of variables included. */
/* Expands the solution in SET to all sub-fields of variables included. */
...
@@ -1028,22 +1032,24 @@ insert_into_complex (constraint_graph_t graph,
...
@@ -1028,22 +1032,24 @@ insert_into_complex (constraint_graph_t graph,
/* Condense two variable nodes into a single variable node, by moving
/* Condense two variable nodes into a single variable node, by moving
all associated info from SRC to TO. */
all associated info from FROM to TO. Returns true if TO node's
constraint set changes after the merge. */
static
void
static
bool
merge_node_constraints
(
constraint_graph_t
graph
,
unsigned
int
to
,
merge_node_constraints
(
constraint_graph_t
graph
,
unsigned
int
to
,
unsigned
int
from
)
unsigned
int
from
)
{
{
unsigned
int
i
;
unsigned
int
i
;
constraint_t
c
;
constraint_t
c
;
bool
any_change
=
false
;
gcc_checking_assert
(
find
(
from
)
==
to
);
gcc_checking_assert
(
find
(
from
)
==
to
);
/* Move all complex constraints from src node into to node */
/* Move all complex constraints from src node into to node */
FOR_EACH_VEC_ELT
(
graph
->
complex
[
from
],
i
,
c
)
FOR_EACH_VEC_ELT
(
graph
->
complex
[
from
],
i
,
c
)
{
{
/* In complex constraints for node
src
, we may have either
/* In complex constraints for node
FROM
, we may have either
a = *
src, and *src
= a, or an offseted constraint which are
a = *
FROM, and *FROM
= a, or an offseted constraint which are
always added to the rhs node's constraints. */
always added to the rhs node's constraints. */
if
(
c
->
rhs
.
type
==
DEREF
)
if
(
c
->
rhs
.
type
==
DEREF
)
...
@@ -1052,9 +1058,12 @@ merge_node_constraints (constraint_graph_t graph, unsigned int to,
...
@@ -1052,9 +1058,12 @@ merge_node_constraints (constraint_graph_t graph, unsigned int to,
c
->
lhs
.
var
=
to
;
c
->
lhs
.
var
=
to
;
else
else
c
->
rhs
.
var
=
to
;
c
->
rhs
.
var
=
to
;
}
}
constraint_set_union
(
&
graph
->
complex
[
to
],
&
graph
->
complex
[
from
]);
any_change
=
constraint_set_union
(
&
graph
->
complex
[
to
],
&
graph
->
complex
[
from
]);
graph
->
complex
[
from
].
release
();
graph
->
complex
[
from
].
release
();
return
any_change
;
}
}
...
@@ -1472,7 +1481,11 @@ unify_nodes (constraint_graph_t graph, unsigned int to, unsigned int from,
...
@@ -1472,7 +1481,11 @@ unify_nodes (constraint_graph_t graph, unsigned int to, unsigned int from,
stats
.
unified_vars_static
++
;
stats
.
unified_vars_static
++
;
merge_graph_nodes
(
graph
,
to
,
from
);
merge_graph_nodes
(
graph
,
to
,
from
);
merge_node_constraints
(
graph
,
to
,
from
);
if
(
merge_node_constraints
(
graph
,
to
,
from
))
{
if
(
update_changed
)
bitmap_set_bit
(
changed
,
to
);
}
/* Mark TO as changed if FROM was changed. If TO was already marked
/* Mark TO as changed if FROM was changed. If TO was already marked
as changed, decrease the changed count. */
as changed, decrease the changed count. */
...
...
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