[PATCH] D43876: [LoopUnroll] Peel off iterations if it makes conditions true/false.
Jun Bum Lim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 8 07:16:55 PST 2018
junbuml added a comment.
> My transform selects a region of conditionally executed blocks and then attempts to hoist conditional statements into the head block of that region.
Will your pass merge some blocks under same condition into a group in the loop? I'm curious if the conditional branch is removed in the loop?
> Just FYI, I am also currently working on a pass to handle slightly more generic cases within the loop body, such like:
>
> for (unsigned i = 0; i; i < 1000; ++i) {
> if (i < M)
> ... something
> else
> ... something else
> }
>
> My transformation operates on the unrolled version and also attempts to remove selects if the loop body has been simplified into one block. Hopefully I will be able to get an initial version up for review and discussion next week.
I'm not sure if I fully understand what your pass will do. It would be great if you can show how this code would be transformed after your pass ?
https://reviews.llvm.org/D43876
More information about the llvm-commits
mailing list