On Feb 27, 2007, at 6:52 PM, Reid Spencer wrote:

> Chris,
>
> How far do we want to go with conversion to APInt? Does this  
> include GEP
> indices too? For example, consider this code from
> lib/Analysis/ConstantFolding.cpp
>
>>    if (isFoldableGEP) {
>>       uint64_t Offset = TD->getIndexedOffset(Ptr->getType(),
>>                                              (Value**)Ops+1,  
>> NumOps-1);
>>       Constant *C = ConstantInt::get(TD->getIntPtrType(), Offset);
>>       return ConstantExpr::getIntToPtr(C, ResultTy);
>>     }
>
> The TargetData class could be altered to return an APInt value instead
> of a uint64_t. This would then be used to construct the ConstantInt.
> This would allow addressing beyond 64-bits but it seems like  
> overkill to
> me.


I agree, totally overkill.  GEP should continue to allow int32 or  
int64 only,

Thanks,

-Chris
_______________________________________________
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

Reply via email to