* @file
* @brief Optimizations regarding Confirm nodes.
* @author Michael Beck
- * @version $Id$
*/
#include "config.h"
/*
* 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.
+ * - Casts are skipped, Sels are skipped
* - A SymConst(entity) is NEVER a NULL pointer
* - Confirms are evaluated
*/
return 1;
assert(mode_is_reference(get_irn_mode(n)));
- if (get_opt_sel_based_null_check_elim()) {
- /* skip all Sel nodes and Cast's */
- while (is_Sel(n)) {
- n = skip_Cast(get_Sel_ptr(n));
- }
+ /* skip all Sel nodes and Cast's */
+ while (is_Sel(n)) {
+ n = skip_Cast(get_Sel_ptr(n));
}
while (1) {
if (is_Cast(n)) { n = get_Cast_op(n); continue; }
break;
}
- if (is_Global(n)) {
+ if (is_SymConst_addr_ent(n)) {
/* global references are never NULL */
return 1;
} else if (n == get_irg_frame(get_irn_irg(n))) {