projects
/
libfirm
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
852017a
)
Skip Cats nodes in non_null check
author
Michael Beck
<beck@ipd.info.uni-karlsruhe.de>
Fri, 27 Jan 2006 05:11:16 +0000
(
05:11
+0000)
committer
Michael Beck
<beck@ipd.info.uni-karlsruhe.de>
Fri, 27 Jan 2006 05:11:16 +0000
(
05:11
+0000)
[r7275]
ir/opt/opt_confirms.c
patch
|
blob
|
history
diff --git
a/ir/opt/opt_confirms.c
b/ir/opt/opt_confirms.c
index
5a481e2
..
ee23ee5
100644
(file)
--- a/
ir/opt/opt_confirms.c
+++ b/
ir/opt/opt_confirms.c
@@
-147,6
+147,7
@@
int value_not_zero(ir_node *n)
/*
* Check, if the value of a node cannot represent a NULL pointer.
*
/*
* Check, if the value of a node cannot represent a NULL pointer.
*
+ * - Casts are skipped
* - If sel_based_null_check_elim is enabled, all
* Sel nodes can be skipped.
* - A SymConst(entity) is NEVER a NULL pointer
* - If sel_based_null_check_elim is enabled, all
* Sel nodes can be skipped.
* - A SymConst(entity) is NEVER a NULL pointer
@@
-154,13
+155,15
@@
int value_not_zero(ir_node *n)
*/
int value_not_null(ir_node *n)
{
*/
int value_not_null(ir_node *n)
{
- ir_op *op
= get_irn_op(n)
;
+ ir_op *op;
+ n = skip_Cast(n);
+ op = get_irn_op(n);
assert(mode_is_reference(get_irn_mode(n)));
if (get_opt_sel_based_null_check_elim()) {
assert(mode_is_reference(get_irn_mode(n)));
if (get_opt_sel_based_null_check_elim()) {
- /* skip all Sel nodes */
+ /* skip all Sel nodes
and Cast's
*/
while (op == op_Sel) {
while (op == op_Sel) {
- n =
get_Sel_ptr(n
);
+ n =
skip_Cast(get_Sel_ptr(n)
);
op = get_irn_op(n);
}
}
op = get_irn_op(n);
}
}