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]

Re: PATCH for c/10175: -Wunreachable-code broken


> If we really need to ignore an insn before a line note, a correct
> formulation would be
> 
>   if (a_line_note)
>     contains_insn = 1;
> 
> but I don't understand the rationale.

In looking at this, I have to agree that I do not understand it either
based on the rtl shown in the message.  I am certain that we had
a situation where both two_avoided_lines and contains_insn were set.

To look at this further, I'd have to go back to the code as of the time
of the patch.  The patch to enable sibcalls was never installed because
it required tracking the aliveness of the arg pointer through reload
and an acceptable method of doing this was not found.  In addition,
the technique to save and restore the pic register across function
calls has now changed because it relied in a subtle way on the restore
being scheduled with the call.  The pic restore is now split out
after reload.  I can see in the rtl in the message that the pic restore
is not scheduled with the call.  Lastly, I believe the sibcall patterns
at the time output an unnecessary instruction to restore the pic register
"following" a sibcall.  This may have been the real problem.  This
code is still present in the 3.2 branch and might affect the 32-bit
hppa-linux port when pic code is being generated.

Dave
-- 
J. David Anglin                                  dave dot anglin at nrc-cnrc dot gc dot ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6602)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]