This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] Improve handling of COND_EXECs in haifa_classify_insn.
- From: "Vladimir N. Makarov" <vmakarov at redhat dot com>
- To: Alexander Monakov <monoid at ispras dot ru>
- Cc: "gcc-patches.gcc.gnu.org" <gcc-patches at gcc dot gnu dot org>, Maxim Kuvyrkov <maxim at codesourcery dot com>, Jim Wilson <wilson at specifix dot com>
- Date: Fri, 02 Nov 2007 17:56:10 -0400
- Subject: Re: [PATCH] Improve handling of COND_EXECs in haifa_classify_insn.
- References: <firstname.lastname@example.org> <470125B6.email@example.com> <firstname.lastname@example.org>
Alexander Monakov wrote:
Maxim Kuvyrkov wrote:
Alexander Monakov wrote:
This patch has been in sel-sched branch for a while. It makes
haifa_classify_insn look into predicate and code parts of COND_EXEC
to decide whether it traps or not, instead of assuming that all
COND_EXECs trap. It also factors code duplication in handling of
PARALLELs (by using recursion).
Bootstrapped and regtested on x64_64 with --disable-multilib and
I don't have the authority to approve the patch, so below are merely
my suggestions to improve it.
Changed according to Maxim's suggestions, bootstrapped and regtested
on ia64. This patch produces minor performance and code-size
improvements on ia64 by allowing scheduler to move some of the
predicated instructions across basic-block boundaries.
* gcc/haifa-sched.c (haifa_classify_insn): Rename to ...
(haifa_classify_expr): ... this. Improve handling of
COND_EXECs, handle PARALLELs by recursing. Use it ...
(haifa_classify_insn): ... here. Reimplement.
--- gcc/haifa-sched.c (revision 32194)
+++ gcc/haifa-sched.c (local)
@@ -405,8 +405,8 @@ may_trap_exp (const_rtx x, int is_store)
-/* Classifies insn for the purpose of verifying that it can be
- moved speculatively, by examining it's patterns, returning:
+/* Classifies pattern of an insn for the purpose of verifying that it
+ moved speculatively, by examining it, returning:
I'd rename haifa_classify_expr into haifa_classify_rtx and its
parameter to X (because the function is recursive after the patch).
The comment could be:
/* Classifies rtx X of an insn for the purpose of verifiying that X can
be executed speculatively (and consequently
the insn can be move speculatively), by examining X, returning:
Ok with these changes (please change the function name in ChangeLog too).
Thanks for the patch, Alexander. It is one more improvement of the