On 10/12/2016 01:15 PM, David Malcolm wrote:
+/* Determine if INSN is of a kind that can have a basic block.  */
+static bool
+can_have_basic_block_p (const rtx_insn *insn)
+  return GET_RTX_FORMAT (GET_CODE (insn))[2] == 'B';

Oof. I suppose they're all at least that long, but still - we're looking only for barriers, right? Might be better to encode this expectation using an assert, like so:

rtx_code code = GET_CODE (insn);
if (code == BARRIER)
  return false;
gcc_assert (GET_RTX_FORMAT (code)[2] == 'B');

Otherwise, nice, and ok.


Reply via email to