This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
RE: [Patch] Fix instruction length of jcc_fused
- From: "Ye, Joey" <joey dot ye at intel dot com>
- To: "Uros Bizjak" <ubizjak at gmail dot com>, "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: "GCC Patches" <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 19 Sep 2008 15:57:39 +0800
- Subject: RE: [Patch] Fix instruction length of jcc_fused
Uros wrote:
> Also, please note that jcc insns come in two flavors, with length 2
> and 6. Please see i.e. how the length of *jcc_1 is calculated.
>
> OTOH, I think that using scheduling to fuse insns in the sequence is
> the way to go. Current implementation of fused ops is more or less a
> hack, and I must admit that I'm not very familiar with scheduling
> descriptions. Also, there is currently no core2 scheduling description
> at all (this description can potentially have big impact on the
> performance of generated code...)
Yes, jcc length itself IS a problem. Quoted from i386.md:
" ;; We don't know the size before shorten_branches. Expect
;; the instruction to fit for better scheduling.
(eq_attr "type" "ibr")
(const_int 1)"
So in this patch I set ibr length to mandatory 2 bytes.
As to Core2 scheduling description, I can have a try. But I don't expect
much performance improvement, as long as no regression. After all, Core2
is OOO.
Thanks - Joey