[PATCH] D114419: [XCOFF] change default program code csect alignment to 32

ChenZheng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 26 04:45:43 PST 2021


shchenz added a comment.

In D114419#3148440 <https://reviews.llvm.org/D114419#3148440>, @nemanjai wrote:

> Just out of curiosity, if the `csect` that contains a function is aligned at 2 bytes, how do we ensure loops within those functions are aligned at 32 bytes?

I am not checking the details, but if a function has a loop that is aligned at 32bytes, will the function be aligned at 2 bytes? I think the function alignment should be no smaller than its nested loop's alignment?

And there is a logic in the csect alignment setting that the csect alignment must be no smaller than its nested function's alignment. See

  AsmPrinter::emitFunctionHeader() {
    if (MAI->hasFunctionAlignment())
      emitAlignment(MF->getAlignment(), &F)
  }


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D114419



More information about the llvm-commits mailing list