------- Comment #4 from steven at gcc dot gnu dot org 2008-05-08 22:27 ------- So I was looking at an older revision of dce.c. There is this new check before the !NONJUMP_INSN_P check now:
/* We can delete dead const or pure calls as long as they do not infinite loop and are not sibling calls. The problem with sibling calls is that it is hard to see the result. */ if (CALL_P (insn) && (!SIBLING_CALL_P (insn)) && (RTL_CONST_OR_PURE_CALL_P (insn) && !RTL_LOOPING_CONST_OR_PURE_CALL_P (insn))) return true; CALL_P is obviously true for this insn, and so is !SIBLING_CALL_P (there is no call_insn/j). The "/u" flag means that RTL_CONST_OR_PURE_CALL_P is true for the insn. The "/c" flag is clear, so RTL_LOOPING_CONST_OR_PURE_CALL_P is false. I don't know where RTL_CONST_OR_PURE_CALL_P is set. But that's where I would look. [ I see that RTL_LOOPING_CONST_OR_PURE_CALL_P is not documented. Kenny, can you please take care of that (and probably other necessary document updates following your patch)? ] -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36177