This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
On 01/24/14 03:52, Jakub Jelinek wrote:
On Thu, Jan 23, 2014 at 02:22:35PM -0700, Jeff Law wrote:--- a/gcc/tree-vrp.c +++ b/gcc/tree-vrp.c @@ -5891,8 +5891,13 @@ find_assert_locations_1 (basic_block bb, sbitmap live) } } - register_new_assert_for (op, op, comp_code, value, bb, NULL, si); - need_assert = true; + /* Do not register any assertions for a non-returning call. */ + if (!is_gimple_call (stmt) || !gimple_call_noreturn_p (stmt)) + { + register_new_assert_for (op, op, comp_code, + value, bb, NULL, si); + need_assert = true; + } } }I'd say this belongs into infer_value_range instead.
Seems reasonable. I'll spin that.The only downside is we lose the ability to backward propagate through a typecast which feeds an argument in such a call. But that's probably not a big deal.
Jeff
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |