On 06/04/13 12:58, Iyer, Balaji V wrote:


Actually, you can eliminate the entire if-statement (i.e. remove
if-statement and make the body unconditional). This is because, if
flag_enable_cilkplus is true and is_cilkplus_reduce_builtin (fundecl)
is true, then it would have returned vec_safe_length(values) and will
not even get to this point in the first place. So, this is
technically equivalent to if (1). So, can I remove that and check it
in also? It passes all my regression tests.
I originally thought it could be eliminated as well, but after further reflection I couldn't convince myself it'd do the right thing for the case when flag_enable_cilkplus is true but is_cilkplus_reduce_builtin was false.

Note that triggering that code my be nontrivial, AFAICT we're suppressing a diagnostic. So you're going to need to write invalid code to get into that condition at the bottom of the loop at all.

jeff

Reply via email to