<div dir="ltr">Hi Arnold, Nadav, Hal,<div><br></div><div style>This patch works with the tests attached (the examples I had before), and it just vectorize the most conservative one, for now. Let me know if you can think of other examples, so I can test and include in my list of tests.</div>
<div style><br></div><div style>Considerations:</div><div style><br></div><div style>1. I'm using std::multimap, which Hal found to be not as efficient as DenseMap<SmallVector<>>. I might start using them, as soon as I'm sure this algorithm makes sense.</div>
<div style><br></div><div style>2. I'm storing the load/store instruction with both ReadWrites and WriteObjects. This is ineffective, but was a way to make sure I got the right stores when dealing with the right underlying objects (since I'll be iterating through them all). I'll re-think about this relationship, and try to find the most cost-effective (space-wise) solution.</div>
<div style><br></div><div style>3. I'm getting max vector register width for the vectorized access size, which might not be the best thing, but since the cost model is the one that calculates the vectorization factor, and we only create it *after* the legalization has finished, I didn't want to wrap initializaitons around, nor to duplicate code. Ideas welcome.<br>
</div><div style><br></div><div style>4. BasicAA seems to be getting it right, when I pass the strides and access sizes, and it's not being too optimistic.</div><div style><br></div><div style>Please, be aware that this patch is still not good for merge, I'm just looking for a confirmation that it does make sense.</div>
<div style><br></div><div style>I don't want to add any RT checks for this first patch, but we'll need something like that for later...</div><div style><br></div><div style>Thanks!</div><div style>--renato</div></div>