On 10/15/2016 08:41 PM, Segher Boessenkool wrote:
On Sat, Oct 15, 2016 at 01:45:12AM -0500, Daniel Santos wrote:
The insn that's getting deleted is 75, where RCX is set. I'm starting
to think that maybe df_analyze() presumes that my call (to the stub) is
invalidating RCX, although it does not.
It looks like you don't use add_function_usage_to on the call insn?
Oddly enough, I had forgotten to call add_function_usage_to() on my save
stub (which I didn't post), but not the restore stub. So thanks for that
psychic intervention. :) But if you look carefully, it's there, although
it's hard to read because of all the line wrapping:
(expr_list (use (reg:DI 4 si))
Right now I'm using gdb and gradually walking through df_analyze() and
learning how the data flow and problems work. I presume that I can find
my answer somewhere in the "live register" data flow problem code . This
eventually runs "dead code elimination" on this insn (during the
"finalize" phase), so I believe that I'm getting closer to discovering
the root cause. So the bright side is that I'm learning a lot more about
gcc internals! Which is probably my main goal of this exercise.