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
473fe49b
Commit
473fe49b
authored
Apr 07, 1998
by
Ken Raeburn
Committed by
Ken Raeburn
Apr 07, 1998
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Sync up MEMORY_MOVE_COST changes with FSF.
From-SVN: r19032
parent
d6a007a2
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
68 additions
and
47 deletions
+68
-47
gcc/ChangeLog
+0
-24
gcc/ChangeLog.12
+19
-0
gcc/regclass.c
+30
-7
gcc/tm.texi
+19
-16
No files found.
gcc/ChangeLog
View file @
473fe49b
...
@@ -940,25 +940,6 @@ Mon Mar 16 15:50:20 EST 1998 Andrew MacLeod <amacleod@cygnus.com>
...
@@ -940,25 +940,6 @@ Mon Mar 16 15:50:20 EST 1998 Andrew MacLeod <amacleod@cygnus.com>
* config/sparc/sparc.md: Add calls to 'in_same_eh_region' in 4
* config/sparc/sparc.md: Add calls to 'in_same_eh_region' in 4
peepholes involving calls and unconditional branches.
peepholes involving calls and unconditional branches.
Mon Mar 16 12:12:36 1998 Ken Raeburn <raeburn@cygnus.com>
* reload.h (MEMORY_MOVE_COST): Define here if not already defined;
if HAVE_SECONDARY_RELOADS, factor in copying cost.
(memory_move_secondary_cost): Declare.
* regclass.c (MEMORY_MOVE_COST): Don't define default here.
(memory_move_secondary_cost) [HAVE_SECONDARY_RELOADS]: New
function.
(regclass, record_reg_classes, copy_cost, record_address_regs):
Pass register class and direction of move to MEMORY_MOVE_COST.
* reload1.c (MEMORY_MOVE_COST): Don't define default here.
(emit_reload_insns, reload_cse_simplify_set): Pass register class
and direction of move to MEMORY_MOVE_COST.
* 1750a.c, a29k.h, alpha.h, arc.h, arm.h, dsp16xx.h, i386.h,
m32r.h, m88k.h, rs6000.h (MEMORY_MOVE_COST): Add extra ignored
arguments to definition, even in comments.
* mips.h (MEMORY_MOVE_COST): Add extra arguments; add
memory_move_secondary_cost result to cpu-specific cost.
Mon Mar 16 11:16:50 1998 Jim Wilson <wilson@cygnus.com>
Mon Mar 16 11:16:50 1998 Jim Wilson <wilson@cygnus.com>
* README.gnat: New file.
* README.gnat: New file.
...
@@ -1652,11 +1633,6 @@ Fri Feb 27 11:02:47 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.
...
@@ -1652,11 +1633,6 @@ Fri Feb 27 11:02:47 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.
* config/m68k/m68k.md (movsf+1): Optimize moving a CONST_DOUBLE
* config/m68k/m68k.md (movsf+1): Optimize moving a CONST_DOUBLE
zero.
zero.
1998-02-26 Ken Raeburn <raeburn@cygnus.com>
* regclass.c (init_reg_sets): Move init of move cost tables...
(init_reg_sets_1): ...to here.
Thu Feb 26 00:13:21 1998 Ian Lance Taylor <ian@cygnus.com>
Thu Feb 26 00:13:21 1998 Ian Lance Taylor <ian@cygnus.com>
* choose-temp.c: Fix handling of sys/file.h to work in libiberty.
* choose-temp.c: Fix handling of sys/file.h to work in libiberty.
...
...
gcc/ChangeLog.12
View file @
473fe49b
Thu Apr 2 06:19:25 1998 Ken Raeburn <raeburn@cygnus.com>
* reload.h (MEMORY_MOVE_COST): Define here if not already defined.
(memory_move_secondary_cost): Declare.
* regclass.c (MEMORY_MOVE_COST): Don't define default here.
(memory_move_secondary_cost) [HAVE_SECONDARY_RELOADS]: New function.
(regclass, record_reg_classes, copy_cost, record_address_regs):
Pass register class and direction of move to MEMORY_MOVE_COST.
(top_of_stack) [HAVE_SECONDARY_RELOADS]: New static array.
(init_regs) [HAVE_SECONDARY_RELOADS]: Initialize it.
* reload1.c (MEMORY_MOVE_COST): Don't define default here.
(emit_reload_insns, reload_cse_simplify_set): Pass register class
and direction of move to MEMORY_MOVE_COST.
* 1750a.h (MEMORY_MOVE_COST): Add extra ignored arguments.
* a29k.h, alpha.h, arc.h, arm.h, dsp16xx.h, i386.h, m32r.h: Likewise.
* m88k.h, rs6000.h: Likewise.
* mips.h (MEMORY_MOVE_COST): Likewise.
Add memory_move_secondary_cost result to cpu-specific cost.
Mon Mar 30 13:56:30 1998 Jim Wilson <wilson@cygnus.com>
Mon Mar 30 13:56:30 1998 Jim Wilson <wilson@cygnus.com>
* mips/ultrix.h (SUBTARGET_CPP_SPEC): Define.
* mips/ultrix.h (SUBTARGET_CPP_SPEC): Define.
...
...
gcc/regclass.c
View file @
473fe49b
...
@@ -183,6 +183,14 @@ static char *in_inc_dec;
...
@@ -183,6 +183,14 @@ static char *in_inc_dec;
#endif
/* FORBIDDEN_INC_DEC_CLASSES */
#endif
/* FORBIDDEN_INC_DEC_CLASSES */
#ifdef HAVE_SECONDARY_RELOADS
/* Sample MEM values for use by memory_move_secondary_cost. */
static
rtx
top_of_stack
[
MAX_MACHINE_MODE
];
#endif
/* HAVE_SECONDARY_RELOADS */
/* Function called only once to initialize the above data on reg usage.
/* Function called only once to initialize the above data on reg usage.
Once this is done, various switches may override. */
Once this is done, various switches may override. */
...
@@ -422,11 +430,23 @@ init_regs ()
...
@@ -422,11 +430,23 @@ init_regs ()
init_reg_sets_1
();
init_reg_sets_1
();
init_reg_modes
();
init_reg_modes
();
#ifdef HAVE_SECONDARY_RELOADS
{
/* Make some fake stack-frame MEM references for use in
memory_move_secondary_cost. */
int
i
;
for
(
i
=
0
;
i
<
MAX_MACHINE_MODE
;
i
++
)
top_of_stack
[
i
]
=
gen_rtx
(
MEM
,
i
,
stack_pointer_rtx
);
}
#endif
}
}
#ifdef HAVE_SECONDARY_RELOADS
#ifdef HAVE_SECONDARY_RELOADS
/* Compute extra cost of moving registers to/from memory due to reloads.
/* Compute extra cost of moving registers to/from memory due to reloads.
Only needed if secondary reloads are required for memory moves. */
Only needed if secondary reloads are required for memory moves. */
int
int
memory_move_secondary_cost
(
mode
,
class
,
in
)
memory_move_secondary_cost
(
mode
,
class
,
in
)
enum
machine_mode
mode
;
enum
machine_mode
mode
;
...
@@ -435,23 +455,26 @@ memory_move_secondary_cost (mode, class, in)
...
@@ -435,23 +455,26 @@ memory_move_secondary_cost (mode, class, in)
{
{
enum
reg_class
altclass
;
enum
reg_class
altclass
;
int
partial_cost
=
0
;
int
partial_cost
=
0
;
rtx
mem
;
/* We need a memory reference to feed to SECONDARY... macros. */
/* We need a memory reference to feed to SECONDARY... macros. */
mem
=
gen_rtx
(
MEM
,
mode
,
stack_pointer_rtx
)
;
rtx
mem
=
top_of_stack
[(
int
)
mode
]
;
if
(
in
)
if
(
in
)
{
#ifdef SECONDARY_INPUT_RELOAD_CLASS
#ifdef SECONDARY_INPUT_RELOAD_CLASS
altclass
=
SECONDARY_INPUT_RELOAD_CLASS
(
class
,
mode
,
mem
);
altclass
=
SECONDARY_INPUT_RELOAD_CLASS
(
class
,
mode
,
mem
);
#else
#else
altclass
=
NO_REGS
;
altclass
=
NO_REGS
;
#endif
#endif
}
else
else
{
#ifdef SECONDARY_OUTPUT_RELOAD_CLASS
#ifdef SECONDARY_OUTPUT_RELOAD_CLASS
altclass
=
SECONDARY_OUTPUT_RELOAD_CLASS
(
class
,
mode
,
mem
);
altclass
=
SECONDARY_OUTPUT_RELOAD_CLASS
(
class
,
mode
,
mem
);
#else
#else
altclass
=
NO_REGS
;
altclass
=
NO_REGS
;
#endif
#endif
}
if
(
altclass
==
NO_REGS
)
if
(
altclass
==
NO_REGS
)
return
0
;
return
0
;
...
...
gcc/tm.texi
View file @
473fe49b
...
@@ -4574,22 +4574,25 @@ if the @samp{mov@var{m}} pattern's constraints do not allow such copying.
...
@@ -4574,22 +4574,25 @@ if the @samp{mov@var{m}} pattern's constraints do not allow such copying.
@item
MEMORY_MOVE_COST
(
@var{
mode
}
,
@var{
class
}
,
@var{
in
}
)
@item
MEMORY_MOVE_COST
(
@var{
mode
}
,
@var{
class
}
,
@var{
in
}
)
A
C
expression
for
the
cost
of
moving
data
of
mode
@var{
mode
}
between
a
A
C
expression
for
the
cost
of
moving
data
of
mode
@var{
mode
}
between
a
register
of
class
@var{
class
}
and
memory
;
@var{
in
}
is
zero
if
the
value
register
of
class
@var{
class
}
and
memory
;
@var{
in
}
is
zero
if
the
value
is
to
be
written
to
memory
,
non
-
zero
if
it
is
to
be
read
in
.
If
this
is
to
be
written
to
memory
,
non
-
zero
if
it
is
to
be
read
in
.
This
cost
macro
is
not
defined
,
the
default
cost
is
assumed
to
be
4
,
plus
any
costs
is
relative
to
those
in
@code{
REGISTER_MOVE_COST
}
.
If
moving
between
that
would
be
incurred
copying
via
a
secondary
reload
register
,
if
registers
and
memory
is
more
expensive
than
between
two
registers
,
you
needed
.
This
cost
is
relative
to
those
in
@code{
REGISTER_MOVE_COST
}
.
should
define
this
macro
to
express
the
relative
cost
.
If
moving
between
registers
and
memory
is
more
expensive
than
between
If
you
do
not
define
this
macro
,
GNU
CC
uses
a
default
cost
of
4
plus
two
registers
,
you
should
define
this
macro
to
express
the
relative
cost
.
the
cost
of
copying
copying
via
a
secondary
reload
register
,
if
one
is
needed
.
If
your
machine
requires
a
secondary
reload
register
to
copy
If
a
secondary
reload
register
would
be
required
for
@var{
class
}
,
but
the
between
memory
and
a
register
of
@var{
class
}
but
the
reload
mechanism
is
reload
mechanism
is
more
complex
than
copying
via
an
intermediate
,
this
more
complex
than
copying
via
an
intermediate
,
define
this
macro
to
macro
should
be
defined
to
reflect
the
actual
cost
of
the
move
.
reflect
the
actual
cost
of
the
move
.
The
function
@code{
memory_move_secondary_cost
}
,
which
is
defined
if
GNU
CC
defines
the
function
@code{
memory_move_secondary_cost
}
if
secondary
reloads
are
needed
,
will
compute
the
costs
due
to
copying
;
you
secondary
reloads
are
needed
.
It
computes
the
costs
due
to
copying
via
can
use
this
function
if
you
need
to
take
other
factors
into
account
as
a
secondary
register
.
If
your
machine
copies
from
memory
using
a
well
,
or
if
the
default
base
value
of
4
is
not
correct
for
your
machine
.
secondary
register
in
the
conventional
way
but
the
default
base
value
of
4
is
not
correct
for
your
machine
,
define
this
macro
to
add
some
other
value
to
the
result
of
that
function
.
The
arguments
to
that
function
are
the
same
as
to
this
macro
.
@findex
BRANCH_COST
@findex
BRANCH_COST
@item
BRANCH_COST
@item
BRANCH_COST
...
...
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