[LLVMdev] memory lifetime and invariance

Chris Lattner clattner at apple.com
Sat May 23 13:32:08 PDT 2009


On May 20, 2009, at 1:46 PM, Eli Friedman wrote:

> On Wed, May 20, 2009 at 1:29 PM, Chris Lattner <clattner at apple.com>  
> wrote:
>>> The verifier rejects phi nodes of {} type. Do you actually have a  
>>> case
>>> where you want this to happen?
>>
>> That sounds like a serious bug then: {} should be a first class value
>> just like {i32}.
>
> But in any case, it doesn't really make sense; wouldn't any value of
> type {} fold to the constant "{} {}"?  If you need an opaque value,
> i8* seems much more appropriate.

Or better yet, {} undef.  :)  This is a vacuous truth, but it doesn't  
mean that we don't have to use it and perform the substitution.  Per  
design, if someone did that transformation, the IR would still be  
correct, just not very useful.

-Chris



More information about the llvm-dev mailing list