[PATCH] D127353: FunctionPropertiesAnalysis: handle callsite BBs that lose edges

Mircea Trofin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 8 15:05:30 PDT 2022


mtrofin created this revision.
mtrofin added reviewers: kazu, Northbadge.
Herald added a subscriber: hiraditya.
Herald added a project: All.
mtrofin requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

There could be successors that were reached before but now are only
reachable from elsewhere in the CFG.

Suppose the following diamond CFG (lines are arrows pointing down):

    A
  /   \

B     C

  \   /
    D

There's a call site in C that is inlined. Upon doing that, it turns out
it expands to:

  call void @llvm.trap()
  unreachable

D isn't reachable from C anymore, but we did discount it when we set up
FunctionPropertiesUpdater, so we need to re-include it here.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D127353

Files:
  llvm/lib/Analysis/FunctionPropertiesAnalysis.cpp
  llvm/unittests/Analysis/FunctionPropertiesAnalysisTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D127353.435354.patch
Type: text/x-patch
Size: 3313 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220608/75168846/attachment.bin>


More information about the llvm-commits mailing list