[PATCH] D103261: [AMDGPU] Increase alignment of LDS globals if necessary before LDS lowering.

Mahesha S via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 4 01:30:53 PDT 2021


hsmhsm added a comment.

In D103261#2798291 <https://reviews.llvm.org/D103261#2798291>, @JonChesterfield wrote:

> If we're going with this anyway, let's be explicit in the title and commit message that we are over-aligning data. We aren't 'fixing' things, or doing them 'properly', we are intentionally burning memory in the hope of improving runtime.
>
> I expect overrule-the-developer-intent transforms to generate bug reports. We could head those off by including a command line option to disable the overalignment.

I agree to the fact that we might in some cases going against the intent of the programmer (but it is safe), but do not agree to the fact that we are buring memory here. W.r.t un-optimal usage of padding memory, it is not because of this patch, it is actually because of sorting logic. We are sorting using alignment as a primary key, but, we should actually sort using size as primary key.

If you think that this patch is burning memory, then just think about how much memory, this original ModuleLDSLowering pass itself is burning.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D103261



More information about the llvm-commits mailing list