This is an archive of the discontinued LLVM Phabricator instance.

[Alignment][NFC] Remove LogAlignment functions
ClosedPublic

Authored by gchatelet on Sep 16 2019, 7:31 AM.

Details

Summary

This is patch is part of a series to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790

Event Timeline

gchatelet created this revision.Sep 16 2019, 7:31 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 16 2019, 7:31 AM
courbet requested changes to this revision.Sep 17 2019, 2:19 AM
courbet added inline comments.
llvm/lib/Target/ARM/ARMBasicBlockInfo.cpp
129–131

inline ?

llvm/lib/Target/ARM/ARMConstantIslandPass.cpp
496–497

Remove We measure in log2(bytes).

537

you might want to cache the end bound.

650–651

ditto - remove Alignment is measured in log2(bytes) units.

658

This should be llvm::Align(1);

1025

As discussed, let's make postOffset take an Align to avoid escaping the type system.

1570–1571

(for later) Consider introducing static constexpr llvm::Align llvm::Align::None (or Unaligned)

llvm/lib/Target/Hexagon/HexagonBranchRelaxation.cpp
108

would be useful here: if (B.getAlignment() != Align::None)

This revision now requires changes to proceed.Sep 17 2019, 2:19 AM
gchatelet updated this revision to Diff 220619.Sep 18 2019, 1:04 AM
gchatelet marked 4 inline comments as done.
  • Address some of the comments
gchatelet updated this revision to Diff 220680.Sep 18 2019, 8:25 AM
gchatelet marked 6 inline comments as done.
  • Address comments
courbet accepted this revision.Sep 18 2019, 8:35 AM
courbet added inline comments.
llvm/lib/Target/Hexagon/HexagonFixupHwLoops.cpp
117

use None ?

This revision is now accepted and ready to land.Sep 18 2019, 8:35 AM
gchatelet marked an inline comment as done.Sep 18 2019, 8:47 AM
gchatelet added inline comments.
llvm/lib/Target/ARM/ARMConstantIslandPass.cpp
658

Good catch !

This revision was automatically updated to reflect the committed changes.