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

Diff Detail

Repository
rL LLVM

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 ↗(On Diff #220339)

inline ?

llvm/lib/Target/ARM/ARMConstantIslandPass.cpp
488 ↗(On Diff #220339)

Remove We measure in log2(bytes).

528 ↗(On Diff #220339)

you might want to cache the end bound.

643 ↗(On Diff #220339)

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

649 ↗(On Diff #220339)

This should be llvm::Align(1);

1016 ↗(On Diff #220339)

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

1561 ↗(On Diff #220339)

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

llvm/lib/Target/Hexagon/HexagonBranchRelaxation.cpp
108 ↗(On Diff #220339)

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 ↗(On Diff #220680)

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
649 ↗(On Diff #220339)

Good catch !

This revision was automatically updated to reflect the committed changes.