[PATCH] D148622: [LoongArch] Prefer to align functions and tight loops to 16 bytes

WÁNG Xuěruì via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 18 02:59:41 PDT 2023


xen0n added a comment.

In D148622#4277173 <https://reviews.llvm.org/D148622#4277173>, @xry111 wrote:

> Hmm, it seems to me `setMaxBytesForAlignment` sets "the maximum amount of padding allowed for aligning the BB", not the max loop size.  Or am I missing something?

I simply copied from AArch64 for that part. Maybe I should mention this in the commit message...

> I'll do the similar thing for GCC but we've already missed GCC 13 deadline :(.

No worries, things happen, and it's not like everyone's gonna burn 2x more CPU cycles without such changes. I only discovered this because of surprising go1 benchmark results over and over again, getting 13% performance hits for a change that theoretically cannot increase dynamic instruction counts; it actually proves such fluctuations are largely unnoticed in everyday use.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D148622



More information about the llvm-commits mailing list