+
+/* Determine whether JFUNC evaluates to a constant and if so, return it.
+ Otherwise return NULL. INFO describes the caller node so that pass-through
+ jump functions can be evaluated. */
+
+tree
+ipa_cst_from_jfunc (struct ipa_node_params *info, struct ipa_jump_func *jfunc)
+{
+ struct ipcp_lattice lat;
+
+ ipa_lattice_from_jfunc (info, &lat, jfunc);
+ if (lat.type == IPA_CONST_VALUE)
+ return lat.constant;
+ else
+ return NULL_TREE;
+}