[LLVMdev] Proposal: extended MDString syntax

Chandler Carruth chandlerc at google.com
Wed Jun 26 16:36:06 PDT 2013


On Wed, Jun 26, 2013 at 4:30 PM, Eric Christopher <echristo at gmail.com>wrote:

> Off the cuff I'd think that IR containing MF seems most reasonable and
> the use of metadata to contain it seems to be good from two
> perspectives I think:
>
> a) it already exists,
>
b) oddly enough that we could get rid of the metadata and still have a
> valid module/compilation unit seems like it might be interestingly
> useful, but I'm not sure what uses there are off the top of my head.
>

I'll give the reason why I like this having just thought about it a while:

I think of this as a pre-lowered hint. IE, take some IR, and give a hint to
the code generator to lower like this over here. I see a few benefits of
this model:

- It makes it reasonably easy to only specify the MI for the bit you really
are trying to test. You can let the normal lowering process handle any
other bits. I think this will help keep test cases small and reasonable.

- It makes it easy to re-baseline when the code generator changes but the
changes are acceptable -- strip metadata and run it through the existing
pipeline.

- It has the potential to be "incomplete" or of varying degrees of
completeness which I think will be useful in testing different layers of
the system... but Dan probably has more/better thoughts on this front than
I do.


The one thing I don't really like about the reversed model of MI containing
IR is that now the MI model has to be "complete", so we have to invent what
that means. I'm not really interested in this outside of generating test
cases, so anything that simplifies the space of what we have to design
*really* appeals to me.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130626/c5b5abd1/attachment.html>


More information about the llvm-dev mailing list