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
523fe5b6
Commit
523fe5b6
authored
Oct 07, 2019
by
Aldy Hernandez
Committed by
Aldy Hernandez
Oct 07, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Disentangle range_fold_*ary_expr() into various independent pieces.
From-SVN: r276654
parent
3faf75d4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
186 additions
and
114 deletions
+186
-114
gcc/ChangeLog
+20
-0
gcc/ipa-prop.c
+13
-3
gcc/ipa-prop.h
+1
-0
gcc/tree-vrp.c
+151
-111
gcc/tree-vrp.h
+1
-0
No files found.
gcc/ChangeLog
View file @
523fe5b6
2019-10-07 Aldy Hernandez <aldyh@redhat.com>
* ipa-prop.c (ipa_vr::nonzero_p): New.
(ipcp_update_vr): Use nonzero_p instead of open-coding check for
non-zero range.
* ipa-prop.h (class ipa_vr): Add nonzero_p.
* tree-vrp.c (range_has_numeric_bounds_p): New.
(range_int_cst_p): Use range_has_numeric_bounds_p.
(get_range_op_handler): New.
(supported_types_p): New.
(defined_ranges_p): New.
(drop_undefines_to_varying): New.
(range_fold_binary_symbolics_p): New.
(range_fold_unary_symbolics_p): New.
(range_fold_unary_expr): Extract out into above functions.
(range_fold_binary_expr): Same.
(value_range_base::normalize_addresses): New.
(value_range_base::normalize_symbolics): Normalize addresses.
* tree-vrp.h (class value_range_base): Add normalize_addresses.
2019-10-07 Aldy Hernandez <aldyh@redhat.com>
* tree-vrp.c (value_range_base::singleton_p): Use
value_range_base::num_pairs instead of vrp_val_is* to check
if a range has one sub-range.
...
...
gcc/ipa-prop.c
View file @
523fe5b6
...
...
@@ -5109,6 +5109,18 @@ ipcp_update_bits (struct cgraph_node *node)
}
}
bool
ipa_vr
::
nonzero_p
(
tree
expr_type
)
const
{
if
(
type
==
VR_ANTI_RANGE
&&
wi
::
eq_p
(
min
,
0
)
&&
wi
::
eq_p
(
max
,
0
))
return
true
;
unsigned
prec
=
TYPE_PRECISION
(
expr_type
);
return
(
type
==
VR_RANGE
&&
wi
::
eq_p
(
min
,
wi
::
one
(
prec
))
&&
wi
::
eq_p
(
max
,
wi
::
max_value
(
prec
,
TYPE_SIGN
(
expr_type
))));
}
/* Update value range of formal parameters as described in
ipcp_transformation. */
...
...
@@ -5181,9 +5193,7 @@ ipcp_update_vr (struct cgraph_node *node)
TYPE_SIGN
(
type
)));
}
else
if
(
POINTER_TYPE_P
(
TREE_TYPE
(
ddef
))
&&
vr
[
i
].
type
==
VR_ANTI_RANGE
&&
wi
::
eq_p
(
vr
[
i
].
min
,
0
)
&&
wi
::
eq_p
(
vr
[
i
].
max
,
0
))
&&
vr
[
i
].
nonzero_p
(
TREE_TYPE
(
ddef
)))
{
if
(
dump_file
)
fprintf
(
dump_file
,
"Setting nonnull for %u
\n
"
,
i
);
...
...
gcc/ipa-prop.h
View file @
523fe5b6
...
...
@@ -165,6 +165,7 @@ public:
enum
value_range_kind
type
;
wide_int
min
;
wide_int
max
;
bool
nonzero_p
(
tree
)
const
;
};
/* A jump function for a callsite represents the values passed as actual
...
...
gcc/tree-vrp.c
View file @
523fe5b6
This diff is collapsed.
Click to expand it.
gcc/tree-vrp.h
View file @
523fe5b6
...
...
@@ -86,6 +86,7 @@ public:
static
bool
supports_type_p
(
tree
);
value_range_base
normalize_symbolics
()
const
;
value_range_base
normalize_addresses
()
const
;
static
const
unsigned
int
m_max_pairs
=
2
;
bool
contains_p
(
tree
)
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