[PATCH] D77849: [calcspillweights] mark LiveIntervals from INLINEASM_BR defs as not spillable

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 4 16:09:33 PDT 2020


efriedma added a comment.

> If a block has its address taken, whether it's used in a callbr or some other instruction, is it ever safe to remove the block if the blockaddress instruction referencing it still exists?

The way that indirectbr works is that blockaddress passes out an opaque value, and that address is supposed to be passed to the corresponding indirectbr.  It doesn't really matter where the blockaddress is computed; what matters is that there's an indirectbr that branches to the block mentioned in the blockaddress constant.

We don't promise that a blockaddress is usable for any other purpose.  If there is no indirectbr to pass the blockaddress to, there isn't anything constraining the opaque value, so it can be transformed to an arbitrary integer.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D77849





More information about the llvm-commits mailing list