This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Improve handling of COND_EXECs in haifa_classify_insn.


Alexander Monakov wrote:

Maxim Kuvyrkov wrote:

Alexander Monakov wrote:

Hi.
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 on ia64.


Hi!

I don't have the authority to approve the patch, so below are merely my suggestions to improve it.

[snip]


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 can be
+ 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 scheduler.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]