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
c05ddfa7
Commit
c05ddfa7
authored
25 years ago
by
Mark Mitchell
Committed by
Mark Mitchell
25 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* combine.c (combine_instructions): Use xmalloc instead of alloca.
From-SVN: r30331
parent
9fd4e328
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
17 deletions
+32
-17
gcc/ChangeLog
+4
-0
gcc/combine.c
+28
-17
No files found.
gcc/ChangeLog
View file @
c05ddfa7
Mon
Nov
1
15
:
41
:
01
1999
Mark
P
.
Mitchell
<
mark
@codesourcery
.
com
>
*
combine
.
c
(
combine_instructions
)
:
Use
xmalloc
instead
of
alloca
.
Mon
Nov
1
13
:
22
:
30
1999
Richard
Henderson
<
rth
@cygnus
.
com
>
*
toplev
.
c
(
rest_of_compilation
)
:
Don
'
t
optimize
the
CFG
...
...
This diff is collapsed.
Click to expand it.
gcc/combine.c
View file @
c05ddfa7
...
...
@@ -499,25 +499,22 @@ combine_instructions (f, nregs)
combine_max_regno
=
nregs
;
reg_nonzero_bits
=
(
unsigned
HOST_WIDE_INT
*
)
alloca
(
nregs
*
sizeof
(
HOST_WIDE_INT
));
reg_sign_bit_copies
=
(
char
*
)
alloca
(
nregs
*
sizeof
(
char
));
bzero
((
char
*
)
reg_nonzero_bits
,
nregs
*
sizeof
(
HOST_WIDE_INT
));
bzero
(
reg_sign_bit_copies
,
nregs
*
sizeof
(
char
));
reg_last_death
=
(
rtx
*
)
alloca
(
nregs
*
sizeof
(
rtx
));
reg_last_set
=
(
rtx
*
)
alloca
(
nregs
*
sizeof
(
rtx
));
reg_last_set_value
=
(
rtx
*
)
alloca
(
nregs
*
sizeof
(
rtx
));
reg_last_set_table_tick
=
(
int
*
)
alloca
(
nregs
*
sizeof
(
int
));
reg_last_set_label
=
(
int
*
)
alloca
(
nregs
*
sizeof
(
int
));
reg_last_set_invalid
=
(
char
*
)
alloca
(
nregs
*
sizeof
(
char
));
reg_nonzero_bits
=
((
unsigned
HOST_WIDE_INT
*
)
xcalloc
(
nregs
,
sizeof
(
unsigned
HOST_WIDE_INT
)));
reg_sign_bit_copies
=
(
char
*
)
xcalloc
(
nregs
,
sizeof
(
char
));
reg_last_death
=
(
rtx
*
)
xmalloc
(
nregs
*
sizeof
(
rtx
));
reg_last_set
=
(
rtx
*
)
xmalloc
(
nregs
*
sizeof
(
rtx
));
reg_last_set_value
=
(
rtx
*
)
xmalloc
(
nregs
*
sizeof
(
rtx
));
reg_last_set_table_tick
=
(
int
*
)
xmalloc
(
nregs
*
sizeof
(
int
));
reg_last_set_label
=
(
int
*
)
xmalloc
(
nregs
*
sizeof
(
int
));
reg_last_set_invalid
=
(
char
*
)
xmalloc
(
nregs
*
sizeof
(
char
));
reg_last_set_mode
=
(
enum
machine_mode
*
)
alloca
(
nregs
*
sizeof
(
enum
machine_mode
));
=
(
enum
machine_mode
*
)
xmalloc
(
nregs
*
sizeof
(
enum
machine_mode
));
reg_last_set_nonzero_bits
=
(
unsigned
HOST_WIDE_INT
*
)
alloca
(
nregs
*
sizeof
(
HOST_WIDE_INT
));
=
(
unsigned
HOST_WIDE_INT
*
)
xmalloc
(
nregs
*
sizeof
(
HOST_WIDE_INT
));
reg_last_set_sign_bit_copies
=
(
char
*
)
alloca
(
nregs
*
sizeof
(
char
));
=
(
char
*
)
xmalloc
(
nregs
*
sizeof
(
char
));
init_reg_last_arrays
();
...
...
@@ -529,7 +526,7 @@ combine_instructions (f, nregs)
if
(
INSN_UID
(
insn
)
>
i
)
i
=
INSN_UID
(
insn
);
uid_cuid
=
(
int
*
)
alloca
((
i
+
1
)
*
sizeof
(
int
));
uid_cuid
=
(
int
*
)
xmalloc
((
i
+
1
)
*
sizeof
(
int
));
max_uid_cuid
=
i
;
nonzero_bits_mode
=
mode_for_size
(
HOST_BITS_PER_WIDE_INT
,
MODE_INT
,
0
);
...
...
@@ -704,7 +701,21 @@ combine_instructions (f, nregs)
update_life_info
(
refresh_blocks
,
UPDATE_LIFE_GLOBAL_RM_NOTES
,
PROP_DEATH_NOTES
);
}
/* Clean up. */
sbitmap_free
(
refresh_blocks
);
free
(
reg_nonzero_bits
);
free
(
reg_sign_bit_copies
);
free
(
reg_last_death
);
free
(
reg_last_set
);
free
(
reg_last_set_value
);
free
(
reg_last_set_table_tick
);
free
(
reg_last_set_label
);
free
(
reg_last_set_invalid
);
free
(
reg_last_set_mode
);
free
(
reg_last_set_nonzero_bits
);
free
(
reg_last_set_sign_bit_copies
);
free
(
uid_cuid
);
total_attempts
+=
combine_attempts
;
total_merges
+=
combine_merges
;
...
...
This diff is collapsed.
Click to expand it.
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