[RISCV] Do not outline CFI instructions when they are needed in EH
authorwangpc <pc.wang@linux.alibaba.com>
Fri, 22 Apr 2022 04:22:36 +0000 (12:22 +0800)
committerwangpc <pc.wang@linux.alibaba.com>
Fri, 22 Apr 2022 04:28:19 +0000 (12:28 +0800)
commit5c3ea078482d5442a99f6e9387a96946b5094d15
treefe83fb0679d151ebf23bd36a68e3b4130a890840
parent6ee890b79e66f5a0e10f966a833a951656759f10
[RISCV] Do not outline CFI instructions when they are needed in EH

We saw a failure caused by unwinding with incomplete CFIs, so we
can't outline CFI instructions when they are needed in EH.

This is a recommit of 0d40688, which was reverted in ce83883 as
related precommit test 360d44e caused some errors.

Reviewed By: luismarques

Differential Revision: https://reviews.llvm.org/D122634
llvm/lib/Target/RISCV/RISCVInstrInfo.cpp
llvm/test/CodeGen/RISCV/machine-outliner-throw.ll