[LLVMdev] memory lifetime and invariance

Nick Lewycky nicholas at mxc.ca
Mon May 25 14:06:35 PDT 2009


Chris Lattner wrote:
> On May 23, 2009, at 1:47 PM, Nick Lewycky wrote:
> 
>> Chris Lattner wrote:
>>> On May 23, 2009, at 12:04 PM, Nick Lewycky wrote:
>>>>> That sounds like a serious bug then: {} should be a first class  
>>>>> value
>>>>> just like {i32}.
>>>> Okay then. I've just posted a patch to llvm-commits which would do
>>>> that:
>>>> http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20090518/077934.html
>>> Why not separate the two patches: making {} legal shouldn't be tied  
>>> to
>>> the new MD type switchover.
>> That would allow people to use metadata in their instructions.
> 
> You can reject that in different ways!

I'm a total liar. This program passes the verifier:

   define {} @foo({}* %x) {
     %A = load {}* %x
     store {} {}, {}* %x
     ret {} %A
   }

However, if you switch the store to say:

   store {} !"foo", {}* %x

it complains about invalid use of metadata. So everything's good in the 
tree right now, ignore me.

Nick




More information about the llvm-dev mailing list