[PATCH] D106701: [clang] Add -falign-loops=N where N is a power of 2

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jul 24 11:01:14 PDT 2021


craig.topper added a comment.

In D106701#2902544 <https://reviews.llvm.org/D106701#2902544>, @dblaikie wrote:

> In D106701#2901656 <https://reviews.llvm.org/D106701#2901656>, @MaskRay wrote:
>
>> In D106701#2901639 <https://reviews.llvm.org/D106701#2901639>, @efriedma wrote:
>>
>>> Can we hook this up to a LLVM IR function attribute, instead of making it a codegen flag?
>>
>> The current TargetLoweringBase::PrefLoopAlignment is global. I have considered a function attribute, but it seems overkill for now.
>> (Inlining behavior is a bit unclear.)
>> The current use cases just need a global value instead of a refined per-function value.
>
> global module metadata is also an option
>
> (what's the motivation for adding this feature - do you have a use-case in mind?)
>
> (the usual: This should probably be committed as separate patches - at least LLVM, then Clang pieces)

I would like to have this for experimenting on RISCV. I was proposing to add similar hidden options like X86 in D106570 <https://reviews.llvm.org/D106570>.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D106701/new/

https://reviews.llvm.org/D106701



More information about the llvm-commits mailing list