This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc 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 03/13/15 11:04, Roland McGrath wrote:
I haven't looked deeply at this example, but we're consistently looking to improve GCC's ability to prove certain edges in the control flow graph are not executable.That is fine by me. I'm a bit surprised the compiler actually figures out that VALLEN cannot be used uninitialized and doesn't emit the warning. But great if so.
Of particular interest are equivalences that are only valid on particular paths. I can speculate that later in this code there's a use of VALLEN that is conditional on the value of COMBINED.
Through block copying and simplifications we can isolate the paths leaving the first combined != NULL test. On one of those paths there'll be the second combined != NULL test which becomes redundant (ie known static result). We eliminate the redundant test, simplify the CFG and as a result the uninitialized use is removed and ultimately better code.
Jeff
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |