[PATCH] D38928: [LoopInfo][Refactor] Make SetLoopAlreadyUnrolled a member function of the Loop Pass, NFC.
Sanjoy Das via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Oct 15 00:00:43 PDT 2017
sanjoy added a comment.
In https://reviews.llvm.org/D38928#897925, @etherzhhb wrote:
> In https://reviews.llvm.org/D38928#897918, @sanjoy wrote:
>
> > LGTM
> >
> > I think the Loop class has grown quite a bit, and we should pull out some of the utility functions into a separate LoopUtils namespace, but this patch does not need to be blocked on that.
>
>
> Just out of curiosity, what are the principle to tell whether a function should be a member function of the Loop class or a utilities?
This is fairly subjective, but I tend to draw the line as: actions that can be performed on an object only using its public interface should be free functions. IOW, don't give a function access to private/protected members of a class if you don't have to.
Repository:
rL LLVM
https://reviews.llvm.org/D38928
More information about the llvm-commits
mailing list