[RISCV] Enable MachineOutliner by default under -Oz for RISCV
authorwangpc <pc.wang@linux.alibaba.com>
Fri, 6 May 2022 09:30:49 +0000 (17:30 +0800)
committerwangpc <pc.wang@linux.alibaba.com>
Fri, 6 May 2022 09:37:45 +0000 (17:37 +0800)
commit4ff5e8184c665d7de6023a174fd132b20ccb8a40
treeb83305e61541cb78e4d34f0689001faee97c1ef1
parent0dfafa489230061cdde39d9e7294bb61d23f1064
[RISCV] Enable MachineOutliner by default under -Oz for RISCV

Enable default outlining when the function has the minsize attribute.

`addr-label.ll` crashed after enabling this, so a barrier is added before
instruction selection as a workaround.

Reviewed By: luismarques

Differential Revision: https://reviews.llvm.org/D122213
llvm/lib/Target/RISCV/CMakeLists.txt
llvm/lib/Target/RISCV/RISCVInstrInfo.cpp
llvm/lib/Target/RISCV/RISCVInstrInfo.h
llvm/lib/Target/RISCV/RISCVTargetMachine.cpp
llvm/test/CodeGen/RISCV/O3-pipeline.ll