[PATCH] D134557: [BranchRelaxation] Fall through only if block has no unconditional branches

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 7 14:05:34 PDT 2022


efriedma added a comment.

Okay, that's more straightforward.

I think we need to distinguish between (2) and (3) somehow (unconditional branch, vs. conditional branch + fallthrough).  Should we be checking `Cond.empty()`?

> analyzeBranch returns false when it is able to infer the terminators of the basic block

Right... and when it fails to analyze (i.e. returns true), you assume there is no fallthrough.  I don't think that's a safe assumption.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D134557



More information about the llvm-commits mailing list