diff options
| author | Guozhi Wei <carrot@google.com> | 2019-12-04 16:01:20 -0800 |
|---|---|---|
| committer | Guozhi Wei <carrot@google.com> | 2019-12-06 09:53:53 -0800 |
| commit | 72942459d070cbfe6f3524e89c3ac37440be7890 (patch) | |
| tree | 6a45cb456c8fff75ba7c89eb4156254ef6d485d8 /llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp | |
| parent | 164e0fc5c7f782b174db5c87b37725ea0e174853 (diff) | |
| download | bcm5719-llvm-72942459d070cbfe6f3524e89c3ac37440be7890.tar.gz bcm5719-llvm-72942459d070cbfe6f3524e89c3ac37440be7890.zip | |
[MBP] Avoid tail duplication if it can't bring benefit
Current tail duplication integrated in bb layout is designed to increase the fallthrough from a BB's predecessor to its successor, but we have observed cases that duplication doesn't increase fallthrough, or it brings too much size overhead.
To overcome these two issues in function canTailDuplicateUnplacedPreds I add two checks:
make sure there is at least one duplication in current work set.
the number of duplication should not exceed the number of successors.
The modification in hasBetterLayoutPredecessor fixes a bug that potential predecessor must be at the bottom of a chain.
Differential Revision: https://reviews.llvm.org/D64376
Diffstat (limited to 'llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp')
0 files changed, 0 insertions, 0 deletions

