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
bce7bfe8
Commit
bce7bfe8
authored
Aug 27, 2001
by
Roman Zippel
Committed by
Richard Henderson
Aug 27, 2001
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* flow.c (verify_flow_info): Use checksums to verify edges.
From-SVN: r45212
parent
ce4a5723
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
24 deletions
+26
-24
gcc/ChangeLog
+4
-0
gcc/flow.c
+22
-24
No files found.
gcc/ChangeLog
View file @
bce7bfe8
2001
-
08
-
27
Roman
Zippel
<
zippel
@linux
-
m68k
.
org
>
*
flow
.
c
(
verify_flow_info
)
:
Use
checksums
to
verify
edges
.
2001
-
08
-
27
Richard
Henderson
<
rth
@redhat
.
com
>
*
genautomata
.
c
(
expand_automata
)
:
Always
create
a
description
.
...
...
gcc/flow.c
View file @
bce7bfe8
...
...
@@ -8340,12 +8340,14 @@ verify_flow_info ()
const
rtx
rtx_first
=
get_insns
();
rtx
last_head
=
get_last_insn
();
basic_block
*
bb_info
,
*
last_visited
;
size_t
*
edge_checksum
;
rtx
x
;
int
i
,
last_bb_num_seen
,
num_bb_notes
,
err
=
0
;
bb_info
=
(
basic_block
*
)
xcalloc
(
max_uid
,
sizeof
(
basic_block
));
last_visited
=
(
basic_block
*
)
xcalloc
(
n_basic_blocks
+
2
,
sizeof
(
basic_block
));
edge_checksum
=
(
size_t
*
)
xcalloc
(
n_basic_blocks
+
2
,
sizeof
(
size_t
));
for
(
i
=
n_basic_blocks
-
1
;
i
>=
0
;
i
--
)
{
...
...
@@ -8396,9 +8398,8 @@ verify_flow_info ()
for
(
i
=
n_basic_blocks
-
1
;
i
>=
0
;
i
--
)
{
basic_block
bb
=
BASIC_BLOCK
(
i
);
/* Check correctness of edge lists. */
edge
e
;
int
has_fallthru
=
0
;
edge
e
;
e
=
bb
->
succ
;
while
(
e
)
...
...
@@ -8447,17 +8448,7 @@ verify_flow_info ()
fprintf
(
stderr
,
"
\n
"
);
err
=
1
;
}
if
(
e
->
dest
!=
EXIT_BLOCK_PTR
)
{
edge
e2
=
e
->
dest
->
pred
;
while
(
e2
&&
e2
!=
e
)
e2
=
e2
->
pred_next
;
if
(
!
e2
)
{
error
(
"Basic block %i edge lists are corrupted"
,
bb
->
index
);
err
=
1
;
}
}
edge_checksum
[
e
->
dest
->
index
+
2
]
+=
(
size_t
)
e
;
e
=
e
->
succ_next
;
}
if
(
!
has_fallthru
)
...
...
@@ -8489,17 +8480,7 @@ verify_flow_info ()
fputc
(
'\n'
,
stderr
);
err
=
1
;
}
if
(
e
->
src
!=
ENTRY_BLOCK_PTR
)
{
edge
e2
=
e
->
src
->
succ
;
while
(
e2
&&
e2
!=
e
)
e2
=
e2
->
succ_next
;
if
(
!
e2
)
{
error
(
"Basic block %i edge lists are corrupted"
,
bb
->
index
);
err
=
1
;
}
}
edge_checksum
[
e
->
dest
->
index
+
2
]
-=
(
size_t
)
e
;
e
=
e
->
pred_next
;
}
...
...
@@ -8556,6 +8537,22 @@ verify_flow_info ()
}
}
/* Complete edge checksumming for ENTRY and EXIT. */
{
edge
e
;
for
(
e
=
ENTRY_BLOCK_PTR
->
succ
;
e
;
e
=
e
->
succ_next
)
edge_checksum
[
e
->
dest
->
index
+
2
]
+=
(
size_t
)
e
;
for
(
e
=
EXIT_BLOCK_PTR
->
pred
;
e
;
e
=
e
->
pred_next
)
edge_checksum
[
e
->
dest
->
index
+
2
]
-=
(
size_t
)
e
;
}
for
(
i
=
-
2
;
i
<
n_basic_blocks
;
++
i
)
if
(
edge_checksum
[
i
+
2
])
{
error
(
"Basic block %i edge lists are corrupted"
,
i
);
err
=
1
;
}
last_bb_num_seen
=
-
1
;
num_bb_notes
=
0
;
x
=
rtx_first
;
...
...
@@ -8617,6 +8614,7 @@ verify_flow_info ()
/* Clean up. */
free
(
bb_info
);
free
(
last_visited
);
free
(
edge_checksum
);
}
/* Functions to access an edge list with a vector representation.
...
...
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