[patch] Use DataLayout from the module when easily available.
Chandler Carruth
chandlerc at google.com
Tue Feb 25 15:11:02 PST 2014
On Tue, Feb 25, 2014 at 3:03 PM, Rafael EspĂndola <
rafael.espindola at gmail.com> wrote:
> Hi Chandler,
>
> This patch is what is left from my old patch series for making
> Datalayout not a Pass. It is much smaller now that the anti alias
> interface still uses DataLayoutPass.
>
This looks really good. The simplification in the inliner for example are
really nice.
>
> One interesting issue with sometimes using DataLayoutPass and
> sometimes fetching it from the Module is that we have to make sure
> they are equivalent. We can get most of the way there by always
> constructing the pass with a Module. In fact, it could be changed to
> point to an external DataLayout instead of owning one to make this
> stricter.
>
> Unfortunately, the C api passes a DataLayout, so it has to be up to
> the caller to make sure the pass and the module are in sync.
>
Yuck. That's unfortunate.
Anyways, whatever ends up working here seems fine.
You can add an assert to the verifier or somewhere else if you want that
checks the two, but it seems low-value.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140225/b1950393/attachment.html>
More information about the llvm-commits
mailing list