[PATCH] D43876: [LoopUnroll] Peel off iterations if it makes conditions true/false.

Sam Parker via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 8 01:58:17 PST 2018


samparker added a comment.

Yes, this is a really nice approach for lower constant bounds. My transform selects a region of conditionally executed blocks and then attempts to hoist conditional statements into the head block of that region. Currently I can find loop unrolled induction variable idioms as well as finding a connected path of conditional values. From there I can produce a fast path free of compares and branches, as well as leaving the original code as a fallback. I also split and remove selects because performing conditional moves is still expensive on our small cores as well as the increased register pressure they create.


https://reviews.llvm.org/D43876





More information about the llvm-commits mailing list