[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5543CDC0.6010206@redhat.com>
Date: Fri, 01 May 2015 15:02:24 -0400
From: Vladimir Makarov <vmakarov@...hat.com>
To: Jakub Jelinek <jakub@...hat.com>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Richard Henderson <rth@...hat.com>
CC: Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...nel.org>,
"H. Peter Anvin" <hpa@...or.com>,
Thomas Gleixner <tglx@...utronix.de>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Borislav Petkov <bp@...en8.de>
Subject: Re: [PATCH] x86: Optimize variable_test_bit()
On 01/05/15 12:33 PM, Jakub Jelinek wrote:
> On Fri, May 01, 2015 at 09:03:32AM -0700, Linus Torvalds wrote:
>>> PPS. Jakub, I see gcc5.1 still hasn't got output operands for asm goto;
>>> is this something we can get 'fixed' ?
> CCing Richard as author of asm goto and Vlad as register allocator
> maintainer. There are a few enhancement requests to support this, like
> http://gcc.gnu.org/PR59615 and http://gcc.gnu.org/PR52381 , but indeed the
> reason why no outputs are allowed is the register allocation issue.
> Don't know if LRA would be better suited to handle that case, but it would
> indeed be pretty hard.
>
>
GCC RA is a major reason to prohibit output operands for asm goto.
Reload pass was not designed to deal with output reloads for control
flow insns. It is very hard to implement this feature there and
implement it in a reliable way. Also nobody does any development for
reload for long time. So I doubt that somebody would do this for reload.
LRA is more suitable to implement the feature. In general, even
outputs used on any branch can be permitted. Although critical edges
can complicate the implementation as new BBs are created. But it is
doable too.
The only problem is that asm goto semantics in this case should be
defineddepending on what local register allocator (reload or LRA) GCC
for given target use.
Currently LRA is used by x86/x86-64, ARM, AARCH64, s390, and MIPS.
PPC, SH, and ARC are moving to LRA. All other targets are still
reload based.
So I could implement the output reloads in LRA, probably for the
next GCC release. How to enable and mostly use it for multi-target
code like the kernel is another question.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists