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
c3410241
Commit
c3410241
authored
Nov 24, 2000
by
Bernd Schmidt
Committed by
Bernd Schmidt
Nov 24, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid hard register combinations
From-SVN: r37704
parent
2f401cc8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
54 additions
and
7 deletions
+54
-7
gcc/ChangeLog
+5
-0
gcc/combine.c
+49
-7
No files found.
gcc/ChangeLog
View file @
c3410241
2000-11-24 Bernd Schmidt <bernds@redhat.co.uk>
* combine.c (cant_combine_insn_p): New function.
(try_combine): Use it.
2000-11-24 Nathan Sidwell <nathan@codesourcery.com>
* c-parse.in (unary_expr): Move VA_ARG from here ...
...
...
gcc/combine.c
View file @
c3410241
...
...
@@ -366,6 +366,7 @@ static void do_SUBST_INT PARAMS ((unsigned int *,
static
void
init_reg_last_arrays
PARAMS
((
void
));
static
void
setup_incoming_promotions
PARAMS
((
void
));
static
void
set_nonzero_bits_and_sign_copies
PARAMS
((
rtx
,
rtx
,
void
*
));
static
int
cant_combine_insn_p
PARAMS
((
rtx
));
static
int
can_combine_p
PARAMS
((
rtx
,
rtx
,
rtx
,
rtx
,
rtx
*
,
rtx
*
));
static
int
sets_function_arg_p
PARAMS
((
rtx
));
static
int
combinable_i3pat
PARAMS
((
rtx
,
rtx
*
,
rtx
,
rtx
,
int
,
rtx
*
));
...
...
@@ -1455,6 +1456,46 @@ contains_muldiv (x)
}
}
/* Determine whether INSN can be used in a combination. Return nonzero if
not. This is used in try_combine to detect early some cases where we
can't perform combinations. */
static
int
cant_combine_insn_p
(
insn
)
rtx
insn
;
{
rtx
set
;
rtx
src
,
dest
;
/* If this isn't really an insn, we can't do anything.
This can occur when flow deletes an insn that it has merged into an
auto-increment address. */
if
(
!
INSN_P
(
insn
))
return
1
;
/* Never combine loads and stores involving hard regs. The register
allocator can usually handle such reg-reg moves by tying. If we allow
the combiner to make substitutions of hard regs, we risk aborting in
reload on machines that have SMALL_REGISTER_CLASSES.
As an exception, we allow combinations involving fixed regs; these are
not available to the register allocator so there's no risk involved. */
set
=
single_set
(
insn
);
if
(
!
set
)
return
0
;
src
=
SET_SRC
(
set
);
dest
=
SET_DEST
(
set
);
if
(
REG_P
(
src
)
&&
REGNO
(
src
)
<
FIRST_PSEUDO_REGISTER
&&
!
fixed_regs
[
REGNO
(
src
)])
return
1
;
if
(
REG_P
(
dest
)
&&
REGNO
(
dest
)
<
FIRST_PSEUDO_REGISTER
&&
!
fixed_regs
[
REGNO
(
dest
)])
return
1
;
return
0
;
}
/* Try to combine the insns I1 and I2 into I3.
Here I1 and I2 appear earlier than I3.
I1 can be zero; then we combine just I2 into I3.
...
...
@@ -1509,13 +1550,14 @@ try_combine (i3, i2, i1, new_direct_jump_p)
register
rtx
link
;
int
i
;
/* If any of I1, I2, and I3 isn't really an insn, we can't do anything.
This can occur when flow deletes an insn that it has merged into an
auto-increment address. We also can't do anything if I3 has a
REG_LIBCALL note since we don't want to disrupt the contiguity of a
libcall. */
if
(
!
INSN_P
(
i3
)
||
!
INSN_P
(
i2
)
||
(
i1
&&
!
INSN_P
(
i1
))
/* Exit early if one of the insns involved can't be used for
combinations. */
if
(
cant_combine_insn_p
(
i3
)
||
cant_combine_insn_p
(
i2
)
||
(
i1
&&
cant_combine_insn_p
(
i1
))
/* We also can't do anything if I3 has a
REG_LIBCALL note since we don't want to disrupt the contiguity of a
libcall. */
#if 0
/* ??? This gives worse code, and appears to be unnecessary, since no
pass after flow uses REG_LIBCALL/REG_RETVAL notes. */
...
...
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