public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/95885] New: LOCAL_DECL_ALIGNMENT macro documentation is incorrect.
@ 2020-06-24 20:01 skpgkp2 at gmail dot com
  2020-06-25  7:05 ` [Bug target/95885] " marxin at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: skpgkp2 at gmail dot com @ 2020-06-24 20:01 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95885

            Bug ID: 95885
           Summary: LOCAL_DECL_ALIGNMENT macro documentation is incorrect.
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: skpgkp2 at gmail dot com
  Target Milestone: ---
            Target: x86_64-*-* i?86-*-*

LOCAL_DECL_ALIGNMENT Macro documentation

 1172 @defmac LOCAL_DECL_ALIGNMENT (@var{decl})
 1173 If defined, a C expression to compute the alignment for a local
 1174 variable @var{decl}.
 1175 
 1176 If this macro is not defined, then
 1177 @code{LOCAL_ALIGNMENT (TREE_TYPE (@var{decl}), DECL_ALIGN (@var{decl}))}
 1178 is used.
 1179 
 1180 One use of this macro is to increase alignment of medium-size data to
 1181 make it all fit in fewer cache lines.
 1182 
 1183 If the value of this macro has a type, it should be an unsigned type.
 1184 @end defmac

This macro not only increases alignment but also decreases(-m32
-mpreferred-stack-boundary=2) depending on condition.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug target/95885] LOCAL_DECL_ALIGNMENT macro documentation is incorrect.
  2020-06-24 20:01 [Bug target/95885] New: LOCAL_DECL_ALIGNMENT macro documentation is incorrect skpgkp2 at gmail dot com
@ 2020-06-25  7:05 ` marxin at gcc dot gnu.org
  2020-06-25  7:38 ` rguenth at gcc dot gnu.org
  2022-11-11 18:32 ` [Bug target/95885] LOCAL_DECL_ALIGNMENT and TARGET_LOWER_LOCAL_DECL_ALIGNMENT macro documentation should be improved pinskia at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-06-25  7:05 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95885

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |marxin at gcc dot gnu.org
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2020-06-25
             Status|UNCONFIRMED                 |NEW

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug target/95885] LOCAL_DECL_ALIGNMENT macro documentation is incorrect.
  2020-06-24 20:01 [Bug target/95885] New: LOCAL_DECL_ALIGNMENT macro documentation is incorrect skpgkp2 at gmail dot com
  2020-06-25  7:05 ` [Bug target/95885] " marxin at gcc dot gnu.org
@ 2020-06-25  7:38 ` rguenth at gcc dot gnu.org
  2022-11-11 18:32 ` [Bug target/95885] LOCAL_DECL_ALIGNMENT and TARGET_LOWER_LOCAL_DECL_ALIGNMENT macro documentation should be improved pinskia at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-06-25  7:38 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95885

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
The documentation is correct, the x86 implementation is not.  Note the
documentation says "One use of this macro...", so clearly it's documentation
can be improved by explicitely constraining the macro to increase alignment.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug target/95885] LOCAL_DECL_ALIGNMENT and TARGET_LOWER_LOCAL_DECL_ALIGNMENT macro documentation should be improved
  2020-06-24 20:01 [Bug target/95885] New: LOCAL_DECL_ALIGNMENT macro documentation is incorrect skpgkp2 at gmail dot com
  2020-06-25  7:05 ` [Bug target/95885] " marxin at gcc dot gnu.org
  2020-06-25  7:38 ` rguenth at gcc dot gnu.org
@ 2022-11-11 18:32 ` pinskia at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-11-11 18:32 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95885

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at gcc dot gnu.org      |pinskia at gcc dot gnu.org
            Summary|LOCAL_DECL_ALIGNMENT macro  |LOCAL_DECL_ALIGNMENT and
                   |documentation is incorrect. |TARGET_LOWER_LOCAL_DECL_ALI
                   |                            |GNMENT macro documentation
                   |                            |should be improved
             Status|NEW                         |ASSIGNED

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
There is now TARGET_LOWER_LOCAL_DECL_ALIGNMENT which was added by r11-2259-g
0a9d711df36b42 .

We should provide examples of when one should be used vs the other.
And maybe even better describe why there are two target hooks that seems like
does the same thing now.

I am going to try to this for GCC 14 with the other target macro/hooks cleanups
I am doing.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-11-11 18:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-24 20:01 [Bug target/95885] New: LOCAL_DECL_ALIGNMENT macro documentation is incorrect skpgkp2 at gmail dot com
2020-06-25  7:05 ` [Bug target/95885] " marxin at gcc dot gnu.org
2020-06-25  7:38 ` rguenth at gcc dot gnu.org
2022-11-11 18:32 ` [Bug target/95885] LOCAL_DECL_ALIGNMENT and TARGET_LOWER_LOCAL_DECL_ALIGNMENT macro documentation should be improved pinskia at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).