On 11/13/14 15:14, Mike Stump wrote:
On Nov 13, 2014, at 9:21 AM, Jeff Law <l...@redhat.com> wrote:
Presumably we can get the same kinds of problems with ports that don't emit
prologues/epilogues as RTL?
I use prologue/epilogue to emit rtl in my port. I’d like this optimization to
kick on in my port, as we do explain everything in rtl.
I do what 59 other ports do:
(define_expand "epilogue"
[(clobber (const_int 0))]
""
"
aarch64_expand_epilogue (false);
DONE;
“
)
this causes HAVE_prologue and HAVE_epilogue to be set. We don’t want to just
nix the optimization if HAVE_epilogue or HAVE_prologue is set.
No, sorry if I wasn't clear. If we are not emitting prologues or
epilogues as RTL, then we want to inhibit because the optimization can't
see into what's happening inside the prologue and epilogue.
This problem is unique to FUNCTION_PROFILER, the interface for it is fprintf
(“call mount”). This is what causes the problem. If all those ports used
PROFILE_HOOK instead (ia64.c for example), then I don’t think this would be an
issue. fprintf bad. FUNCTION_PROFILER is only used when doing profiling.
We don’t support fprintf prologues anymore, they were removed years ago.
Did we ever get all the ports converted?
jeff