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
3aa77500
Commit
3aa77500
authored
Oct 06, 1993
by
Richard Stallman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Comment change.
From-SVN: r5629
parent
13a7eb33
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
4 deletions
+22
-4
gcc/tree.c
+22
-4
No files found.
gcc/tree.c
View file @
3aa77500
...
...
@@ -1828,10 +1828,28 @@ staticp (arg)
return
0
;
}
/* This should be applied to any node which may be used in more than one place,
but must be evaluated only once. Normally, the code generator would
reevaluate the node each time; this forces it to compute it once and save
the result. This is done by encapsulating the node in a SAVE_EXPR. */
/* Wrap a SAVE_EXPR around EXPR, if appropriate.
Do this to any expression which may be used in more than one place,
but must be evaluated only once.
Normally, expand_expr would reevaluate the expression each time.
Calling save_expr produces something that is evaluated and recorded
the first time expand_expr is called on it. Subsequent calls to
expand_expr just reuse the recorded value.
The call to expand_expr that generates code that actually computes
the value is the first call *at compile time*. Subsequent calls
*at compile time* generate code to use the saved value.
This produces correct result provided that *at run time* control
always flows through the insns made by the first expand_expr
before reaching the other places where the save_expr was evaluated.
You, the caller of save_expr, must make sure this is so.
Constants, and certain read-only nodes, are returned with no
SAVE_EXPR because that is safe. Expressions containing placeholders
are not touched. (Kenner, please add a cross reference to where
placeholders are explained, so people can learn the basics for
understanding this.) */
tree
save_expr
(
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