[PATCH] D137620: [BOLT] Don't align .text to pageAlign

Denis Revunov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 9 05:53:59 PST 2023


treapster added a comment.



> Now we just have to find more or less a reasonable strict definition for the alignment threshold. Some refactoring is required, but once we can pass `MaxBytesToEmit` to `MCStreamer::emitCodeAlignment()` for `.text`, it will solve the problem while also being future-proof. I believe it will also be helpful for the work you were planning to do on the complete binary rewrite.

I don't fully understand why do you want to use emitCodeAlignment in the first place. From what i can see it's intended to align functions, and for sections we have `Section->setAlignment()` which is used currently with AlignText. Do you mean to declare some small "official" alignment with setAlignment(which will end up in the section header) and then align additionaly with emitCodeAlignment and MaxBytesToEmit before the first function? Why bother that much and what is wrong with current version of the patch?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D137620



More information about the llvm-commits mailing list