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
84d8756d
Commit
84d8756d
authored
Apr 29, 2003
by
Richard Kenner
Committed by
Richard Kenner
Apr 29, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* tree.c (save_expr): Don't fold a COMPONENT_REF.
From-SVN: r66264
parent
1f6f0cb6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
2 deletions
+13
-2
gcc/ChangeLog
+4
-0
gcc/tree.c
+9
-2
No files found.
gcc/ChangeLog
View file @
84d8756d
2003-04-29 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* tree.c (save_expr): Don't fold a COMPONENT_REF.
2003-04-29 Olivier Hainque <hainque@act-europe.fr>
2003-04-29 Olivier Hainque <hainque@act-europe.fr>
* calls.c (expand_call): When modes of target and valreg match, force
* calls.c (expand_call): When modes of target and valreg match, force
...
...
gcc/tree.c
View file @
84d8756d
...
@@ -1378,14 +1378,21 @@ tree
...
@@ -1378,14 +1378,21 @@ tree
save_expr
(
expr
)
save_expr
(
expr
)
tree
expr
;
tree
expr
;
{
{
tree
t
=
fold
(
expr
);
tree
t
=
expr
;
tree
inner
=
skip_simple_arithmetic
(
t
);
tree
inner
;
/* Don't fold a COMPONENT_EXPR: if the operand was a CONSTRUCTOR (the
only time it will fold), it can cause problems with PLACEHOLDER_EXPRs
in Ada. Moreover, it isn't at all clear why we fold here at all. */
if
(
TREE_CODE
(
t
)
!=
COMPONENT_REF
)
t
=
fold
(
t
);
/* If the tree evaluates to a constant, then we don't want to hide that
/* If the tree evaluates to a constant, then we don't want to hide that
fact (i.e. this allows further folding, and direct checks for constants).
fact (i.e. this allows further folding, and direct checks for constants).
However, a read-only object that has side effects cannot be bypassed.
However, a read-only object that has side effects cannot be bypassed.
Since it is no problem to reevaluate literals, we just return the
Since it is no problem to reevaluate literals, we just return the
literal node. */
literal node. */
inner
=
skip_simple_arithmetic
(
t
);
if
(
TREE_CONSTANT
(
inner
)
if
(
TREE_CONSTANT
(
inner
)
||
(
TREE_READONLY
(
inner
)
&&
!
TREE_SIDE_EFFECTS
(
inner
))
||
(
TREE_READONLY
(
inner
)
&&
!
TREE_SIDE_EFFECTS
(
inner
))
||
TREE_CODE
(
inner
)
==
SAVE_EXPR
||
TREE_CODE
(
inner
)
==
SAVE_EXPR
...
...
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