This is an archive of the discontinued LLVM Phabricator instance.

[Alignment][NFC] Use the Align type in MCSection
ClosedPublic

Authored by gchatelet on Nov 24 2022, 4:07 AM.

Diff Detail

Event Timeline

gchatelet created this revision.Nov 24 2022, 4:07 AM
Herald added a project: Restricted Project. · View Herald Transcript
gchatelet requested review of this revision.Nov 24 2022, 4:07 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 24 2022, 4:07 AM
gchatelet updated this revision to Diff 477739.Nov 24 2022, 4:11 AM
  • Remove unneeded ctor
courbet accepted this revision.Nov 24 2022, 4:18 AM
courbet added inline comments.
llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp
356

reflow

This revision is now accepted and ready to land.Nov 24 2022, 4:18 AM
foad added inline comments.Nov 24 2022, 4:22 AM
llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp
256–257

The change is fine of course but there ought to be a neater way of writing this using some kind of "max" operation.

gchatelet updated this revision to Diff 477741.Nov 24 2022, 4:23 AM
  • Revert formatting comment
gchatelet marked an inline comment as done.Nov 24 2022, 4:31 AM
gchatelet added inline comments.
llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp
256–257

If you had access to the variable itself you could do Alignment = std::max(Alignment, Align(64)). But it's currently a private variable.
We could add a clampAlignment(Align MaxAlignment) function to MCSection though.

This revision was landed with ongoing or failed builds.Nov 24 2022, 4:33 AM
This revision was automatically updated to reflect the committed changes.
gchatelet marked an inline comment as done.