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
258dba8f
Commit
258dba8f
authored
Feb 18, 2005
by
Jason Merrill
Committed by
Jason Merrill
Feb 18, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* gimplify.c (gimplify_modify_expr_rhs) [CALL_EXPR]: Revert again.
From-SVN: r95231
parent
aecc0cf0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
63 deletions
+4
-63
gcc/ChangeLog
+4
-0
gcc/gimplify.c
+0
-63
No files found.
gcc/ChangeLog
View file @
258dba8f
2005-02-18 Jason Merrill <jason@redhat.com>
* gimplify.c (gimplify_modify_expr_rhs) [CALL_EXPR]: Revert again.
2005-02-18 Richard Earnshaw <rearnsha@arm.com>
* arm/lib1funcs.asm (FUNC_ALIAS): New macro.
...
...
gcc/gimplify.c
View file @
258dba8f
...
...
@@ -2913,69 +2913,6 @@ gimplify_modify_expr_rhs (tree *expr_p, tree *from_p, tree *to_p, tree *pre_p,
ret
=
GS_UNHANDLED
;
break
;
case
CALL_EXPR
:
/* For calls that return in memory, give *to_p as the CALL_EXPR's
return slot so that we don't generate a temporary. */
if
(
aggregate_value_p
(
*
from_p
,
*
from_p
))
{
tree
init
=
*
from_p
;
tree
fn
=
TREE_OPERAND
(
init
,
0
);
tree
args
=
TREE_OPERAND
(
init
,
1
);
tree
rettype
=
TREE_TYPE
(
TREE_TYPE
(
TREE_TYPE
(
fn
)));
tree
arg
=
*
to_p
;
tree
type
;
/* Only use the original target if *to_p isn't already
addressable; if its address escapes, and the called function
uses the NRV optimization, a conforming program could see
*to_p change before the called function returns. This is
c++/19317. */
bool
use_temp
=
!
is_gimple_non_addressable
(
*
to_p
);
/* A CALL_EXPR with an explicit return slot argument should
never appear on the RHS of a MODIFY_EXPR. */
if
(
CALL_EXPR_HAS_RETURN_SLOT_ADDR
(
*
from_p
))
abort
();
if
(
use_temp
)
{
arg
=
create_tmp_var
(
rettype
,
"ret"
);
*
from_p
=
arg
;
}
type
=
TREE_TYPE
(
arg
);
/* FIXME: Mark the address as not escaping. */
lang_hooks
.
mark_addressable
(
arg
);
arg
=
build1
(
ADDR_EXPR
,
build_pointer_type
(
type
),
arg
);
/* The return type might have different cv-quals from arg. */
arg
=
convert
(
build_pointer_type
(
rettype
),
arg
);
args
=
tree_cons
(
NULL_TREE
,
arg
,
args
);
init
=
build3
(
CALL_EXPR
,
rettype
,
fn
,
args
,
NULL_TREE
);
CALL_EXPR_HAS_RETURN_SLOT_ADDR
(
init
)
=
1
;
TREE_USED
(
init
)
=
1
;
if
(
use_temp
)
{
gimplify_and_add
(
init
,
pre_p
);
ret
=
GS_OK
;
break
;
}
else
if
(
want_value
)
{
gimplify_and_add
(
init
,
pre_p
);
*
expr_p
=
*
to_p
;
return
GS_OK
;
}
else
{
*
expr_p
=
init
;
return
GS_OK
;
}
}
else
ret
=
GS_UNHANDLED
;
break
;
default:
ret
=
GS_UNHANDLED
;
break
;
...
...
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