[RISCV] Split the pseudo instruction splitting pass
authorLuís Marques <luismarques@lowrisc.org>
Mon, 29 Jun 2020 10:03:26 +0000 (11:03 +0100)
committerLuís Marques <luismarques@lowrisc.org>
Mon, 29 Jun 2020 13:35:57 +0000 (14:35 +0100)
commit2cb0644f90b7deda78fd5a4df4b74e25bd1db701
tree29902d562b9b6914d3b93a8380a179ff0b49bff8
parentd1df56023132914b877e34f6cf475758a96540f2
[RISCV] Split the pseudo instruction splitting pass

Extracts the atomic pseudo-instructions' splitting from `riscv-expand-pseudo`
/ `RISCVExpandPseudo` into its own pass, `riscv-expand-atomic-pseudo` /
`RISCVExpandAtomicPseudo`. This allows for the expansion of atomic operations
to continue to happen late (the new pass is added in `addPreEmitPass2`, so
those expansions continue to happen in the same place), while the remaining
pseudo-instructions can now be expanded earlier and benefit from more
optimization passes. The nonatomics pass is now added in `addPreSched2`.

Differential Revision: https://reviews.llvm.org/D79635
llvm/lib/Target/RISCV/CMakeLists.txt
llvm/lib/Target/RISCV/RISCV.h
llvm/lib/Target/RISCV/RISCVExpandAtomicPseudoInsts.cpp [new file with mode: 0644]
llvm/lib/Target/RISCV/RISCVExpandPseudoInsts.cpp
llvm/lib/Target/RISCV/RISCVTargetMachine.cpp
llvm/test/CodeGen/RISCV/codemodel-lowering.ll