On 08/03/14 07:39, Richard Sandiford wrote:
This patch adds the new iterators.


gcc/
        * rtl-iter.h: New file.
        * rtlanal.c: Include it.
        (rtx_all_subrtx_bounds, rtx_nonconst_subrtx_bounds): New variables.
        (generic_subrtx_iterator <T>::add_single_to_queue)
        (generic_subrtx_iterator <T>::add_subrtxes_to_queue)
        (generic_subrtx_iterator <T>::free_array): New functions.
        (generic_subrtx_iterator <T>::LOCAL_ELEMS): Define.
        (generic_subrtx_iterator <const_rtx_accessor>)
        (generic_subrtx_iterator <rtx_var_accessor>
        (generic_subrtx_iterator <rtx_ptr_accessor>): Instantiate.
        (setup_reg_subrtx_bounds): New function.
        (init_rtlanal): Call it.
OK.  Just one nit...



+
+/* This structure describes the subrtxes of an rtx as follows:
+
+   - if the rtx has no subrtxes, START and COUNT are both 0.
Seems reasonable.


+static inline bool
+leaf_code_p (enum rtx_code code)
+{
+  return rtx_all_subrtx_bounds[code].count == 0;
+}
But we only check COUNT here.

It's a minor inconsistency.  Your call what (if anything) to do about it.

Jeff

Reply via email to