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
fae111c1
Commit
fae111c1
authored
Sep 08, 2003
by
Roger Sayle
Committed by
Roger Sayle
Sep 08, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* fold-const.c (operand_equal_p): Clarify documentation.
From-SVN: r71214
parent
fa531100
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
2 deletions
+20
-2
gcc/ChangeLog
+4
-0
gcc/fold-const.c
+16
-2
No files found.
gcc/ChangeLog
View file @
fae111c1
2003-09-08 Roger Sayle <roger@eyesopen.com>
* fold-const.c (operand_equal_p): Clarify documentation.
2003-09-08 Richard Henderson <rth@redhat.com>
2003-09-08 Richard Henderson <rth@redhat.com>
* c-decl.c (c_expand_body_1): Push and pop function context here.
* c-decl.c (c_expand_body_1): Push and pop function context here.
...
...
gcc/fold-const.c
View file @
fae111c1
...
@@ -1822,13 +1822,27 @@ truth_value_p (enum tree_code code)
...
@@ -1822,13 +1822,27 @@ truth_value_p (enum tree_code code)
||
code
==
TRUTH_XOR_EXPR
||
code
==
TRUTH_NOT_EXPR
);
||
code
==
TRUTH_XOR_EXPR
||
code
==
TRUTH_NOT_EXPR
);
}
}
/* Return nonzero if two operands are necessarily equal.
/* Return nonzero if two operands (typically of the same tree node)
are necessarily equal. If either argument has side-effects this
function returns zero.
If ONLY_CONST is nonzero, only return nonzero for constants.
If ONLY_CONST is nonzero, only return nonzero for constants.
This function tests whether the operands are indistinguishable;
This function tests whether the operands are indistinguishable;
it does not test whether they are equal using C's == operation.
it does not test whether they are equal using C's == operation.
The distinction is important for IEEE floating point, because
The distinction is important for IEEE floating point, because
(1) -0.0 and 0.0 are distinguishable, but -0.0==0.0, and
(1) -0.0 and 0.0 are distinguishable, but -0.0==0.0, and
(2) two NaNs may be indistinguishable, but NaN!=NaN. */
(2) two NaNs may be indistinguishable, but NaN!=NaN.
If ONLY_CONST is zero, a VAR_DECL is considered equal to itself
even though it may hold multiple values during a function.
This is because a GCC tree node guarantees that nothing else is
executed between the evaluation of its "operands" (which may often
be evaluated in arbitrary order). Hence if the operands themselves
don't side-effect, the VAR_DECLs, PARM_DECLs etc... must hold the
same value in each operand/subexpression. Hence a zero value for
ONLY_CONST assumes isochronic (or instantaneous) tree equivalence.
If comparing arbitrary expression trees, such as from different
statements, ONLY_CONST must usually be non-zero. */
int
int
operand_equal_p
(
tree
arg0
,
tree
arg1
,
int
only_const
)
operand_equal_p
(
tree
arg0
,
tree
arg1
,
int
only_const
)
...
...
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