[LLVMdev] RFP: Metadata is being used poorly to paper over missing IR constructs
Chris Lattner
clattner at apple.com
Fri Jan 9 13:21:41 PST 2015
On Jan 8, 2015, at 2:06 PM, Chandler Carruth <chandlerc at gmail.com> wrote:
> #1
> We need the ability to put semantic information in the IR that can be used by targets without extending the IR itself. In some cases we can do this with target-specific intrinsics, but those don't always fit the problem and have their own set of challenges.
+1, depending on the details :-)
> #2
> We need to make module flags a first class entity of the module, just like datalayout:
>
> &flag = ....
>
> (syntax shamelessly stolen from Duncan's suggestion in IRC)
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...
-Chris
More information about the llvm-dev
mailing list