[PATCH] D122634: [RISCV] Do not outline CFI instructions when they are needed in EH

Wang Pengcheng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 12 23:31:40 PDT 2022


pcwang-thead added a comment.

In D122634#3441112 <https://reviews.llvm.org/D122634#3441112>, @luismarques wrote:

> We this change we now don't have any tests that show a difference compared with just `if (MI.isPosition()) return outliner::InstrType::Illegal;`
> Please add a test that showcases that new, more fined grained, outlining criteria for position instructions.

Thanks for your advice, but what I changed in this patch is just the way to handle CFIs when unwinding is needed.
The original code is:

  if (MI.isPosition()) {
      // We can manually strip out CFI instructions later.
      if (MI.isCFIInstruction())
        return outliner::InstrType::Invisible;
      return outliner::InstrType::Illegal;
  }

These conditions existed since the first version of outlining implementation (D66210 <https://reviews.llvm.org/D66210>), so we won't see any differences of position instructions even if I added some tests in this patch.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D122634



More information about the llvm-commits mailing list