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
8b7b2e36
Commit
8b7b2e36
authored
May 06, 1994
by
Richard Kenner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(CONST_COSTS): Revise all costs.
From-SVN: r7225
parent
71923da7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
4 deletions
+15
-4
gcc/config/alpha/alpha.h
+15
-4
No files found.
gcc/config/alpha/alpha.h
View file @
8b7b2e36
...
...
@@ -1312,17 +1312,28 @@ extern char *current_function_name;
of a switch statement. If the code is computed here,
return it with a return statement. Otherwise, break from the switch.
We only care about the cost if it is valid in an insn, so all constants
are cheap. */
If this is an 8-bit constant, return zero since it can be used
nearly anywhere with no cost. If it is a valid operand for an
ADD or AND, likewise return 0 if we know it will be used in that
context. Otherwise, return 2 since it might be used there later.
All other constants take at least two insns. */
#define CONST_COSTS(RTX,CODE,OUTER_CODE) \
case CONST_INT: \
if (INTVAL (RTX) >= 0 && INTVAL (RTX) < 2546) \
return 0; \
case CONST_DOUBLE: \
return 0; \
if (((OUTER_CODE) == PLUS && add_operand (RTX, VOIDmode)) \
|| ((OUTER_CODE) == AND && and_operand (RTX, VOIDmode))) \
return 0; \
else if (add_operand (RTX, VOIDmode) || and_operand (RTX, VOIDmode)) \
return 2; \
else \
return COSTS_N_INSNS (2); \
case CONST: \
case SYMBOL_REF: \
case LABEL_REF: \
return
6; \
return
COSTS_N_INSNS (3);
/* Provide the costs of a rtl expression. This is in the body of a
switch on CODE. */
...
...
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