summaryrefslogtreecommitdiffstats
path: root/llvm/test/Analysis/Delinearization
diff options
context:
space:
mode:
authorTaewook Oh <twoh@fb.com>2019-11-27 10:18:01 -0800
committertaewookoh <taewook.oh@gmail.com>2019-11-27 10:36:06 -0800
commitb19ec1eb3d0cbb3017e1bc7111efac5643cf4fdd (patch)
tree6e7f489dc4a3cb1a988d54b749ba62d1c23325f8 /llvm/test/Analysis/Delinearization
parentb208088a2111aeb805d0984a2ff86b3ce14c725a (diff)
downloadbcm5719-llvm-b19ec1eb3d0cbb3017e1bc7111efac5643cf4fdd.tar.gz
bcm5719-llvm-b19ec1eb3d0cbb3017e1bc7111efac5643cf4fdd.zip
[BPI] Improve unreachable/ColdCall heurstics to handle loops.
Summary: While updatePostDominatedByUnreachable attemps to find basic blocks that are post-domianted by unreachable blocks, it currently cannot handle loops precisely, because it doesn't use the actual post dominator tree analysis but relies on heuristics of visiting basic blocks in post-order. More precisely, when the entire loop is post-dominated by the unreachable block, current algorithm fails to detect the entire loop as post-dominated by the unreachable because when the algorithm reaches to the loop latch it fails to tell all its successors (including the loop header) will "eventually" be post-domianted by the unreachable block, because the algorithm hasn't visited the loop header yet. This makes BPI for the loop latch to assume that loop backedges are taken with 100% of probability. And because of this, block frequency info sometimes marks virtually dead loops (which are post dominated by unreachable blocks) super hot, because 100% backedge-taken probability makes the loop iteration count the max value. updatePostDominatedByColdCall has the exact same problem as well. To address this problem, this patch makes PostDominatedByUnreachable/PostDominatedByColdCall to be computed with the actual post-dominator tree. Reviewers: skatkov, chandlerc, manmanren Reviewed By: skatkov Subscribers: manmanren, vsk, apilipenko, Carrot, qcolombet, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D70104
Diffstat (limited to 'llvm/test/Analysis/Delinearization')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud