This avoid code duplication and allow us to add the disable unroll metadata elsewhere.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
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.
Comment Actions
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?
Comment Actions
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.