[PATCH] D126930: Fix interaction of CFI instructions with MachineOutliner.

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 2 16:40:50 PDT 2022


efriedma planned changes to this revision.
efriedma added a comment.

Should be possible to add a testcase, I think.  Testcases are a bit tricky to write, though.

Need to think about the MachineOutliner.cpp change a bit more; it's broken.

I guess if we're tail-calling, and we grab all the CFI instructions, it should be okay to just clone all of them?  But that's making me doubt the way CFI instructions are being counted; I don't think it's safe to say that getFrameInstructions().size() is actually the number of CFI instructions in the function.  It is if you're writing MIR testcases for MachineOutliner, because of the way serialization works, but I don't think that works in general.

If we fix that check, and fix MachineOutliner.cpp to properly clone the instructions, then I guess everything works?  But I'd have to spend a day writing testcases.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D126930



More information about the llvm-commits mailing list