[llvm-commits] [llvm-gcc-4.2] r46670 - in /llvm-gcc-4.2/trunk/gcc: llvm-backend.cpp llvm-convert.cpp
Devang Patel
dpatel at apple.com
Mon Feb 4 13:50:23 PST 2008
Please update associated comments also.
Thanks!
-
Devang
On Feb 2, 2008, at 12:23 PM, Duncan Sands wrote:
> Author: baldrick
> Date: Sat Feb 2 14:23:27 2008
> New Revision: 46670
>
> URL: http://llvm.org/viewvc/llvm-project?rev=46670&view=rev
> Log:
> Use alignment zero if the gcc alignment is less
> than the ABI alignment, not just when it is equal
> to it.
>
> Modified:
> llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp
> llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
>
> Modified: llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp?rev=46670&r1=46669&r2=46670&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp (original)
> +++ llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp Sat Feb 2 14:23:27 2008
> @@ -969,7 +969,7 @@
> unsigned TargetAlign =
> getTargetData().getABITypeAlignment(GV->getType()-
> >getElementType());
> if (DECL_USER_ALIGN(decl) ||
> - TargetAlign != (unsigned)DECL_ALIGN_UNIT(decl))
> + TargetAlign < (unsigned)DECL_ALIGN_UNIT(decl))
> GV->setAlignment(DECL_ALIGN_UNIT(decl));
> }
>
>
> Modified: llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp?rev=46670&r1=46669&r2=46670&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp (original)
> +++ llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp Sat Feb 2 14:23:27 2008
> @@ -1589,7 +1589,7 @@
> // 2) DECL_ALIGN is set by user.
> if (DECL_ALIGN_UNIT(decl)) {
> unsigned TargetAlign = getTargetData().getABITypeAlignment(Ty);
> - if (DECL_USER_ALIGN(decl) || TargetAlign !=
> (unsigned)DECL_ALIGN_UNIT(decl))
> + if (DECL_USER_ALIGN(decl) || TargetAlign <
> (unsigned)DECL_ALIGN_UNIT(decl))
> Alignment = DECL_ALIGN_UNIT(decl);
> }
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
-
Devang
More information about the llvm-commits
mailing list