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] Fix instruction length of jcc_fused


H.J. Lu wrote:

I looked at the generated code without TARGET_FUSE_CMP_AND_BRANCH.
In most cases, gcc doesn't put any instructions between TEST/CMP
and JCC and we get macro-fusion optimization automatically even
if TARGET_FUSE_CMP_AND_BRANCH is off.

Since TARGET_FUSE_CMP_AND_BRANCH generates patterns with
incorrect instruction length, it prevents the block from merging and
copying, which hurt performance.

We have 2 choices:

1. Correct insn length for *jcc_fused_X patterns, which what Joey's
patch does.
2. Remove *jcc_fused_X patterns and optimize macro-fusion in Core 2
scheduling.

Given that *jcc_fused_X patterns don't buy us much, I think
we should remove them and fix the missed macro-fusion
optimization in Core 2 scheduling in the future. OK for trunk?
I think that at this moment (and based on your reasoning above), removing these patterns is the best solution.

The patch is OK.

Thanks,
Uros.


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