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
f06cafdf
Commit
f06cafdf
authored
Jun 04, 2002
by
Tom Tromey
Committed by
Tom Tromey
Jun 04, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* jcf-write.c (perform_relocations): Optmize a goto to a goto.
From-SVN: r54264
parent
0bb5f0e4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
0 deletions
+35
-0
gcc/java/ChangeLog
+4
-0
gcc/java/jcf-write.c
+31
-0
No files found.
gcc/java/ChangeLog
View file @
f06cafdf
2002-06-04 Tom Tromey <tromey@redhat.com>
* jcf-write.c (perform_relocations): Optmize a goto to a goto.
2002-06-04 Michael Koch <konqueror@gmx.de>
2002-06-04 Michael Koch <konqueror@gmx.de>
* gcj.texi (Input Options): Fixed typo.
* gcj.texi (Input Options): Fixed typo.
...
...
gcc/java/jcf-write.c
View file @
f06cafdf
...
@@ -2677,6 +2677,37 @@ perform_relocations (state)
...
@@ -2677,6 +2677,37 @@ perform_relocations (state)
shrink
+=
3
;
shrink
+=
3
;
}
}
/* Optimize GOTO L; ... L: GOTO X by changing the first goto to
jump directly to X. We're careful here to avoid an infinite
loop if the `goto's themselves form one. We do this
optimization because we can generate a goto-to-goto for some
try/finally blocks. */
while
(
reloc
!=
NULL
&&
reloc
->
kind
==
OPCODE_goto_w
&&
reloc
->
label
!=
block
&&
reloc
->
label
->
v
.
chunk
->
data
!=
NULL
&&
reloc
->
label
->
v
.
chunk
->
data
[
0
]
==
OPCODE_goto
)
{
/* Find the reloc for the first instruction of the
destination block. */
struct
jcf_relocation
*
first_reloc
;
for
(
first_reloc
=
reloc
->
label
->
u
.
relocations
;
first_reloc
;
first_reloc
=
first_reloc
->
next
)
{
if
(
first_reloc
->
offset
==
1
&&
first_reloc
->
kind
==
OPCODE_goto_w
)
{
reloc
->
label
=
first_reloc
->
label
;
break
;
}
}
/* If we didn't do anything, exit the loop. */
if
(
first_reloc
==
NULL
)
break
;
}
for
(
reloc
=
block
->
u
.
relocations
;
reloc
!=
NULL
;
reloc
=
reloc
->
next
)
for
(
reloc
=
block
->
u
.
relocations
;
reloc
!=
NULL
;
reloc
=
reloc
->
next
)
{
{
if
(
reloc
->
kind
==
SWITCH_ALIGN_RELOC
)
if
(
reloc
->
kind
==
SWITCH_ALIGN_RELOC
)
...
...
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