[PATCH] D51153: Break LoopUtils into an Analysis file.
Dave Green via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 5 02:47:29 PDT 2018
dmgreen added a comment.
Hello
These classes to me look large enough to warrant their own file. Maybe something like RecurrenceDescriptor.h/cpp? Or a name that captures InductionDescriptor too? I'm not sure what that would be though..
I'd also recommend splitting the transformation parts out into other functions we you can, then the Base's from here can just become the standard classes.
================
Comment at: llvm/Transforms/Utils/LoopUtils.h:77
/// Returns a Min/Max operation corresponding to MinMaxRecurrenceKind.
static Value *createMinMaxOp(IRBuilder<> &Builder, MinMaxRecurrenceKind RK,
Value *Left, Value *Right);
----------------
As this function is static, how about turning it into a free standing function and removing RecurrenceDescriptor (renaming RecurrenceDescriptorBase to RecurrenceDescriptor)
================
Comment at: llvm/Transforms/Utils/LoopUtils.h:93
/// flags, which can be found from the original scalar operations.
Value *transform(IRBuilder<> &B, Value *Index, ScalarEvolution *SE,
const DataLayout& DL) const;
----------------
This is only used in the vectoriser? Perhaps again make it stand alone (perhaps in LoopVectoriser.cpp if it fits better there).
Repository:
rL LLVM
https://reviews.llvm.org/D51153
More information about the llvm-commits
mailing list