[LLVMdev] Landing my new development on the trunk ...

Eli Friedman eli.friedman at gmail.com
Wed Oct 27 18:34:56 PDT 2010


On Wed, Oct 27, 2010 at 1:29 PM, Brian West <bnwest at rice.edu> wrote:
> 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 algorithm finds reduction opportunities in both array accesses and
> explicit multiplications within loops.
>
> Next, I plan on writing the regression tests.

Comments:
1. Please don't top-post.
2. Instruction::getOpcodeName instead of your OpcodeToString function.
3. LLVM already has a significant amount of infrastructure for loop
passes; why does this pass have its own code for finding loops?
4. What's the use case for this pass?  Can this pass improve
performance of generated code beyond the existing -loop-reduce pass?
If not, could it usefully act as a faster replacement for -loop-reduce
for fast code generation? (Perhaps someone doing fast code generation
with LLVM could comment on whether -loop-reduce is useful, and whether
the performance is an issue.)

-Eli




More information about the llvm-dev mailing list