[LLVMdev] RFC: Are we ready to completely move away from the optionality of a DataLayout?

David Chisnall David.Chisnall at cl.cam.ac.uk
Mon Oct 20 06:11:12 PDT 2014


On 20 Oct 2014, at 14:00, Benjamin Kramer <benny.kra at gmail.com> wrote:

> I'm biased towards making DataLayout mandatory but it does break legitimate use cases. Target-independent bitcode is not in the best shape but this change would kill it off entirely, so we better make sure the maintenance is causing enough pain to rectify the change.

Target-independent bitcode exists in the form of things like SPIR and PNaCl.  These all have a DataLayout.  The IR already implicitly depends on some of these things (e.g. pointer size), making it explicit doesn't break things.

> I debugged missing 'DL != nullptr' checks a couple of times, not the most pleasant task in the world but also not a big hassle.

In the case of one of the things that I have in our local branch, the !DL case does the wrong thing (or, at least, probably does the wrong thing).  It's easy to make sure that the !DL case does *something*, but it's hard to be sure that that something is actually correct.

David





More information about the llvm-dev mailing list