[llvm-dev] grouping global variables by alignment: safe to do at LLVM level, or only at Clang level?

Kevin Choi via llvm-dev llvm-dev at lists.llvm.org
Mon Jul 25 17:13:11 PDT 2016


Yes.

It would be nice if there was a status matrix to track what optimizations
aren't enabled by default for other frontends that could possibly benefit
from them.

On 25 July 2016 at 16:57, Abe Skolnik <a.skolnik at samsung.com> wrote:

> Dear Kevin,
>
> Thanks for your quick and thoughtful reply.
>
> Please tell me whether or not I have understood you correctly: I think
> what you are saying is that it might be possible to do what I`m talking
> about at the LLVM level, have it turned off by default so it`s safe, have
> Clang turn it on when the optimization level says to do so [since AFAIK all
> Clang-supported languages allow compilers to re-order globals], and let
> other front ends turn it on if their respective language specifications
> also allow compilers to re-order globals.
>
> If that`s a correct understanding, then I think that`s a great idea.
> Thanks either way, i.e. even if I _have_ misunderstood. ;-)
>
> Regards,
>
> Abe
>
>
>
>
>
>
>
> On 07/25/2016 06:52 PM, Kevin Choi wrote:
>
> Hi Abe,
>>
>
> I don't see why you couldn't make a frontend query in the pass-manager to
>> selectively enable such globals reordering/aligning pass. If this is a
>> discouraged practice noted in docs somewhere and LLVM's goal is to be
>> truly
>> frontend/platform agnostic, please do correct me. AFAIK, Pass Manager
>> selects some optimizations based on Optimization Levels (-O2,-O3,etc), so
>> extending this shouldn't be a challenge.
>>
>
> Regards,
>> Kevin
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160725/f0c2b32d/attachment.html>


More information about the llvm-dev mailing list