This is the mail archive of the
mailing list for the GCC project.
Re: Proposed doc update for Explicit Reg Vars 2/3
- From: Jeff Law <law at redhat dot com>
- To: Segher Boessenkool <segher at kernel dot crashing dot org>, David Wohlferd <dw at LimeGreenSocks dot com>
- Cc: "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>, Sandra Loosemore <sandra at codesourcery dot com>
- Date: Mon, 19 Oct 2015 23:14:30 -0600
- Subject: Re: Proposed doc update for Explicit Reg Vars 2/3
- Authentication-results: sourceware.org; auth=none
- References: <561C3D44 dot 5040506 at LimeGreenSocks dot com> <20151019214241 dot GQ17756 at gate dot crashing dot org>
On 10/19/2015 03:42 PM, Segher Boessenkool wrote:
Which raises the question, what happens for LTO? Do we stream out
enough information to know about global register variables and if we do,
then its use as a global register variable implicitly covers anything
that's visible at LTO time, right?
+After defining a global register variable, for the duration of
+the current compilation:
It's probably better to say "for the current compilation unit"? There now
is LTO and whatnot.
I've asked David to verify this. However, if you have, then he doesn't
need to re-confirm.
+All global register variable declarations must precede all function
+definitions. If such a declaration appears after function definitions,
+the declaration would be too late to prevent the register from being used
+for other purposes in the preceding functions.
This isn't true anymore, not even with -fno-toplevel-reorder or -O0.