[cfe-dev] [LLVMdev] [RFC] Encoding Compile Flags into the IR

dag at cray.com dag at cray.com
Mon Apr 30 13:00:01 PDT 2012


Bill Wendling <wendling at apple.com> writes:

> Link-Time Optimization has a problem. We need to preserve some of the
> flags with which the modules were compiled so that the semantics of
> the resulting program are correct. For example, a module compiled with
> `-msoft-float' should use library calls for floating point. And that's
> only the tip of the proverbial iceberg.

This is an important missing feature.

> - Named metadata would be used for those options which affect code
> generation for the functions, but which doesn't prevent two modules
> from being merged together. For example, `-fomit-frame-pointer'
> applies to individual functions, but it doesn't prevent a module
> compiled with `-fno-omit-frame-pointer' from being merged with one
> compiled with `-fomit-frame-pointer'. We would use a named metadata
> flag:

Doesn't this violate the "no semantics" requirement of metadata?  What
happens if the metadata gets dropped?

                           -Dave



More information about the cfe-dev mailing list