https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125942

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at gcc dot gnu.org      |rguenth at gcc dot 
gnu.org
             Status|NEW                         |ASSIGNED

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
Cooking up sth along the following:

struct ginsert_iterator : private gimple_stmt_iterator
{
  ginsert_iterator (const gimple_stmt_iterator &gsi, bool before,
                    enum gsi_iterator_update update, bool without_update)
      : gimple_stmt_iterator (gsi), m_before (before), 
      m_without_update (without_update), m_update (update) {}

  /* Always forward-insertion, thus GSI_SAME_STMT for before and
     GSI_CONTINUE_LINKING for after.  */
  static ginsert_iterator before (gimple *);
  static ginsert_iterator before_without_update (gimple *);
  static ginsert_iterator after (gimple *);
  static ginsert_iterator after_without_update (gimple *);
  static ginsert_iterator after_labels (basic_block);

  /* Always append?  */
  static ginsert_iterator phis (basic_block);

  /* Always append?  Force through a sequence?  */
  static ginsert_iterator on_edge (edge); 

  static ginsert_iterator append (gimple_seq&);

  void insert (gimple *);
  void insert_seq (gimple_seq);

private:
  bool m_before;
  bool m_without_update;
  gsi_iterator_update m_update : 8; 
};

Reply via email to