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
cb9e8ad1
Commit
cb9e8ad1
authored
May 10, 1996
by
Richard Kenner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(mark_set_1, mark_used_regs): Clean up usages of ALL_NEEDED; change to
SOME_NOT_NEEDED and set properly. From-SVN: r11967
parent
d1b01681
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
21 deletions
+21
-21
gcc/flow.c
+21
-21
No files found.
gcc/flow.c
View file @
cb9e8ad1
...
@@ -2006,8 +2006,8 @@ mark_set_1 (needed, dead, x, insn, significant)
...
@@ -2006,8 +2006,8 @@ mark_set_1 (needed, dead, x, insn, significant)
register
int
offset
=
regno
/
REGSET_ELT_BITS
;
register
int
offset
=
regno
/
REGSET_ELT_BITS
;
register
REGSET_ELT_TYPE
bit
register
REGSET_ELT_TYPE
bit
=
(
REGSET_ELT_TYPE
)
1
<<
(
regno
%
REGSET_ELT_BITS
);
=
(
REGSET_ELT_TYPE
)
1
<<
(
regno
%
REGSET_ELT_BITS
);
REGSET_ELT_TYPE
all_needed
=
(
needed
[
offset
]
&
bit
);
REGSET_ELT_TYPE
some_needed
=
(
needed
[
offset
]
&
bit
);
REGSET_ELT_TYPE
some_needed
=
(
needed
[
offset
]
&
bit
);
REGSET_ELT_TYPE
some_not_needed
=
(
~
needed
[
offset
])
&
bit
;
/* Mark it as a significant register for this basic block. */
/* Mark it as a significant register for this basic block. */
if
(
significant
)
if
(
significant
)
...
@@ -2030,17 +2030,17 @@ mark_set_1 (needed, dead, x, insn, significant)
...
@@ -2030,17 +2030,17 @@ mark_set_1 (needed, dead, x, insn, significant)
n
=
HARD_REGNO_NREGS
(
regno
,
GET_MODE
(
reg
));
n
=
HARD_REGNO_NREGS
(
regno
,
GET_MODE
(
reg
));
while
(
--
n
>
0
)
while
(
--
n
>
0
)
{
{
REGSET_ELT_TYPE
n_bit
=
(
REGSET_ELT_TYPE
)
1
<<
((
regno
+
n
)
%
REGSET_ELT_BITS
);
if
(
significant
)
if
(
significant
)
significant
[(
regno
+
n
)
/
REGSET_ELT_BITS
]
significant
[(
regno
+
n
)
/
REGSET_ELT_BITS
]
|=
n_bit
;
|=
(
REGSET_ELT_TYPE
)
1
<<
((
regno
+
n
)
%
REGSET_ELT_BITS
);
dead
[(
regno
+
n
)
/
REGSET_ELT_BITS
]
dead
[(
regno
+
n
)
/
REGSET_ELT_BITS
]
|=
n_bit
;
|=
(
REGSET_ELT_TYPE
)
1
<<
((
regno
+
n
)
%
REGSET_ELT_BITS
);
some_needed
some_needed
|=
(
needed
[(
regno
+
n
)
/
REGSET_ELT_BITS
]
|=
(
needed
[(
regno
+
n
)
/
REGSET_ELT_BITS
]
&
n_bit
);
&
(
REGSET_ELT_TYPE
)
1
<<
((
regno
+
n
)
%
REGSET_ELT_BITS
));
some_not_needed
all_needed
|=
((
~
needed
[(
regno
+
n
)
/
REGSET_ELT_BITS
])
&
n_bit
);
&=
(
needed
[(
regno
+
n
)
/
REGSET_ELT_BITS
]
&
(
REGSET_ELT_TYPE
)
1
<<
((
regno
+
n
)
%
REGSET_ELT_BITS
));
}
}
}
}
/* Additional data to record if this is the final pass. */
/* Additional data to record if this is the final pass. */
...
@@ -2092,7 +2092,7 @@ mark_set_1 (needed, dead, x, insn, significant)
...
@@ -2092,7 +2092,7 @@ mark_set_1 (needed, dead, x, insn, significant)
reg_live_length
[
regno
]
++
;
reg_live_length
[
regno
]
++
;
}
}
if
(
all
_needed
)
if
(
!
some_not
_needed
)
{
{
/* Make a logical link from the next following insn
/* Make a logical link from the next following insn
that uses this register, back to this insn.
that uses this register, back to this insn.
...
@@ -2435,10 +2435,11 @@ mark_used_regs (needed, live, x, final, insn)
...
@@ -2435,10 +2435,11 @@ mark_used_regs (needed, live, x, final, insn)
register
int
offset
=
regno
/
REGSET_ELT_BITS
;
register
int
offset
=
regno
/
REGSET_ELT_BITS
;
register
REGSET_ELT_TYPE
bit
register
REGSET_ELT_TYPE
bit
=
(
REGSET_ELT_TYPE
)
1
<<
(
regno
%
REGSET_ELT_BITS
);
=
(
REGSET_ELT_TYPE
)
1
<<
(
regno
%
REGSET_ELT_BITS
);
REGSET_ELT_TYPE
all_needed
=
needed
[
offset
]
&
bit
;
REGSET_ELT_TYPE
some_needed
=
needed
[
offset
]
&
bit
;
REGSET_ELT_TYPE
some_needed
=
needed
[
offset
]
&
bit
;
REGSET_ELT_TYPE
some_not_needed
=
(
~
needed
[
offset
])
&
bit
;
live
[
offset
]
|=
bit
;
live
[
offset
]
|=
bit
;
/* A hard reg in a wide mode may really be multiple registers.
/* A hard reg in a wide mode may really be multiple registers.
If so, mark all of them just like the first. */
If so, mark all of them just like the first. */
if
(
regno
<
FIRST_PSEUDO_REGISTER
)
if
(
regno
<
FIRST_PSEUDO_REGISTER
)
...
@@ -2479,14 +2480,13 @@ mark_used_regs (needed, live, x, final, insn)
...
@@ -2479,14 +2480,13 @@ mark_used_regs (needed, live, x, final, insn)
n
=
HARD_REGNO_NREGS
(
regno
,
GET_MODE
(
x
));
n
=
HARD_REGNO_NREGS
(
regno
,
GET_MODE
(
x
));
while
(
--
n
>
0
)
while
(
--
n
>
0
)
{
{
live
[(
regno
+
n
)
/
REGSET_ELT_BITS
]
REGSET_ELT_TYPE
n_bit
|=
(
REGSET_ELT_TYPE
)
1
<<
((
regno
+
n
)
%
REGSET_ELT_BITS
);
=
(
REGSET_ELT_TYPE
)
1
<<
((
regno
+
n
)
%
REGSET_ELT_BITS
);
some_needed
|=
(
needed
[(
regno
+
n
)
/
REGSET_ELT_BITS
]
live
[(
regno
+
n
)
/
REGSET_ELT_BITS
]
|=
n_bit
;
&
(
REGSET_ELT_TYPE
)
1
<<
((
regno
+
n
)
%
REGSET_ELT_BITS
));
some_needed
|=
(
needed
[(
regno
+
n
)
/
REGSET_ELT_BITS
]
&
n_bit
);
all_needed
some_not_needed
&=
(
needed
[(
regno
+
n
)
/
REGSET_ELT_BITS
]
|=
((
~
needed
[(
regno
+
n
)
/
REGSET_ELT_BITS
])
&
n_bit
);
&
(
REGSET_ELT_TYPE
)
1
<<
((
regno
+
n
)
%
REGSET_ELT_BITS
));
}
}
}
}
if
(
final
)
if
(
final
)
...
@@ -2530,7 +2530,7 @@ mark_used_regs (needed, live, x, final, insn)
...
@@ -2530,7 +2530,7 @@ mark_used_regs (needed, live, x, final, insn)
we do not make a REG_DEAD note; likewise if we already
we do not make a REG_DEAD note; likewise if we already
made such a note. */
made such a note. */
if
(
!
all
_needed
if
(
some_not
_needed
&&
!
dead_or_set_p
(
insn
,
x
)
&&
!
dead_or_set_p
(
insn
,
x
)
#if 0
#if 0
&& (regno >= FIRST_PSEUDO_REGISTER || ! fixed_regs[regno])
&& (regno >= FIRST_PSEUDO_REGISTER || ! fixed_regs[regno])
...
...
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