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

Nick Desaulniers via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 27 17:48:45 PDT 2020


nickdesaulniers added a comment.

Re: https://reviews.llvm.org/D78586

it looks like `livevars` marks the physical reg `defs` in the `INLINEASM_BR` as `dead`, because its analysis is intrablock (as stated in a comment at the top of llvm/lib/CodeGen/LiveVariables.cpp), so it doesn't see the `uses` in the newly split block.  I wonder if for `INLINEASM_BR`, if we extend the analysis so that the split block was analyzed, if this would work?  A hacked up patch that marks all registers live post `INLINEASM_BR` post `livevars` allows the test case in D78586 <https://reviews.llvm.org/D78586> to pass, but I haven't looked at the codegen to see if anything terrible happened, or what other invariants were violated.  (maybe D78166 <https://reviews.llvm.org/D78166> or D78234 <https://reviews.llvm.org/D78234>). Actually, generated code looks good.  Let me see if that's feasible when cleaned up, tomorrow.


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