[LLVMdev] Landing my new development on the trunk ...
Brian West
bnwest at rice.edu
Wed Oct 27 13:29:25 PDT 2010
Here is the patch for the new Operator Strength Reduction optimization
pass that I have written. The bulk of the code is in
lib/Transforms/Scalar/OperatorStrengthReduce.cpp
The optimization is based on the algorithm described within the paper
that can be found here:
http://portal.acm.org/citation.cfm?id=504709.504710
Keith D. Cooper , L. Taylor Simpson , Christopher A. Vick, Operator
strength reduction, ACM Transactions on Programming Languages and
Systems (TOPLAS), v.23 n.5, p.603-625, September 2001.
I have embedded the paper's pseudo code into comment blocks within the code.
The algorithm finds reduction opportunities in both array accesses and
explicit multiplications within loops.
Next, I plan on writing the regression tests.
thanks,
Brian
Brian West <bnwest <at> rice.edu> writes:
> I am currently writing a new optimization pass for LLVM, based on the
> paper Operator Strength Reduction (Taylor Simpson et al, 2001). I
> noticed from the Developer Policy page that my code will need to be
> reviewed before it is committed to the trunk.
>
> The Policy page also indicated that all "major" changes should to be
> announced before coding and should be done as a series of incremental
> changes. I am not sure a new stand alone optimization pass counts as a
> major change or not.
>
> I have run my pass against the test suite (as described here: "How to
> test my pass"
> http://comments.gmane.org/gmane.comp.compilers.llvm.devel/32875). I
> have fixed all of the compilation errors and all but one of the
> execution errors.
>
> I have made a pass over my code to conform to the LLVM coding standards.
>
> I have not written the regressions tests yet.
>
> I also still need to work on the performance, but as is it is faster
> than the existing -loop-reduce pass.
>
> My question is how to proceed. What steps do I need to take to get my
> code reviewed and committed to the trunk?
>
> thanks,
> Brian West
Duncan Sands <baldrick <at> free.fr> writes:
> Hi Brian,
>
> > My question is how to proceed. What steps do I need to take to get my
> > code reviewed and committed to the trunk?
>
> the first step is to send a patch adding your pass (and hopefully the
> associated documentation!) to LLVM to the mailing list, so that others
> can test and study your code.
>
> Ciao,
>
> Duncan.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: osr.patch
Type: application/octet-stream
Size: 81300 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20101027/faef5b6d/attachment.obj>
More information about the llvm-dev
mailing list