This is the mail archive of the
mailing list for the GCC project.
Re: fake/abnormal/eh edge question
- From: Jim Wilson <jim dot wilson at linaro dot org>
- To: sellcey at imgtec dot com, Jeff Law <law at redhat dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Thu, 27 Aug 2015 14:20:04 -0700
- Subject: Re: fake/abnormal/eh edge question
- Authentication-results: sourceware.org; auth=none
- References: <6ed5618c-3d13-42f6-8842-5a8a0a1e0937 at BAMAIL02 dot ba dot imgtec dot org> <55DCD3C4 dot 6060506 at redhat dot com> <1440539673 dot 23512 dot 78 dot camel at ubuntu-sellcey>
On 08/25/2015 02:54 PM, Steve Ellcey wrote:
> Actually, it looks like is peephole2 that is eliminating the
> instructions (and .cfi psuedo-ops).
> I am not entirely sure I need the code or if I just need the .cfi
> psuedo-ops and that I need the code to generate the .cfi stuff.
Don't create any new edges. That doesn't make sense for unwind info.
You don't need unwind info for unreachable code.
You do need enough info to be able to unwind from any instruction in
general, or just from call sites for C++ EH. This means you need to be
able to calculate the value of sp from the caller, which you can only
get from the r12/drap value. So you need to keep the instructions and
the cfi directives generated from them.
Looking at the i386 port, in the i386.md file, I see a few peepholes
check the value of RTX_FRAME_RELATED_P and fail if it is set. It
appears that you need to do something similar in the mips.md file to
prevent these instructions from being deleted by the peephole2 pass.