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
e37135f7
Commit
e37135f7
authored
Jan 28, 2003
by
Richard Henderson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* cse.c (find_best_addr): Kill !ADDRESS_COST code.
From-SVN: r62008
parent
4334c467
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
27 deletions
+11
-27
gcc/ChangeLog
+5
-1
gcc/cse.c
+6
-26
No files found.
gcc/ChangeLog
View file @
e37135f7
2003
-
01
-
23
Mike
Stump
<
mrs
@apple
.
com
>
2003
-
01
-
28
Richard
Henderson
<
rth
@redhat
.
com
>
*
cse
.
c
(
find_best_addr
)
:
Kill
!
ADDRESS_COST
code
.
2003
-
01
-
23
Mike
Stump
<
mrs
@apple
.
com
>
*
regclass
.
c
(
init_reg_autoinc
)
:
New
function
.
(
regclass
)
:
Move
initialization
of
forbidden_inc_dec_class
from
...
...
gcc/cse.c
View file @
e37135f7
...
...
@@ -2870,13 +2870,12 @@ canon_reg (x, insn)
is a good approximation for that cost. However, most RISC machines have
only a few (usually only one) memory reference formats. If an address is
valid at all, it is often just as cheap as any other address. Hence, for
RISC machines, we use the configuration macro `ADDRESS_COST' to compare the
costs of various addresses. For two addresses of equal cost, choose the one
with the highest `rtx_cost' value as that has the potential of eliminating
the most insns. For equal costs, we choose the first in the equivalence
class. Note that we ignore the fact that pseudo registers are cheaper
than hard registers here because we would also prefer the pseudo registers.
*/
RISC machines, we use `address_cost' to compare the costs of various
addresses. For two addresses of equal cost, choose the one with the
highest `rtx_cost' value as that has the potential of eliminating the
most insns. For equal costs, we choose the first in the equivalence
class. Note that we ignore the fact that pseudo registers are cheaper than
hard registers here because we would also prefer the pseudo registers. */
static
void
find_best_addr
(
insn
,
loc
,
mode
)
...
...
@@ -2886,10 +2885,8 @@ find_best_addr (insn, loc, mode)
{
struct
table_elt
*
elt
;
rtx
addr
=
*
loc
;
#ifdef ADDRESS_COST
struct
table_elt
*
p
;
int
found_better
=
1
;
#endif
int
save_do_not_record
=
do_not_record
;
int
save_hash_arg_in_memory
=
hash_arg_in_memory
;
int
addr_volatile
;
...
...
@@ -2953,22 +2950,6 @@ find_best_addr (insn, loc, mode)
elt
=
lookup
(
addr
,
hash
,
Pmode
);
#ifndef ADDRESS_COST
if
(
elt
)
{
int
our_cost
=
elt
->
cost
;
/* Find the lowest cost below ours that works. */
for
(
elt
=
elt
->
first_same_value
;
elt
;
elt
=
elt
->
next_same_value
)
if
(
elt
->
cost
<
our_cost
&&
(
GET_CODE
(
elt
->
exp
)
==
REG
||
exp_equiv_p
(
elt
->
exp
,
elt
->
exp
,
1
,
0
))
&&
validate_change
(
insn
,
loc
,
canon_reg
(
copy_rtx
(
elt
->
exp
),
NULL_RTX
),
0
))
return
;
}
#else
if
(
elt
)
{
/* We need to find the best (under the criteria documented above) entry
...
...
@@ -3099,7 +3080,6 @@ find_best_addr (insn, loc, mode)
}
}
}
#endif
}
/* Given an operation (CODE, *PARG1, *PARG2), where code is a comparison
...
...
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