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
040968a8
Commit
040968a8
authored
Jan 28, 2015
by
Jan Hubicka
Committed by
Jan Hubicka
Jan 28, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* lto-symtab.c (lto_varpool_replace_node): Merge TLS models.
From-SVN: r220214
parent
b1474d30
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
5 deletions
+42
-5
gcc/lto/ChangeLog
+4
-0
gcc/lto/lto-symtab.c
+38
-5
No files found.
gcc/lto/ChangeLog
View file @
040968a8
2014-12-11 Jan Hubicka <hubicka@ucw.cz>
2014-12-11 Jan Hubicka <hubicka@ucw.cz>
* lto-symtab.c (lto_varpool_replace_node): Merge TLS models.
2014-12-11 Jan Hubicka <hubicka@ucw.cz>
* lto.c (compare_tree_sccs_1): Add comparsion of
* lto.c (compare_tree_sccs_1): Add comparsion of
DECL_FUNCTION_SPECIFIC_TARGET
DECL_FUNCTION_SPECIFIC_TARGET
...
...
gcc/lto/lto-symtab.c
View file @
040968a8
...
@@ -158,11 +158,44 @@ lto_varpool_replace_node (varpool_node *vnode,
...
@@ -158,11 +158,44 @@ lto_varpool_replace_node (varpool_node *vnode,
if
(
vnode
->
tls_model
!=
prevailing_node
->
tls_model
)
if
(
vnode
->
tls_model
!=
prevailing_node
->
tls_model
)
{
{
error_at
(
DECL_SOURCE_LOCATION
(
vnode
->
decl
),
bool
error
=
false
;
"%qD is defined as %s"
,
vnode
->
decl
,
tls_model_names
[
vnode
->
tls_model
]);
inform
(
DECL_SOURCE_LOCATION
(
prevailing_node
->
decl
),
/* Non-TLS and TLS never mix together. Also emulated model is not
"previously defined here as %s"
,
compatible with anything else. */
tls_model_names
[
prevailing_node
->
tls_model
]);
if
(
prevailing_node
->
tls_model
==
TLS_MODEL_NONE
||
prevailing_node
->
tls_model
==
TLS_MODEL_EMULATED
||
vnode
->
tls_model
==
TLS_MODEL_NONE
||
vnode
->
tls_model
==
TLS_MODEL_EMULATED
)
error
=
true
;
/* Linked is silently supporting transitions
GD -> IE, GD -> LE, LD -> LE, IE -> LE, LD -> IE.
Do the same transitions and error out on others. */
else
if
((
prevailing_node
->
tls_model
==
TLS_MODEL_REAL
||
prevailing_node
->
tls_model
==
TLS_MODEL_LOCAL_DYNAMIC
)
&&
(
vnode
->
tls_model
==
TLS_MODEL_INITIAL_EXEC
||
vnode
->
tls_model
==
TLS_MODEL_LOCAL_EXEC
))
prevailing_node
->
tls_model
=
vnode
->
tls_model
;
else
if
((
vnode
->
tls_model
==
TLS_MODEL_REAL
||
vnode
->
tls_model
==
TLS_MODEL_LOCAL_DYNAMIC
)
&&
(
prevailing_node
->
tls_model
==
TLS_MODEL_INITIAL_EXEC
||
prevailing_node
->
tls_model
==
TLS_MODEL_LOCAL_EXEC
))
;
else
if
(
prevailing_node
->
tls_model
==
TLS_MODEL_INITIAL_EXEC
&&
vnode
->
tls_model
==
TLS_MODEL_LOCAL_EXEC
)
prevailing_node
->
tls_model
=
vnode
->
tls_model
;
else
if
(
vnode
->
tls_model
==
TLS_MODEL_INITIAL_EXEC
&&
prevailing_node
->
tls_model
==
TLS_MODEL_LOCAL_EXEC
)
;
else
error
=
true
;
if
(
error
)
{
error_at
(
DECL_SOURCE_LOCATION
(
vnode
->
decl
),
"%qD is defined with tls model %s"
,
vnode
->
decl
,
tls_model_names
[
vnode
->
tls_model
]);
inform
(
DECL_SOURCE_LOCATION
(
prevailing_node
->
decl
),
"previously defined here as %s"
,
tls_model_names
[
prevailing_node
->
tls_model
]);
}
}
}
/* Finally remove the replaced node. */
/* Finally remove the replaced node. */
vnode
->
remove
();
vnode
->
remove
();
...
...
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