[patch] Use DataLayout from the module when easily available.

Rafael EspĂ­ndola rafael.espindola at gmail.com
Tue Feb 25 15:03:27 PST 2014


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.

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.

Cheers,
Rafael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: t.patch
Type: text/x-patch
Size: 15700 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140225/4ed85b94/attachment.bin>


More information about the llvm-commits mailing list