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
b4f75276
Commit
b4f75276
authored
Sep 19, 2000
by
Bernd Schmidt
Committed by
Richard Henderson
Sep 19, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Kill recombine_givs.
From-SVN: r36536
parent
0f805606
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
85 deletions
+32
-85
gcc/ChangeLog
+25
-1
gcc/loop.c
+0
-0
gcc/loop.h
+0
-10
gcc/unroll.c
+7
-74
No files found.
gcc/ChangeLog
View file @
b4f75276
2000-09-19 Bernd Schmidt <bernds@redhat.co.uk>
2000-09-19 Bernd Schmidt <bernds@redhat.co.uk>
Undo most of the Wed Jan 27 23:39:53 1999 patch:
* loop.h (struct induction): Delete members derived, ix and last_use.
(struct loop_ivs): Delete members first_increment_giv and
last_increment_giv.
* loop.c (verify_dominator, find_life_end, cmp_recombine_givs_stats,
recombine_givs): Delete functions.
(find_and_verify_loops): Don't initialize cont_dominator.
(strength_reduce): Lose code to try to find bivs that can be
expressed as givs of another biv, and to convert biv increments
into givs.
Lose loop_scan_start variable, always use loop->scan_start.
Don't call recombine_givs. Don't handle derived givs.
(record_giv): Don't initialize derived and last_use fields.
(biv_eliminiation_giv_has_0_offset): Lose code to handle derived
givs.
* unroll.c (derived_regs): Delete static variable.
(unroll_loop): Don't initialize it.
(copy_loop_body): Lose code to handle derived givs.
(find_splittable_givs): Don't check for givs made from biv
increments.
Don't set derived_regs.
2000-09-19 Bernd Schmidt <bernds@redhat.co.uk>
Fix misapplied earlier patch:
Fix misapplied earlier patch:
* config/sh/sh.md (floatsisf_ie): Reenable. Remove explicit reference
* config/sh/sh.md (floatsisf_ie): Reenable. Remove explicit reference
to fpul.
to fpul.
...
@@ -76,7 +100,7 @@
...
@@ -76,7 +100,7 @@
Mon 18-Sep-2000 22:12:44 BST Neil Booth <NeilB@earthling.net>
Mon 18-Sep-2000 22:12:44 BST Neil Booth <NeilB@earthling.net>
* cpp.texi: Update documentation, including some clarifications,
* cpp.texi: Update documentation, including some clarifications,
the treatment of various newline combinations, and space between
the treatment of various newline combinations, and space between
backslash and newline.
backslash and newline.
...
...
gcc/loop.c
View file @
b4f75276
This diff is collapsed.
Click to expand it.
gcc/loop.h
View file @
b4f75276
...
@@ -133,14 +133,10 @@ struct induction
...
@@ -133,14 +133,10 @@ struct induction
struct
induction
*
same
;
/* If this giv has been combined with another
struct
induction
*
same
;
/* If this giv has been combined with another
giv, this points to the base giv. The base
giv, this points to the base giv. The base
giv will have COMBINED_WITH non-zero. */
giv will have COMBINED_WITH non-zero. */
struct
induction
*
derived_from
;
/* For a giv, if we decided to derive this
giv from another one. */
HOST_WIDE_INT
const_adjust
;
/* Used by loop unrolling, when an address giv
HOST_WIDE_INT
const_adjust
;
/* Used by loop unrolling, when an address giv
is split, and a constant is eliminated from
is split, and a constant is eliminated from
the address, the -constant is stored here
the address, the -constant is stored here
for later use. */
for later use. */
int
ix
;
/* Used by recombine_givs, as n index into
the stats array. */
struct
induction
*
same_insn
;
/* If there are multiple identical givs in
struct
induction
*
same_insn
;
/* If there are multiple identical givs in
the same insn, then all but one have this
the same insn, then all but one have this
field set, and they all point to the giv
field set, and they all point to the giv
...
@@ -201,12 +197,6 @@ struct loop_ivs
...
@@ -201,12 +197,6 @@ struct loop_ivs
/* The head of a list which links together (via the next field)
/* The head of a list which links together (via the next field)
every iv class for the current loop. */
every iv class for the current loop. */
struct
iv_class
*
loop_iv_list
;
struct
iv_class
*
loop_iv_list
;
/* Givs made from biv increments are always splittable for loop
unrolling. Since there is no regscan info for them, we have to
keep track of them separately. */
unsigned
int
first_increment_giv
;
unsigned
int
last_increment_giv
;
};
};
struct
loop_regs
struct
loop_regs
...
...
gcc/unroll.c
View file @
b4f75276
...
@@ -190,10 +190,6 @@ static struct induction **addr_combined_regs;
...
@@ -190,10 +190,6 @@ static struct induction **addr_combined_regs;
static
rtx
*
splittable_regs
;
static
rtx
*
splittable_regs
;
/* Indexed by register number, if this is a splittable induction variable,
/* Indexed by register number, if this is a splittable induction variable,
this indicates if it was made from a derived giv. */
static
char
*
derived_regs
;
/* Indexed by register number, if this is a splittable induction variable,
then this will hold the number of instructions in the loop that modify
then this will hold the number of instructions in the loop that modify
the induction variable. Used to ensure that only the last insn modifying
the induction variable. Used to ensure that only the last insn modifying
a split iv will update the original iv of the dest. */
a split iv will update the original iv of the dest. */
...
@@ -806,7 +802,6 @@ unroll_loop (loop, insn_count, end_insert_before, strength_reduce_p)
...
@@ -806,7 +802,6 @@ unroll_loop (loop, insn_count, end_insert_before, strength_reduce_p)
to access the splittable_regs[] and addr_combined_regs[] arrays. */
to access the splittable_regs[] and addr_combined_regs[] arrays. */
splittable_regs
=
(
rtx
*
)
xcalloc
(
maxregnum
,
sizeof
(
rtx
));
splittable_regs
=
(
rtx
*
)
xcalloc
(
maxregnum
,
sizeof
(
rtx
));
derived_regs
=
(
char
*
)
xcalloc
(
maxregnum
,
sizeof
(
char
));
splittable_regs_updates
=
(
int
*
)
xcalloc
(
maxregnum
,
sizeof
(
int
));
splittable_regs_updates
=
(
int
*
)
xcalloc
(
maxregnum
,
sizeof
(
int
));
addr_combined_regs
addr_combined_regs
=
(
struct
induction
**
)
xcalloc
(
maxregnum
,
sizeof
(
struct
induction
*
));
=
(
struct
induction
**
)
xcalloc
(
maxregnum
,
sizeof
(
struct
induction
*
));
...
@@ -872,14 +867,6 @@ unroll_loop (loop, insn_count, end_insert_before, strength_reduce_p)
...
@@ -872,14 +867,6 @@ unroll_loop (loop, insn_count, end_insert_before, strength_reduce_p)
r
);
r
);
}
}
}
}
/* Givs that have been created from multiple biv increments always have
local registers. */
for
(
r
=
ivs
->
first_increment_giv
;
r
<=
ivs
->
last_increment_giv
;
r
++
)
{
local_regno
[
r
]
=
1
;
if
(
loop_dump_stream
)
fprintf
(
loop_dump_stream
,
"Marked reg %d as local
\n
"
,
r
);
}
}
}
/* If this loop requires exit tests when unrolled, check to see if we
/* If this loop requires exit tests when unrolled, check to see if we
...
@@ -1346,7 +1333,6 @@ unroll_loop (loop, insn_count, end_insert_before, strength_reduce_p)
...
@@ -1346,7 +1333,6 @@ unroll_loop (loop, insn_count, end_insert_before, strength_reduce_p)
}
}
free
(
map
->
insn_map
);
free
(
map
->
insn_map
);
free
(
splittable_regs
);
free
(
splittable_regs
);
free
(
derived_regs
);
free
(
splittable_regs_updates
);
free
(
splittable_regs_updates
);
free
(
addr_combined_regs
);
free
(
addr_combined_regs
);
free
(
local_regno
);
free
(
local_regno
);
...
@@ -1792,8 +1778,7 @@ copy_loop_body (loop, copy_start, copy_end, map, exit_label, last_iteration,
...
@@ -1792,8 +1778,7 @@ copy_loop_body (loop, copy_start, copy_end, map, exit_label, last_iteration,
we might accidentally delete insns generated immediately
we might accidentally delete insns generated immediately
below by emit_unrolled_add. */
below by emit_unrolled_add. */
if
(
!
derived_regs
[
regno
])
giv_inc
=
calculate_giv_inc
(
set
,
insn
,
regno
);
giv_inc
=
calculate_giv_inc
(
set
,
insn
,
regno
);
/* Now find all address giv's that were combined with this
/* Now find all address giv's that were combined with this
giv 'v'. */
giv 'v'. */
...
@@ -1880,23 +1865,12 @@ copy_loop_body (loop, copy_start, copy_end, map, exit_label, last_iteration,
...
@@ -1880,23 +1865,12 @@ copy_loop_body (loop, copy_start, copy_end, map, exit_label, last_iteration,
dest_reg_was_split
=
1
;
dest_reg_was_split
=
1
;
giv_dest_reg
=
SET_DEST
(
set
);
giv_dest_reg
=
SET_DEST
(
set
);
if
(
derived_regs
[
regno
])
giv_src_reg
=
giv_dest_reg
;
{
/* Compute the increment value for the giv, if it wasn't
/* ??? This relies on SET_SRC (SET) to be of
already computed above. */
the form (plus (reg) (const_int)), and thus
if
(
giv_inc
==
0
)
forces recombine_givs to restrict the kind
giv_inc
=
calculate_giv_inc
(
set
,
insn
,
regno
);
of giv derivations it does before unrolling. */
giv_src_reg
=
XEXP
(
SET_SRC
(
set
),
0
);
giv_inc
=
XEXP
(
SET_SRC
(
set
),
1
);
}
else
{
giv_src_reg
=
giv_dest_reg
;
/* Compute the increment value for the giv, if it wasn't
already computed above. */
if
(
giv_inc
==
0
)
giv_inc
=
calculate_giv_inc
(
set
,
insn
,
regno
);
}
src_regno
=
REGNO
(
giv_src_reg
);
src_regno
=
REGNO
(
giv_src_reg
);
if
(
unroll_type
==
UNROLL_COMPLETELY
)
if
(
unroll_type
==
UNROLL_COMPLETELY
)
...
@@ -2726,10 +2700,6 @@ find_splittable_givs (loop, bl, unroll_type, increment, unroll_number)
...
@@ -2726,10 +2700,6 @@ find_splittable_givs (loop, bl, unroll_type, increment, unroll_number)
/* Line above always fails if INSN was moved by loop opt. */
/* Line above always fails if INSN was moved by loop opt. */
||
(
uid_luid
[
REGNO_LAST_UID
(
REGNO
(
v
->
dest_reg
))]
||
(
uid_luid
[
REGNO_LAST_UID
(
REGNO
(
v
->
dest_reg
))]
>=
INSN_LUID
(
loop
->
end
)))
>=
INSN_LUID
(
loop
->
end
)))
/* Givs made from biv increments are missed by the above test, so
test explicitly for them. */
&&
(
REGNO
(
v
->
dest_reg
)
<
ivs
->
first_increment_giv
||
REGNO
(
v
->
dest_reg
)
>
ivs
->
last_increment_giv
)
&&
!
(
final_value
=
v
->
final_value
))
&&
!
(
final_value
=
v
->
final_value
))
continue
;
continue
;
...
@@ -2831,7 +2801,6 @@ find_splittable_givs (loop, bl, unroll_type, increment, unroll_number)
...
@@ -2831,7 +2801,6 @@ find_splittable_givs (loop, bl, unroll_type, increment, unroll_number)
}
}
splittable_regs
[
REGNO
(
v
->
new_reg
)]
=
value
;
splittable_regs
[
REGNO
(
v
->
new_reg
)]
=
value
;
derived_regs
[
REGNO
(
v
->
new_reg
)]
=
v
->
derived_from
!=
0
;
}
}
else
else
{
{
...
@@ -2891,25 +2860,6 @@ find_splittable_givs (loop, bl, unroll_type, increment, unroll_number)
...
@@ -2891,25 +2860,6 @@ find_splittable_givs (loop, bl, unroll_type, increment, unroll_number)
rtx
new_reg
=
v
->
new_reg
;
rtx
new_reg
=
v
->
new_reg
;
record_base_value
(
REGNO
(
tem
),
v
->
add_val
,
0
);
record_base_value
(
REGNO
(
tem
),
v
->
add_val
,
0
);
if
(
same
&&
same
->
derived_from
)
{
/* calculate_giv_inc doesn't work for derived givs.
copy_loop_body works around the problem for the
DEST_REG givs themselves, but it can't handle
DEST_ADDR givs that have been combined with
a derived DEST_REG giv.
So Handle V as if the giv from which V->SAME has
been derived has been combined with V.
recombine_givs only derives givs from givs that
are reduced the ordinary, so we need not worry
about same->derived_from being in turn derived. */
same
=
same
->
derived_from
;
new_reg
=
express_from
(
same
,
v
);
new_reg
=
replace_rtx
(
new_reg
,
same
->
dest_reg
,
same
->
new_reg
);
}
/* If the address giv has a constant in its new_reg value,
/* If the address giv has a constant in its new_reg value,
then this constant can be pulled out and put in value,
then this constant can be pulled out and put in value,
instead of being part of the initialization code. */
instead of being part of the initialization code. */
...
@@ -3017,17 +2967,6 @@ find_splittable_givs (loop, bl, unroll_type, increment, unroll_number)
...
@@ -3017,17 +2967,6 @@ find_splittable_givs (loop, bl, unroll_type, increment, unroll_number)
INSN_UID
(
v
->
insn
));
INSN_UID
(
v
->
insn
));
continue
;
continue
;
}
}
if
(
v
->
same
&&
v
->
same
->
derived_from
)
{
/* Handle V as if the giv from which V->SAME has
been derived has been combined with V. */
v
->
same
=
v
->
same
->
derived_from
;
v
->
new_reg
=
express_from
(
v
->
same
,
v
);
v
->
new_reg
=
replace_rtx
(
v
->
new_reg
,
v
->
same
->
dest_reg
,
v
->
same
->
new_reg
);
}
}
}
/* Store the value of dest_reg into the insn. This sharing
/* Store the value of dest_reg into the insn. This sharing
...
@@ -3050,7 +2989,6 @@ find_splittable_givs (loop, bl, unroll_type, increment, unroll_number)
...
@@ -3050,7 +2989,6 @@ find_splittable_givs (loop, bl, unroll_type, increment, unroll_number)
Make sure that it's giv is marked as splittable here. */
Make sure that it's giv is marked as splittable here. */
splittable_regs
[
REGNO
(
v
->
new_reg
)]
=
value
;
splittable_regs
[
REGNO
(
v
->
new_reg
)]
=
value
;
derived_regs
[
REGNO
(
v
->
new_reg
)]
=
v
->
derived_from
!=
0
;
/* Make it appear to depend upon itself, so that the
/* Make it appear to depend upon itself, so that the
giv will be properly split in the main loop above. */
giv will be properly split in the main loop above. */
...
@@ -3094,11 +3032,6 @@ find_splittable_givs (loop, bl, unroll_type, increment, unroll_number)
...
@@ -3094,11 +3032,6 @@ find_splittable_givs (loop, bl, unroll_type, increment, unroll_number)
if
(
!
v
->
ignore
)
if
(
!
v
->
ignore
)
count
=
ivs
->
reg_biv_class
[
REGNO
(
v
->
src_reg
)]
->
biv_count
;
count
=
ivs
->
reg_biv_class
[
REGNO
(
v
->
src_reg
)]
->
biv_count
;
if
(
count
>
1
&&
v
->
derived_from
)
/* In this case, there is one set where the giv insn was and one
set each after each biv increment. (Most are likely dead.) */
count
++
;
splittable_regs_updates
[
REGNO
(
v
->
new_reg
)]
=
count
;
splittable_regs_updates
[
REGNO
(
v
->
new_reg
)]
=
count
;
}
}
...
...
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