[PATCH] D33284: [CodeGen] Propagate LValueBaseInfo instead of AlignmentSource

John McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed May 17 15:36:28 PDT 2017


rjmccall added a comment.

In https://reviews.llvm.org/D33284#757917, @kparzysz wrote:

> Changed the getNatural.*TypeAlignment to produce the entire LValueBaseInfo, assuming MayAlias to be false.
>
> Added merging of LValueBaseInfos.  The merging assumes that the alignment source in the parameter overrides the existing source.  That works for the existing cases (cast), but I'm not sure if that's correct in general.  Is there is an implicit ordering of alignment sources?


There is an ordering of alignment sources, but we deliberately want casts to override alignment assumptions associated with the original value.  But that's why the merge operation is named mergeForCasts: it doesn't suggest it should be used for other operations.

Thank you, this looks great.


Repository:
  rL LLVM

https://reviews.llvm.org/D33284





More information about the cfe-commits mailing list