[PATCH] D149130: [PartialInlining] Fix incorrect costing when IR has unreachable BBs

Vedant Paranjape via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 25 20:41:35 PDT 2023


vedant-amd added a comment.

In D149130#4296268 <https://reviews.llvm.org/D149130#4296268>, @jdoerfert wrote:

> Generally, I don't believe we should run elimination in all passes. 
> Instead, use the dominance tree to walk the blocks of a function, or walk it by manually following the control edges.



In D149130#4296268 <https://reviews.llvm.org/D149130#4296268>, @jdoerfert wrote:

> Generally, I don't believe we should run elimination in all passes. 
> Instead, use the dominance tree to walk the blocks of a function, or walk it by manually following the control edges.

Adding a check here to see if the given basic block (or region of basic blocks) has a pred makes sense: https://github.com/llvm/llvm-project/blob/8fc1764ef3d18b65b52f82ca4a6bf56ac024e589/llvm/lib/Transforms/IPO/PartialInlining.cpp#L1182

Should I try to implement that using DT ?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D149130/new/

https://reviews.llvm.org/D149130



More information about the llvm-commits mailing list