[llvm-commits] [llvm] r87028 - /llvm/trunk/include/llvm/Value.h

Dan Gohman gohman at apple.com
Mon Nov 16 12:17:37 PST 2009


PseudoSourceValue's classof should have an
"|| V->getValueID() == FixedStackPseudoSourceValue", to properly
reflect the isa relationship. That would have avoided the
AsmPrinter problem, I believe.

In the longer term, Chris has convinced me that we shouldn't have
PseudoSourceValue inherit from Value anyway. It should be replaced
by some kind of discriminated union which can hold a Value* or a
CodeGen-specific handle. Fixing this will get rid of the unsightly
layering violation of having CodeGen-specific enum values in
Value.h altogether [0].

Dan

[0] The degree to which it actually is a layering violation
    and/or if it is whose fault that is is the subject of some
    contention, but it's not super important.

On Nov 15, 2009, at 11:12 PM, Evan Cheng wrote:

> Do we really want to differentiate FixedStackPseudoSourceValueVal as a distinct subclass at the IR level? This seems wrong to me.
> 
> Evan
> 
> On Nov 12, 2009, at 1:04 PM, David Greene wrote:
> 
>> Author: greened
>> Date: Thu Nov 12 15:04:19 2009
>> New Revision: 87028
>> 
>> URL: http://llvm.org/viewvc/llvm-project?rev=87028&view=rev
>> Log:
>> 
>> Fix a build error by providing a missing enum value.
>> 
>> Modified:
>>   llvm/trunk/include/llvm/Value.h
>> 
>> Modified: llvm/trunk/include/llvm/Value.h
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Value.h?rev=87028&r1=87027&r2=87028&view=diff
>> 
>> ==============================================================================
>> --- llvm/trunk/include/llvm/Value.h (original)
>> +++ llvm/trunk/include/llvm/Value.h Thu Nov 12 15:04:19 2009
>> @@ -226,7 +226,9 @@
>>    PseudoSourceValueVal,     // This is an instance of PseudoSourceValue
>>    FixedStackPseudoSourceValueVal, // This is an instance of PseudoSourceValue
>>    InstructionVal,           // This is an instance of Instruction
>> -    
>> +    FixedStackPseudoSourceValueVal, // This is an instance of 
>> +                                    // FixedStackPseudoSourceValue
>> +
>>    // Markers:
>>    ConstantFirstVal = FunctionVal,
>>    ConstantLastVal  = ConstantPointerNullVal
>> 
>> 
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
> 





More information about the llvm-commits mailing list