This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: do_global_ctors_aux vs. pt placement
Joern RENNECKE <joern.rennecke@st.com> wrote:
> The problem actually occurs during register allocation, so doing
> anything at reload time is to late.
> I have now followed a different approach, i.e. using PDImode targets in
> the call insns, and
> showing a specific ptabs pattern with side effects, if the target might
> be dangerous.
> See the attachment ptabs-diff-20050413-PDI . I'm regtesting this now.
> I've checked that the ctor testcase works with this patch. There is
> also an option to tell the
> compiler not to worry about trapping pt insns: -mpt-fixed. I've also
> made this disable the
> inflation of the gettr cost. The funny thing is, the ctor test also
> works for the current
> architecture with the -mpt-fixed option. The local-alloc dump shows
> that the register class
> preferencing is different. If i use -mpt-fixed -mgettrcost=100, the ctor
> testcase again gets
> the ptabs hoisted into the basic block with the test against -1 - not by
> pt migration, but
> by allocating the pseudo that holds the value loaded from memory into a
> target register.
I can't test ptabs-diff-20050413-PDI as is because it uses predicates.md
which doesn't exist in CVS yet. But even with dummy functions I wrote,
it gets rid of the ptabs issue and the testresult looks fine. I'll run
more tests if it's committed to the branch.
Regards,
kaz