[llvm-commits] [llvm] r122567 - /llvm/trunk/lib/Transforms/Scalar/LoopIdiomRecognize.cpp

Chris Lattner clattner at apple.com
Sun Dec 26 14:10:38 PST 2010


On Dec 26, 2010, at 1:08 PM, Duncan Sands wrote:

> Hi Chris,
> 
>> +  // Check to see if the store updates all bits in memory.  We don't want to
>> +  // process things like a store of i3.  We also require that the store be a
>> +  // multiple of a byte.
>> +  uint64_t SizeInBits = TD->getTypeSizeInBits(StoredVal->getType());
>> +  if ((SizeInBits&  7) || (SizeInBits>>  32) != 0 ||
>> +      SizeInBits != TD->getTypeStoreSizeInBits(StoredVal->getType()))
>> +    return false;
> 
> will this catch the case of storing a first class struct or array?

I'm not sure what you mean.  My intent is to start simple and just handle strided stores that satisfy isBytewiseValue.  There are many interesting forms of loops that aren't like this, they will be added over time.

-Chris 



More information about the llvm-commits mailing list