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

Bill Wendling via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat May 2 05:16:13 PDT 2020


void added a comment.

In D77849#1981966 <https://reviews.llvm.org/D77849#1981966>, @efriedma wrote:

> > branch-folder should probably assert when removing a MachineBasicBlock that has its address taken.
>
> My convcern here is that we aren't very aggressive about dropping blockaddresses at the IR level, so we could end up with an "address-taken" block that doesn't actually have any callbr/indirectbr predecessors.


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?

Also, if some degenerate were to write some heresy like this, would LLVM be able to handle it?

    %ba = blockaddress label %indirect
    store %ba, %some_stack_slot
  
  ...
  
    %ba_reload = load %some_stack_slot
    callbr ... (%ba_reload)


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