[cfe-dev] [LLVMdev] [RFC] Module Flags Metadata
wendling at apple.com
Tue Jan 24 12:02:16 PST 2012
On Jan 24, 2012, at 1:35 AM, Chandler Carruth wrote:
> On Wed, Jan 18, 2012 at 1:36 PM, Bill Wendling <wendling at apple.com> wrote:
> This is a proposal for implementing "module flags". Please take a look at this and give any feedback you may have.
> I have only one real comment -- this violates the contract and spirit of LLVM's metadata design. You're specifically encoding semantics in metadata, but the principle of metadata is that a program with all metadata stripped has the same behavior as one with the metadata still in place.
> I think what you're really talking about are Module-level attributes much like we have function attributes. These have inherently significant semantics, and must be handled explicitly, not simply dropped when unknown.
> Anyways, that's my only real comment about the proposal. I think you need something other than metadata to encode this.
I had thought of that too (and having a module-level attribute scheme), but I was surprised when I found out that named metadata wasn't "strippable" from modules. (You can't strip them via the 'opt' command.) Chris assured me that they were meant to stick around...
More information about the cfe-dev