This is an archive of the discontinued LLVM Phabricator instance.

[MachineBlockPlacement] Respect target limits on padding amount when aligning all blocks
Needs ReviewPublic

Authored by chill on Jul 26 2023, 5:42 AM.

Details

Summary

If the compiler (llc) is given --align-all-blocks=N or
--align-all-nofallthru-blocks=N it will emit alignment directives
without regard to the limit on the number of padding bytes inserted
for alignment.

With this patch, the compiler will respect the limits.

Previous behaviour of having no limits can be obtained by passing
-max-bytes-for-alignment=0.

Diff Detail