[PATCH] D129288: [IR] Don't use blockaddresses as callbr arguments

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 7 07:23:43 PDT 2022


nikic added a comment.

In D129288#3635732 <https://reviews.llvm.org/D129288#3635732>, @jyknight wrote:

> Can't we remove blocks from the callbr target list in some circumstances? E.g. if we merge two blocks maybe?

I believe we currently don't allow doing that, see e.g. the check in https://github.com/llvm/llvm-project/blob/26f369393d4e60c78d872c4cafcbf3fd929b9004/llvm/lib/Transforms/Utils/Local.cpp#L1092. This is because we currently don't allow callbr to have the same successor multiple times (though I think we //should// allow that, to allow transforms like these.)


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

https://reviews.llvm.org/D129288



More information about the llvm-commits mailing list