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

Benjamin Kramer benny.kra at gmail.com
Mon Oct 20 06:00:45 PDT 2014


> On 19.10.2014, at 10:22, Chandler Carruth <chandlerc at gmail.com> wrote:
> 
> I've just wasted a day chasing my tail because of subtleties introduced to handle the optionality of the DataLayout. I would like to never do this again. =]

I'm wondering how large the engineering tradeoff actually is. 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. I debugged missing 'DL != nullptr' checks a couple of times, not the most pleasant task in the world but also not a big hassle.

- Ben

> 
> We now have this attached to the Module with just a flimsy faked-up pass to keep APIs consistent. So, is there any problem with beginning down the path of:
> 
> 1) Synthesizing a "default" boring DataLayout for all modules that don't specify one.
> 2) Changing the APIs to make it clear that this can never be missing and is always available.
> 3) Start ripping out all of the complexity in the compiler dealing with this.
> 
> If there isn't, I'm willing to do some of the leg work here.
> -Chandler
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev





More information about the llvm-dev mailing list