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
fd5d5b07
Commit
fd5d5b07
authored
Sep 14, 2000
by
Kazu Hirata
Committed by
Jeff Law
Sep 13, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
loop.c: Fix formatting.
* loop.c: Fix formatting. * loop.h: Likewise. From-SVN: r36400
parent
f903ebb1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
43 additions
and
37 deletions
+43
-37
gcc/ChangeLog
+5
-0
gcc/loop.c
+24
-28
gcc/loop.h
+14
-9
No files found.
gcc/ChangeLog
View file @
fd5d5b07
2000-09-13 Kazu Hirata <kazu@hxi.com>
* loop.c: Fix formatting.
* loop.h: Likewise.
2000-09-13 Richard Henderson <rth@cygnus.com>
* config/ia64/ia64.md (divsf3): New.
...
...
gcc/loop.c
View file @
fd5d5b07
...
...
@@ -78,9 +78,6 @@ static int max_luid;
static
int
max_loop_num
;
/* Bound on pseudo register number before loop optimization.
A pseudo has valid regscan info if its number is < max_reg_before_loop. */
unsigned
int
max_reg_before_loop
;
...
...
@@ -258,7 +255,8 @@ static int iv_add_mult_cost PARAMS ((rtx, rtx, rtx, rtx));
static
void
loop_dump_aux
PARAMS
((
const
struct
loop
*
,
FILE
*
,
int
));
void
debug_loop
PARAMS
((
const
struct
loop
*
));
typedef
struct
rtx_pair
{
typedef
struct
rtx_pair
{
rtx
r1
;
rtx
r2
;
}
rtx_pair
;
...
...
@@ -283,7 +281,8 @@ static int indirect_jump_in_function_p PARAMS ((rtx));
static
int
compute_luids
PARAMS
((
rtx
,
rtx
,
int
));
static
int
biv_elimination_giv_has_0_offset
PARAMS
((
struct
induction
*
,
struct
induction
*
,
rtx
));
struct
induction
*
,
rtx
));
/* Benefit penalty, if a giv is not replaceable, i.e. must emit an insn to
copy the value of the strength reduced giv to its original register. */
...
...
@@ -2587,8 +2586,7 @@ find_and_verify_loops (f, loops)
cont. */
if
((
INSN_LUID
(
label
)
<
INSN_LUID
(
loop
->
cont
))
&&
(
INSN_LUID
(
label
)
>
INSN_LUID
(
loop
->
start
))
&&
(
INSN_LUID
(
label
)
>
INSN_LUID
(
loop
->
start
))
/* And if there is no later destination already
recorded. */
&&
(
!
loop
->
cont_dominator
...
...
@@ -2812,9 +2810,9 @@ find_and_verify_loops (f, loops)
off LABEL_OUTSIDE_LOOP_P bit. */
if
(
JUMP_LABEL
(
insn
))
{
for
(
q
=
0
,
r
=
this_loop
->
exit_labels
;
r
;
q
=
r
,
r
=
LABEL_NEXTREF
(
r
))
for
(
q
=
0
,
r
=
this_loop
->
exit_labels
;
r
;
q
=
r
,
r
=
LABEL_NEXTREF
(
r
))
if
(
XEXP
(
r
,
0
)
==
JUMP_LABEL
(
insn
))
{
LABEL_OUTSIDE_LOOP_P
(
r
)
=
0
;
...
...
@@ -5967,7 +5965,7 @@ basic_induction_var (loop, x, mode, dest_reg, p, inc_val, mult_val, location)
inc_val
,
mult_val
,
location
))
return
1
;
}
/*
... fall through ..
. */
/*
Fall through
. */
/* Can accept constant setting of biv only when inside inner most loop.
Otherwise, a biv of an inner loop may be incorrectly recognized
...
...
@@ -6514,7 +6512,11 @@ simplify_giv_expr (loop, x, ext_val, benefit)
{
int
i
=
m
->
consec
;
tem
=
m
->
insn
;
do
{
tem
=
NEXT_INSN
(
tem
);
}
while
(
--
i
>
0
);
do
{
tem
=
NEXT_INSN
(
tem
);
}
while
(
--
i
>
0
);
tem
=
find_reg_note
(
tem
,
REG_EQUAL
,
NULL_RTX
);
if
(
tem
)
...
...
@@ -7123,7 +7125,7 @@ check_ext_dependant_givs (bl, loop_info)
{
if
(
loop_dump_stream
)
{
fprintf
(
loop_dump_stream
,
fprintf
(
loop_dump_stream
,
"Verified ext dependant giv at %d of reg %d
\n
"
,
INSN_UID
(
v
->
insn
),
bl
->
regno
);
}
...
...
@@ -7146,7 +7148,7 @@ check_ext_dependant_givs (bl, loop_info)
why
=
"biv iteration info incomplete"
;
}
fprintf
(
loop_dump_stream
,
fprintf
(
loop_dump_stream
,
"Failed ext dependant giv at %d, %s
\n
"
,
INSN_UID
(
v
->
insn
),
why
);
}
...
...
@@ -8379,7 +8381,7 @@ check_dbra_loop (loop, insn_count)
jump_label
=
XEXP
(
SET_SRC
(
PATTERN
(
PREV_INSN
(
loop_end
))),
1
);
if
(
jump_label
==
pc_rtx
)
jump_label
=
XEXP
(
SET_SRC
(
PATTERN
(
PREV_INSN
(
loop_end
))),
2
);
new_add_val
=
GEN_INT
(
-
INTVAL
(
bl
->
biv
->
add_val
));
new_add_val
=
GEN_INT
(
-
INTVAL
(
bl
->
biv
->
add_val
));
/* Set start_value; if this is not a CONST_INT, we need
to generate a SUB.
...
...
@@ -8463,7 +8465,7 @@ check_dbra_loop (loop, insn_count)
/* Inc LABEL_NUSES so that delete_insn will
not delete the label. */
LABEL_NUSES
(
XEXP
(
jump_label
,
0
))
++
;
LABEL_NUSES
(
XEXP
(
jump_label
,
0
))
++
;
/* Emit an insn after the end of the loop to set the biv's
proper exit value if it is used anywhere outside the loop. */
...
...
@@ -9553,7 +9555,7 @@ insert_loop_mem (mem, data)
else
loop_info
->
mems_allocated
=
32
;
loop_info
->
mems
=
(
loop_mem_info
*
)
loop_info
->
mems
=
(
loop_mem_info
*
)
xrealloc
(
loop_info
->
mems
,
loop_info
->
mems_allocated
*
sizeof
(
loop_mem_info
));
}
...
...
@@ -10057,7 +10059,6 @@ try_copy_prop (loop, replacement, regno)
}
}
/* Try to replace occurrences of pseudo REGNO with REPLACEMENT within
loop LOOP if the order of the sets of these registers can be
swapped. There must be exactly one insn within the loop that sets
...
...
@@ -10145,7 +10146,6 @@ try_swap_copy_prop (loop, replacement, regno)
}
}
/* Replace MEM with its associated pseudo register. This function is
called from load_mems via for_each_rtx. DATA is actually a pointer
to a structure describing the instruction currently being scanned
...
...
@@ -10156,7 +10156,7 @@ replace_loop_mem (mem, data)
rtx
*
mem
;
void
*
data
;
{
loop_replace_args
*
args
=
(
loop_replace_args
*
)
data
;
loop_replace_args
*
args
=
(
loop_replace_args
*
)
data
;
rtx
m
=
*
mem
;
if
(
m
==
NULL_RTX
)
...
...
@@ -10187,7 +10187,6 @@ replace_loop_mem (mem, data)
return
0
;
}
static
void
replace_loop_mems
(
insn
,
mem
,
reg
)
rtx
insn
;
...
...
@@ -10203,7 +10202,6 @@ replace_loop_mems (insn, mem, reg)
for_each_rtx
(
&
insn
,
replace_loop_mem
,
&
args
);
}
/* Replace one register with another. Called through for_each_rtx; PX points
to the rtx being scanned. DATA is actually a pointer to
a structure of arguments. */
...
...
@@ -10214,7 +10212,7 @@ replace_loop_reg (px, data)
void
*
data
;
{
rtx
x
=
*
px
;
loop_replace_args
*
args
=
(
loop_replace_args
*
)
data
;
loop_replace_args
*
args
=
(
loop_replace_args
*
)
data
;
if
(
x
==
NULL_RTX
)
return
0
;
...
...
@@ -10225,7 +10223,6 @@ replace_loop_reg (px, data)
return
0
;
}
static
void
replace_loop_regs
(
insn
,
reg
,
replacement
)
rtx
insn
;
...
...
@@ -10241,7 +10238,6 @@ replace_loop_regs (insn, reg, replacement)
for_each_rtx
(
&
insn
,
replace_loop_reg
,
&
args
);
}
/* Replace occurrences of the old exit label for the loop with the new
one. DATA is an rtx_pair containing the old and new labels,
respectively. */
...
...
@@ -10283,7 +10279,8 @@ replace_label (x, data)
#define LOOP_INSN_UID(INSN) ((INSN) ? INSN_UID (INSN) : -1)
static
void
loop_dump_aux
(
loop
,
file
,
verbose
)
static
void
loop_dump_aux
(
loop
,
file
,
verbose
)
const
struct
loop
*
loop
;
FILE
*
file
;
int
verbose
;
...
...
@@ -10324,7 +10321,7 @@ static void loop_dump_aux (loop, file, verbose)
LOOP_INSN_UID
(
loop
->
end
));
fprintf
(
file
,
";; top %d (%d), scan start %d (%d)
\n
"
,
LOOP_BLOCK_NUM
(
loop
->
top
),
LOOP_INSN_UID
(
loop
->
top
)
,
LOOP_INSN_UID
(
loop
->
top
),
LOOP_BLOCK_NUM
(
loop
->
scan_start
),
LOOP_INSN_UID
(
loop
->
scan_start
));
fprintf
(
file
,
";; exit_count %d"
,
loop
->
exit_count
);
...
...
@@ -10347,7 +10344,6 @@ static void loop_dump_aux (loop, file, verbose)
}
}
/* Call this function from the debugger to dump LOOP. */
void
...
...
gcc/loop.h
View file @
fd5d5b07
...
...
@@ -25,7 +25,6 @@ Boston, MA 02111-1307, USA. */
#define LOOP_UNROLL 1
#define LOOP_BCT 2
/* Get the loop info pointer of a loop. */
#define LOOP_INFO(LOOP) ((struct loop_info *) (LOOP)->aux)
...
...
@@ -52,7 +51,11 @@ Boston, MA 02111-1307, USA. */
/* An enum for the two different types of givs, those that are used
as memory addresses and those that are calculated into registers. */
enum
g_types
{
DEST_ADDR
,
DEST_REG
};
enum
g_types
{
DEST_ADDR
,
DEST_REG
};
/* A `struct induction' is created for every instruction that sets
an induction variable (either a biv or a giv). */
...
...
@@ -148,7 +151,8 @@ struct induction
/* A `struct iv_class' is created for each biv. */
struct
iv_class
{
struct
iv_class
{
unsigned
int
regno
;
/* Pseudo reg which is the biv. */
int
biv_count
;
/* Number of insns setting this reg. */
struct
induction
*
biv
;
/* List of all insns that set this reg. */
...
...
@@ -170,7 +174,6 @@ struct iv_class {
biv controls. */
};
typedef
struct
loop_mem_info
{
rtx
mem
;
/* The MEM itself. */
...
...
@@ -178,7 +181,6 @@ typedef struct loop_mem_info
int
optimize
;
/* Nonzero if we can optimize access to this MEM. */
}
loop_mem_info
;
struct
loop_ivs
{
/* Indexed by register number, indicates whether or not register is
...
...
@@ -207,7 +209,6 @@ struct loop_ivs
unsigned
int
last_increment_giv
;
};
struct
loop_regs
{
int
num
;
...
...
@@ -245,7 +246,6 @@ struct loop_regs
int
multiple_uses
;
};
/* Information pertaining to a loop. */
struct
loop_info
...
...
@@ -321,8 +321,13 @@ struct loop_info
};
/* Definitions used by the basic induction variable discovery code. */
enum
iv_mode
{
UNKNOWN_INDUCT
,
BASIC_INDUCT
,
NOT_BASIC_INDUCT
,
GENERAL_INDUCT
};
enum
iv_mode
{
UNKNOWN_INDUCT
,
BASIC_INDUCT
,
NOT_BASIC_INDUCT
,
GENERAL_INDUCT
};
/* Variables declared in loop.c, but also needed in unroll.c. */
...
...
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