[PATCH][RFC] Provide alignment info on LLVM external symbols

Ulrich Weigand Ulrich.Weigand at de.ibm.com
Tue Apr 21 10:31:21 PDT 2015


Checked in as rev. 235396.

Thanks for the review!


Mit freundlichen Gruessen / Best Regards

Ulrich Weigand

--
  Dr. Ulrich Weigand | Phone: +49-7031/16-3727
  STSM, GNU/Linux compilers and toolchain
  IBM Deutschland Research & Development GmbH
  Vorsitzende des Aufsichtsrats: Martina Koederitz | Geschäftsführung: Dirk
Wittkopp
  Sitz der Gesellschaft: Böblingen | Registergericht: Amtsgericht
Stuttgart, HRB 243294



From:	Rafael Espíndola <rafael.espindola at gmail.com>
To:	Ulrich Weigand/Germany/IBM at IBMDE
Cc:	llvm cfe <cfe-commits at cs.uiuc.edu>
Date:	30.03.2015 22:47
Subject:	Re: [PATCH][RFC] Provide alignment info on LLVM external
            symbols



LGTM.

Fixing the FIXME would be better, but a fix with a testcase is also OK.

On 30 March 2015 at 14:27, Ulrich Weigand <Ulrich.Weigand at de.ibm.com>
wrote:
>
>
> Hello,
>
> code in CodeGenModule::GetOrCreateLLVMGlobal that sets up GlobalValue
> object for LLVM external symbols has this comment:
>
>     // FIXME: This code is overly simple and should be merged with other
> global
>     // handling.
>
> One part does seems to be "overly simple" currently is that this code
> never sets any alignment info on the GlobalValue, so that the emitted
> IR does not have any align attribute on external globals.  This can
> lead to unnecessarily inefficient code generation.
>
> The following patch adds a GV->setAlignment call to set alignment info.
>
> (See attached file: clang-align-extern)
>
>
> Mit freundlichen Gruessen / Best Regards
>
> Ulrich Weigand
>
> --
>   Dr. Ulrich Weigand | Phone: +49-7031/16-3727
>   STSM, GNU/Linux compilers and toolchain
>   IBM Deutschland Research & Development GmbH
>   Vorsitzende des Aufsichtsrats: Martina Koederitz | Geschäftsführung:
Dirk
> Wittkopp
>   Sitz der Gesellschaft: Böblingen | Registergericht: Amtsgericht
> Stuttgart, HRB 243294
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>








More information about the cfe-commits mailing list