[LLVMdev] make DataLayout a mandatory part of Module

David Chisnall David.Chisnall at cl.cam.ac.uk
Tue Feb 11 03:41:22 PST 2014


On 11 Feb 2014, at 11:37, Chandler Carruth <chandlerc at google.com> wrote:

> I find all of these things very interesting from the perspective of security and/or hardware constraints, I don't think we should try to deal with that here.
> 
> Today, even without a datalayout, I suspect LLVM is not providing nearly the guarantee that either of these use cases is looking for. It may well work by happenstance, but hope isn't a strategy. If we want to add this constraint to LLVM, let's discuss that separately. I don't think we have it today, and I don't think making datalayout mandatory meaningfully moves us further from having it. At worst it causes already possible random failures to become more common.

I agree.  Having the DataLayout present makes these easier to enforce.  It would also be nice if the data layout could encode a little bit more information about pointers (is an integer representation, casts to these address spaces are valid), but that's a separate discussion.

David





More information about the llvm-dev mailing list