This is an archive of the discontinued LLVM Phabricator instance.

[Alignment][NFC] Instructions::getLoadStoreAlignment
ClosedPublic

Authored by gchatelet on Oct 21 2019, 6:18 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.Oct 21 2019, 6:18 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 21 2019, 6:18 AM
gchatelet updated this revision to Diff 225882.Oct 21 2019, 7:32 AM
  • Use getValueOrABITypeAlignment
courbet accepted this revision.Oct 21 2019, 7:40 AM
This revision is now accepted and ready to land.Oct 21 2019, 7:40 AM
This revision was automatically updated to reflect the committed changes.
xbolva00 added inline comments.
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
5829

Maybe you can create new API:
Alignment->valueOrZero()?

gchatelet marked an inline comment as done.Oct 21 2019, 8:06 AM
gchatelet added inline comments.
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
5829

Thx for the notice @xbolva00. This code is just here for the transition and it will disappear once the TTI.getXXXCost functions take MaybeAlign instead of unsigned.
I'm reluctant to introduce a new API for the transition since it's a hole in the type system (typed -> untyped) having it part of the API would encourage its usage.

xbolva00 added inline comments.Oct 21 2019, 8:15 AM
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
5829

Yeah, you are right.