+ * Checks if a node is a non-null Confirm.
+ */
+static int is_non_null_Confirm(const ir_node *ptr) {
+ for (;;) {
+ if (! is_Confirm(ptr))
+ break;
+ if (get_Confirm_cmp(ptr) == pn_Cmp_Lg) {
+ ir_node *bound = get_Confirm_bound(ptr);
+
+ if (is_Const(bound) && is_Const_null(bound))
+ return 1;
+ }
+ ptr = get_Confirm_value(ptr);
+ }
+ /*
+ * While a SymConst is not a Confirm, it is non-null
+ * anyway. This helps to reduce the number of
+ * constructed Confirms.
+ */
+ if (is_SymConst_addr_ent(ptr))
+ return 1;
+ return 0;
+} /* is_non_null_Confirm */
+
+/**
+ * The given pointer will be dereferenced, add non-null Confirms.