[llvm-commits] [llvm] r62301 - /llvm/trunk/include/llvm/CodeGen/AsmPrinter.h

Chris Lattner clattner at apple.com
Thu Jan 15 20:53:27 PST 2009


On Jan 15, 2009, at 8:25 PM, Sanjiv.Gupta at microchip.com wrote:
>> I don't think this is the right approach.  EmitConstantValueOnly
>> should handle this case directly by checking to see if you have a
>> directive to emit a 32-bit integer value.  This is how we handle  
>> "lack
>> of i64 emission" on 32-bit targets.
>>
>> -Chris
>>
> (Size > 4) is hard coded in EmitGlobalConstant().
>
> } else if (const ConstantInt *CI = dyn_cast<ConstantInt>(CV)) {
>    // Small integers are handled below; large integers are handled
> here.
>    if (Size > 4) {
>      EmitGlobalConstantLargeInt(CI);
>      return;
>    }
>
> This needs to be fixed to check if the target has a directive to print
> that Size.

Sure, absolutely.

> The other thing is that if these constants are going to exist
> in rom address space we need to emit them in a different way. I am not
> sure if we have this functionality available in the generic code.

I'd suggest adding a hook for emitting non-default address space  
globals that is separate. This is not the right place to overload these.

>
> Currently we are handling these cases in a target specific manner,  
> but I
> agree that the AsmPrinter framework should be enhanced/fixed to handle
> such things. We will probably take that up after 2.5 if you guys  
> agree.

Sure, sounds great.  For 2.5, can we keep the method non-virtual?

-Chris



More information about the llvm-commits mailing list