<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jan 9, 2015 at 1:21 PM, Chris Lattner <span dir="ltr"><<a href="mailto:clattner@apple.com" target="_blank">clattner@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">> #2<br>
> We need to make module flags a first class entity of the module, just like datalayout:<br>
><br>
> &flag = ....<br>
><br>
> (syntax shamelessly stolen from Duncan's suggestion in IRC)<br>
<br>
</span>I disagree. The concerns about “stability” of metadata don’t apply to module-level metadata that doesn’t refer to the other IR in the module. A nice thing about module-level metadata is that it eliminates the “need" to encode features like command line flags directly in the IR in a custom tailored way. There should be no need to design bitcode and .ll syntax for new things like command line flags. If we had module-level metadata back in day 1, targetdata would be using it...</blockquote></div><br></div><div class="gmail_extra">Calling whatever it is that encodes things in the module "metadata" makes that term less useful. I don't really care about the syntax or encoding, but I do very much care that we separate the terminology and APIs used for entities that have very fundamentally different behavior constraints.</div><div class="gmail_extra"><br></div><div class="gmail_extra">Metadata is discardable without changing correctness. These other things are not. We need two different ways to describe and manipulate them so that we don't continually get confused as to which case we are dealing with. And "module-level" isn't even a good predicate because some things at the module level are meeting the same constraints as the rest of metadata -- namely, debug information.</div></div>