[PATCH] D100094: [ARM] This patch adds some simplifications to ARMBlockPlacement Pass.
Malhar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 8 03:18:15 PDT 2021
malharJ added a comment.
I'm putting some details of my understanding of the existing logic, and how it is being simplified by this patch:
-------------
**Existing logic:**
When moving the loopExit forwards (after preheader), 4 things can be considered:
1. directionality of WLS (if any) within the loopExit should not regress (forward->backward).
2. directionality of LE (if any) within the loopExit should not regress (backward->forward).
3. directionality of WLS to the loopExit should not regress (forward->backward).
4. directionality of LE to the loopExit should not regress (backward->forward).
Existing code takes care to handle cases 1) and 4).
There is no need to handle 2) and 3) since they can not regress due to moving forward.
**Simplification: **
But if we move preHeader backwards (before loopExit), the same 4 points above can be considered but
now in the context of moving the preHeader:
- 1) & 2) above cannot occur since existing WLS is a terminator and there can't be another WLS/LE in the same block.
- 3) is the only case that needs to be handled
- 4) Any LE to PreHeader cannot regress if moving backwards.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D100094/new/
https://reviews.llvm.org/D100094
More information about the llvm-commits
mailing list