[PATCH] D107083: [AArch64] Unroll loop with iv of pointer type
JinGu Kang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 29 13:18:16 PDT 2021
jaykang10 added a comment.
In D107083#2913968 <https://reviews.llvm.org/D107083#2913968>, @nikic wrote:
> This looks very dubious. `UP.Force` means that you are unrolling without folding //anything//. You just repeat the loop body and keep //all// the branches. This is unlikely to be profitable in general.
>
> Note that this has nothing to do with pointer types -- you simply have a loop where the only exit is unpredictable.
@nikic Thanks for your comment. Let me explain something more.
If the IV's type is pointer type, we can see `gep` for the IV.
AArch64 has pre/post indexing address mode. If we unroll loop with IV of pointer type which is `gep`, there will be more opportunities in order to generate instructions with the pre/post indexing address mode. That's why I mentioned the IV of pointer type and try to unroll the loop with it even though the exit count is not computable.
I need to add heuristics to recognize the profitable case in general. I am trying to get performance number in order to do it.
I am sorry for poor example and explanation...
If you feel something wrong, please let me know. I would like to discuss it and get ideas more.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D107083/new/
https://reviews.llvm.org/D107083
More information about the llvm-commits
mailing list