[PATCH] D71473: [Alignment][NFC] Deprecate untyped variants of CreateMemCpy/CreateMemMove

Guillaume Chatelet via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 16 06:59:35 PST 2019


That's a good point @xbolva00. I'm not too happy about it either.
Especially since `MaybeAlign` can be initialized with `llvm::None` which is
different from `Align::None()`. I think it's confusing.

I'll create a separate patch to convert the `Align::None()` to `Align(1)`
and deprecated the use of `Align::None()`.

On Mon, Dec 16, 2019 at 3:52 PM Dávid Bolvanský via Phabricator <
reviews at reviews.llvm.org> wrote:

> xbolva00 added inline comments.
>
>
> ================
> Comment at: llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp:565
>    CallInst *NewCI =
> -      B.CreateMemCpy(Dst, 1, Src, 1,
> +      B.CreateMemCpy(Dst, Align::None(), Src, Align::None(),
>                       ConstantInt::get(DL.getIntPtrType(CI->getContext()),
> Len));
> ----------------
> I am wondering if the new code does not hurt a readability... Here we have
> a comment, but.. Looking at Align::None(), I had to open doc for
> Alignment.h to see how it is defined.
>
> In my opinion, 'Align(1)' looks better.
>
>
> Repository:
>   rG LLVM Github Monorepo
>
> CHANGES SINCE LAST ACTION
>   https://reviews.llvm.org/D71473/new/
>
> https://reviews.llvm.org/D71473
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191216/e87d88f5/attachment.html>


More information about the llvm-commits mailing list