[PATCH] D114895: [SelectionDagBuilder] improve CallBrInst BlockAddress constraint handling

James Y Knight via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 9 15:14:27 PST 2021


jyknight added a comment.

> The current design allows you to use blockaddress constants in code outside the asm goto to compute the destination of an asm goto, I think? At least, the IR definition looks like it allows that; not sure how well it works in practice.

That was the original intent of the design for the IR, yes -- you could e.g. store an array of blockaddresses in a global constant, and have the asm look up where to jump in that. You still need to specify all the possibilities in the "to label..." list on the callbr, but there's no reason for them to be direct input values, in such a case.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D114895



More information about the llvm-commits mailing list