This is the mail archive of the
mailing list for the GCC project.
Re: [patch] PR middle-end/43631
- From: Eric Botcazou <ebotcazou at adacore dot com>
- To: Steven Bosscher <stevenb dot gcc at gmail dot com>
- Cc: gcc-patches at gcc dot gnu dot org, Jakub Jelinek <jakub at redhat dot com>, Alexandre Oliva <aoliva at redhat dot com>
- Date: Mon, 15 Apr 2013 11:20:46 +0200
- Subject: Re: [patch] PR middle-end/43631
- References: <CABu31nPmRrkRfqjbYq-kfqHgjVxiYuvG9wvB+Z3sw_CgPd+GQw at mail dot gmail dot com> <CABu31nNFYZPH7f4-G8YYuXG-_tam=dm40KHfG8YCTDd9nQLpSQ at mail dot gmail dot com> <CABu31nOEO8+hAWQTwK2CQ116L68LsbzzjtFN7QYaQKHEChEDZg at mail dot gmail dot com>
> This didn't really help make things look prettier. The notes are
> enumerated in many other places, for various purposes. I didn't like
> special-casing this one INSN_NOTE oddity when there are so many others
> already. So I created a note_outside_basic_block_p instead, I hope you
> agree with this approach.
Sure, thanks for investigating the proposal in any case.
> Updated patch attached, similarly tested. OK for trunk?
Yes, modulo a few nits:
+/* Like add_insn_after, but try to set BLOCK_FOR_INSN.
+ If BB is NULL, an attempt is made to infer the bb from before.
+ This and the next function should be the only functions called
+ to insert an insn once delay slots have been filled since only
+ they know how to update a SEQUENCE. */
+add_insn_after (rtx insn, rtx after, basic_block bb)
Like add_insn_after_nobb, ...
-/* Add INSN into the doubly-linked list before insn BEFORE. This and
- the previous should be the only functions called to insert an insn
- once delay slots have been filled since only they know how to
- update a SEQUENCE. If BB is NULL, an attempt is made to infer the
- bb from before. */
+/* Like add_insn_before_nobb, but try to set BLOCK_FOR_INSN.
+ If BB is NULL, an attempt is made to infer the bb from before. */
add_insn_before (rtx insn, rtx before, basic_block bb)
Keep the blurb about SEQUENCEs: "This and the previous function should..."
+/* Return true iff a note of kind SUBTYPE should be emitted with via
+ routines that never set BLOCK_FOR_INSN on NOTE. BB_BOUNDARY is true
+ if the caller is asked to emit a note before BB_HEAD, or after BB_END. */
Superfluous "with" or "via".
+note_outside_basic_block_p (enum insn_note subtype, bool on_bb_boundary_p)
This should be implemented with a switch statement.