Hi Richard:

> Please skip vars with DECL_USER_ALIGN.

I was consider to skip DECL_USER_ALIGN,
but Jakub think it shouldn't skip in other patch review[1] (related to
this patch),
because it's minimum alignment not restricted alignment[2]

[1] https://gcc.gnu.org/pipermail/gcc-patches/2020-March/542913.html
[2] 
https://gcc.gnu.org/onlinedocs/gcc/Common-Type-Attributes.html#Common-Type-Attributes

>
> Note local-decls also contains the base variables that
> are written into SSA form so you are processing variables
> here that are not processed by the corresponding code
> during RTL expansion.  It's probably harmless to increase
> alignment of registers since that should be ignored.
> I'm not sure whether alignment has any effect on
> DECL_HARD_REGISTER vars.

I did more checks on expand_one_var, DECL_HARD_REGISTER won't adjust
alignment since use different path to expand, so it should skip here.

So yeah, it seems should skip here.

> Note local-decls also contains local statics.  I'm not sure
> LOCAL_DECL_ALIGNMENT is supposed to handle those,
> certainly the RTL expansion code does not.  So please
> exclude is_global_var (var) vars as well.

I checked static local will included in FOR_EACH_LOCAL_DECL, will skip
is_global_var next version

Thanks :)

Reply via email to