[LLVMdev] [llvm-commits] [PATCH] BasicBlock Autovectorization Pass
evan.cheng at apple.com
Sun Nov 27 18:34:43 PST 2011
This is very interesting work. Thanks. Quick questions / comments.
1. What's the algorithm complexity?
2. Please rename -vectorize to -bb-vectorize since this is a specific kind of vectorization.
3. Have you tried non-x86 targets? Does it work? If not, what would it take to make it work?
I am concerned that LLVM currently does not have a cost model for vectorization. That's necessary for your work to be applicable for general adoption.
On Nov 23, 2011, at 8:52 AM, Hal Finkel wrote:
> On Mon, 2011-11-21 at 21:22 -0600, Hal Finkel wrote:
>> On Mon, 2011-11-21 at 11:55 -0600, Hal Finkel wrote:
>>> I've attached an updated patch. It contains a few bug fixes and many
>>> (refactoring and coding-convention) changes inspired by your comments.
>>> I'm currently trying to fix the bug responsible for causing a compile
>>> failure when compiling
>>> test-suite/MultiSource/Applications/obsequi/toggle_move.c; after the
>>> pass begins to fuse instructions in a basic block in this file, the
>>> aliasing analysis starts producing different (more pessimistic) query
>>> answers. I've never before seen it do this, and I'm not sure why it is
>>> happening. Also odd, at the same time, the numeric labels that are
>>> assigned to otherwise unnamed instructions, change. I don't think I've
>>> seen this happen either (they generally seem to stay fixed once
>>> assigned). I don't know if these two things are related, but if anyone
>>> can provide some insight, I'd appreciate it.
>> I think that I see what is happening in this case (please someone tell
>> me if this does not make sense). In the problematic basic block, there
>> are some loads and stores that are independent. The default aliasing
>> analysis can tell that these loads and stores don't reference the same
>> memory region. Then, some of the inputs to the getelementptr
>> instructions used for these loads and stores are fused by the
>> vectorization. After this happens, the aliasing analysis loses its
>> ability to tell that the loads and stores that make use of those
>> vector-calculated indices are independent.
> The attached patch works around this issue. Please review.
> Thanks again,
>>> In any case, this version of the patch should be much more suitable for
>>> your (or anyone else's) further review.
>>> Thanks again,
>>> On Thu, 2011-11-17 at 13:57 +0100, Tobias Grosser wrote:
>>>> On 11/17/2011 12:38 AM, Hal Finkel wrote:
>>>>> Tobias, et al.,
>>>>> Attached is the my autovectorization pass.
>>>> Very nice. Will you be at the developer summit? Maybe we could discuss
>>>> the integration there?
>>>> Here a first review of the source code.
> Hal Finkel
> Postdoctoral Appointee
> Leadership Computing Facility
> Argonne National Laboratory
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
More information about the llvm-dev