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
f49278e6
Commit
f49278e6
authored
Jun 19, 2012
by
Richard Henderson
Committed by
Richard Henderson
Jun 19, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Set cache parameters for alpha
From-SVN: r188794
parent
70f42967
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
59 additions
and
17 deletions
+59
-17
gcc/ChangeLog
+6
-0
gcc/config/alpha/alpha.c
+53
-17
No files found.
gcc/ChangeLog
View file @
f49278e6
2012-06-19 Richard Henderson <rth@redhat.com>
* config/alpha/alpha.c: Include params.h.
(alpha_option_override): Initialize PARAM_L1_CACHE_LINE_SIZE,
PARAM_L1_CACHE_SIZE, PARAM_L2_CACHE_SIZE for the cpu tuning.
2012-06-19 Steven Bosscher <steven@gcc.gnu.org>
2012-06-19 Steven Bosscher <steven@gcc.gnu.org>
* doc/tm.texi.in (TARGET_OBJC_DECLARE_UNRESOLVED_CLASS_REFERENCE,
* doc/tm.texi.in (TARGET_OBJC_DECLARE_UNRESOLVED_CLASS_REFERENCE,
...
...
gcc/config/alpha/alpha.c
View file @
f49278e6
...
@@ -57,6 +57,7 @@ along with GCC; see the file COPYING3. If not see
...
@@ -57,6 +57,7 @@ along with GCC; see the file COPYING3. If not see
#include "df.h"
#include "df.h"
#include "libfuncs.h"
#include "libfuncs.h"
#include "opts.h"
#include "opts.h"
#include "params.h"
/* Specify which cpu to schedule for. */
/* Specify which cpu to schedule for. */
enum
processor_type
alpha_tune
;
enum
processor_type
alpha_tune
;
...
@@ -224,24 +225,40 @@ alpha_option_override (void)
...
@@ -224,24 +225,40 @@ alpha_option_override (void)
const
char
*
const
name
;
const
char
*
const
name
;
const
enum
processor_type
processor
;
const
enum
processor_type
processor
;
const
int
flags
;
const
int
flags
;
const
unsigned
short
line_size
;
/* in bytes */
const
unsigned
short
l1_size
;
/* in kb. */
const
unsigned
short
l2_size
;
/* in kb. */
}
cpu_table
[]
=
{
}
cpu_table
[]
=
{
{
"ev4"
,
PROCESSOR_EV4
,
0
},
/* EV4/LCA45 had 8k L1 caches; EV45 had 16k L1 caches.
{
"ev45"
,
PROCESSOR_EV4
,
0
},
EV4/EV45 had 128k to 16M 32-byte direct Bcache. LCA45
{
"21064"
,
PROCESSOR_EV4
,
0
},
had 64k to 8M 8-byte direct Bcache. */
{
"ev5"
,
PROCESSOR_EV5
,
0
},
{
"ev4"
,
PROCESSOR_EV4
,
0
,
32
,
8
,
8
*
1024
},
{
"21164"
,
PROCESSOR_EV5
,
0
},
{
"21064"
,
PROCESSOR_EV4
,
0
,
32
,
8
,
8
*
1024
},
{
"ev56"
,
PROCESSOR_EV5
,
MASK_BWX
},
{
"ev45"
,
PROCESSOR_EV4
,
0
,
32
,
16
,
16
*
1024
},
{
"21164a"
,
PROCESSOR_EV5
,
MASK_BWX
},
{
"pca56"
,
PROCESSOR_EV5
,
MASK_BWX
|
MASK_MAX
},
/* EV5 or EV56 had 8k 32 byte L1, 96k 32 or 64 byte L2,
{
"21164PC"
,
PROCESSOR_EV5
,
MASK_BWX
|
MASK_MAX
},
and 1M to 16M 64 byte L3 (not modeled).
{
"21164pc"
,
PROCESSOR_EV5
,
MASK_BWX
|
MASK_MAX
},
PCA56 had 16k 64-byte cache; PCA57 had 32k Icache.
{
"ev6"
,
PROCESSOR_EV6
,
MASK_BWX
|
MASK_MAX
|
MASK_FIX
},
PCA56 had 8k 64-byte cache; PCA57 had 16k Dcache. */
{
"21264"
,
PROCESSOR_EV6
,
MASK_BWX
|
MASK_MAX
|
MASK_FIX
},
{
"ev5"
,
PROCESSOR_EV5
,
0
,
32
,
8
,
96
},
{
"ev67"
,
PROCESSOR_EV6
,
MASK_BWX
|
MASK_MAX
|
MASK_FIX
|
MASK_CIX
},
{
"21164"
,
PROCESSOR_EV5
,
0
,
32
,
8
,
96
},
{
"21264a"
,
PROCESSOR_EV6
,
MASK_BWX
|
MASK_MAX
|
MASK_FIX
|
MASK_CIX
}
{
"ev56"
,
PROCESSOR_EV5
,
MASK_BWX
,
32
,
8
,
96
},
{
"21164a"
,
PROCESSOR_EV5
,
MASK_BWX
,
32
,
8
,
96
},
{
"pca56"
,
PROCESSOR_EV5
,
MASK_BWX
|
MASK_MAX
,
64
,
16
,
4
*
1024
},
{
"21164PC"
,
PROCESSOR_EV5
,
MASK_BWX
|
MASK_MAX
,
64
,
16
,
4
*
1024
},
{
"21164pc"
,
PROCESSOR_EV5
,
MASK_BWX
|
MASK_MAX
,
64
,
16
,
4
*
1024
},
/* EV6 had 64k 64 byte L1, 1M to 16M Bcache. */
{
"ev6"
,
PROCESSOR_EV6
,
MASK_BWX
|
MASK_MAX
|
MASK_FIX
,
64
,
64
,
16
*
1024
},
{
"21264"
,
PROCESSOR_EV6
,
MASK_BWX
|
MASK_MAX
|
MASK_FIX
,
64
,
64
,
16
*
1024
},
{
"ev67"
,
PROCESSOR_EV6
,
MASK_BWX
|
MASK_MAX
|
MASK_FIX
|
MASK_CIX
,
64
,
64
,
16
*
1024
},
{
"21264a"
,
PROCESSOR_EV6
,
MASK_BWX
|
MASK_MAX
|
MASK_FIX
|
MASK_CIX
,
64
,
64
,
16
*
1024
}
};
};
int
const
ct_size
=
ARRAY_SIZE
(
cpu_table
);
int
const
ct_size
=
ARRAY_SIZE
(
cpu_table
);
int
line_size
=
0
,
l1_size
=
0
,
l2_size
=
0
;
int
i
;
int
i
;
#ifdef SUBTARGET_OVERRIDE_OPTIONS
#ifdef SUBTARGET_OVERRIDE_OPTIONS
...
@@ -314,9 +331,12 @@ alpha_option_override (void)
...
@@ -314,9 +331,12 @@ alpha_option_override (void)
for
(
i
=
0
;
i
<
ct_size
;
i
++
)
for
(
i
=
0
;
i
<
ct_size
;
i
++
)
if
(
!
strcmp
(
alpha_cpu_string
,
cpu_table
[
i
].
name
))
if
(
!
strcmp
(
alpha_cpu_string
,
cpu_table
[
i
].
name
))
{
{
alpha_tune
=
alpha_cpu
=
cpu_table
[
i
].
processor
;
alpha_tune
=
alpha_cpu
=
cpu_table
[
i
].
processor
;
line_size
=
cpu_table
[
i
].
line_size
;
l1_size
=
cpu_table
[
i
].
l1_size
;
l2_size
=
cpu_table
[
i
].
l2_size
;
target_flags
&=
~
(
MASK_BWX
|
MASK_MAX
|
MASK_FIX
|
MASK_CIX
);
target_flags
&=
~
(
MASK_BWX
|
MASK_MAX
|
MASK_FIX
|
MASK_CIX
);
target_flags
|=
cpu_table
[
i
].
flags
;
target_flags
|=
cpu_table
[
i
].
flags
;
break
;
break
;
}
}
if
(
i
==
ct_size
)
if
(
i
==
ct_size
)
...
@@ -328,13 +348,29 @@ alpha_option_override (void)
...
@@ -328,13 +348,29 @@ alpha_option_override (void)
for
(
i
=
0
;
i
<
ct_size
;
i
++
)
for
(
i
=
0
;
i
<
ct_size
;
i
++
)
if
(
!
strcmp
(
alpha_tune_string
,
cpu_table
[
i
].
name
))
if
(
!
strcmp
(
alpha_tune_string
,
cpu_table
[
i
].
name
))
{
{
alpha_tune
=
cpu_table
[
i
].
processor
;
alpha_tune
=
cpu_table
[
i
].
processor
;
line_size
=
cpu_table
[
i
].
line_size
;
l1_size
=
cpu_table
[
i
].
l1_size
;
l2_size
=
cpu_table
[
i
].
l2_size
;
break
;
break
;
}
}
if
(
i
==
ct_size
)
if
(
i
==
ct_size
)
error
(
"bad value %qs for -mtune switch"
,
alpha_tune_string
);
error
(
"bad value %qs for -mtune switch"
,
alpha_tune_string
);
}
}
if
(
line_size
)
maybe_set_param_value
(
PARAM_L1_CACHE_LINE_SIZE
,
line_size
,
global_options
.
x_param_values
,
global_options_set
.
x_param_values
);
if
(
l1_size
)
maybe_set_param_value
(
PARAM_L1_CACHE_SIZE
,
l1_size
,
global_options
.
x_param_values
,
global_options_set
.
x_param_values
);
if
(
l2_size
)
maybe_set_param_value
(
PARAM_L2_CACHE_SIZE
,
l2_size
,
global_options
.
x_param_values
,
global_options_set
.
x_param_values
);
/* Do some sanity checks on the above options. */
/* Do some sanity checks on the above options. */
if
((
alpha_fptm
==
ALPHA_FPTM_SU
||
alpha_fptm
==
ALPHA_FPTM_SUI
)
if
((
alpha_fptm
==
ALPHA_FPTM_SU
||
alpha_fptm
==
ALPHA_FPTM_SUI
)
...
...
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