[RISCV] Enable the machine outliner for RISC-V
authorlewis-revill <lewis.revill@embecosm.com>
Thu, 19 Dec 2019 16:41:53 +0000 (16:41 +0000)
committerlewis-revill <lewis.revill@embecosm.com>
Thu, 19 Dec 2019 16:41:53 +0000 (16:41 +0000)
commita116f28a0d71c221c1dc023908b180beaf22799d
treeb82fee045e7cb6c303572bf631938fcd08f85be4
parentba430f503244d1498529d47f31090cdf79b5c231
[RISCV] Enable the machine outliner for RISC-V

This patch enables the machine outliner for RISC-V and adds the
necessary logic for checking whether sequences can be safely outlined,
and describing how they should be outlined. Outlined functions are
called using the register t0 (x5) as the return address register, which
must be available for an occurrence of a sequence to be safely outlined.

Differential Revision: https://reviews.llvm.org/D66210
llvm/lib/Target/RISCV/RISCVInstrInfo.cpp
llvm/lib/Target/RISCV/RISCVInstrInfo.h
llvm/lib/Target/RISCV/RISCVTargetMachine.cpp
llvm/test/CodeGen/RISCV/machineoutliner.mir [new file with mode: 0644]