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] |
Just to understand, what does this do with your optimization?
void f(void *p) { if (p) { puts("sell_soul_to_devil"); puts("post_reload_rewrite"); }
*p = 2; }
... f(NULL);
Does the program sell its soul to the devil before crashing?
If "f" is not inlined into its caller, then there's nothing for the new pass to do. There's no explicit NULL dereference and there's no assignments to "p", so there's no PHI at the merge point for P.
if (p_1) goto BB1 else goto BB2 BB1: ... goto BB3; BB2: p_2 = assert(p_1, p_1 == 0); goto BB3;
p_3 = phi (p_1<BB1>, p_2<BB2>); *p_3 = 2;
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |