On 10/08/14 13:24, Ilya Enkovich wrote:
Hi,

This patch adds a bounds lifetime reduction into checker optimization.

Thanks,
Ilya
--
2014-10-08  Ilya Enkovich  <ilya.enkov...@intel.com>

        * tree-chkp.c (chkp_reduce_bounds_lifetime): New.
        (chkp_opt_execute): Run bounds lifetime reduction
        algorithm.
Basic tests & pull into a file with the other optimization work.

How expensive is nearest_common_dominator? Would it make more sense to use something like the concept of an anticipated expression from LCM?




+      /* Check we do not increase other values lifetime.  */
+      FOR_EACH_PHI_OR_STMT_USE (use_p, stmt, iter, SSA_OP_USE)
+       {
+         op = USE_FROM_PTR (use_p);
+
+         if (TREE_CODE (op) == SSA_NAME
+             && gimple_code (SSA_NAME_DEF_STMT (op)) != GIMPLE_NOP)
+           deps = true;
Might as well break out of the FOR_EACH_PHI_OR_STMT_USE loop here. Note that some of our iterators have special mechanisms to break out of the loop, but my recollection is those are for the immediate use iterators to ensure the marker is removed.

Code is probably OK if LCM/anticipated isn't reasonable and the above issues are dealt with.

jeff

Reply via email to