[llvm-commits] [llvm] r69574 - /llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp
sanjiv.gupta at microchip.com
Wed Apr 22 06:53:54 CDT 2009
Duncan Sands wrote:
> Hi Sanjiv,
>>>>>> Before trying to introduce/eliminate cast/ext/trunc to make indices type as
>>>>>> pointer type, make sure that the pointer size is a valid sequential index type.
>>> I think a better approach would be to add a "get preferred type for GEP indices"
>>> method to TargetData. This would return getIntPtrType on most targets, and i16
>>> on PIC16. Then change this transform to use the type given by that method rather
>>> than getIntPtrType.
>> I think you meant i32 on PIC16, because i16 indices are still not
>> allowed to GEP.
> sure, if that's what PIC16 wants. Anyway, the point is to decouple the GEP index
> type from pointer types in a clean way, by introducing new abstractions.
This whole thing is actually a work around for r58505. i16 indices would
be great for pic16 as they won't deny such inst combine optimization to
it. When I fix that up this thing here and corresponding things in clang
will not be needed.
More information about the llvm-commits