[RISCV] Add the GlobalMerge pass (disabled by default)
authorAlex Bradbury <asb@igalia.com>
Fri, 9 Sep 2022 01:40:21 +0000 (18:40 -0700)
committerCraig Topper <craig.topper@sifive.com>
Fri, 9 Sep 2022 01:40:38 +0000 (18:40 -0700)
commit51ae462447d9557c681844c2056b1075c748a7af
treefb95071474993588fe233a57bcd66d2594e9aba5
parentf9b59249757eb2213798b97869ff9b9dbc6441a7
[RISCV] Add the GlobalMerge pass (disabled by default)

Split out from D129178, this just adds the GlobalMerge tests (other than global-merge-minsize.ll which is testing a specific configuration of the pass when it's enabled) and exposes `-riscv-enable-global-merge` and //doesn't enable it by default//.

Note that the comment "// FIXME: Unify control over GlobalMerge." is copied from the Arm and AArch64 backends, which expose the same flag. Presumably the author is imagining some later refactoring that provides a target-independent flag.

Reviewed By: craig.topper, reames, hiraditya

Differential Revision: https://reviews.llvm.org/D130481
llvm/lib/Target/RISCV/RISCVTargetMachine.cpp
llvm/test/CodeGen/RISCV/global-merge-offset.ll [new file with mode: 0644]
llvm/test/CodeGen/RISCV/global-merge.ll [new file with mode: 0644]