xref: /aosp_15_r20/external/swiftshader/third_party/llvm-16.0/llvm/lib/Target/RISCV/RISCVMacroFusion.h (revision 03ce13f70fcc45d86ee91b7ee4cab1936a95046e)
1 //===- RISCVMacroFusion.h - RISCV Macro Fusion ----------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 /// \file This file contains the RISCV definition of the DAG scheduling mutation
10 /// to pair instructions back to back.
11 //
12 //===----------------------------------------------------------------------===//
13 
14 #ifndef LLVM_LIB_TARGET_RISCV_RISCVMACROFUSION_H
15 #define LLVM_LIB_TARGET_RISCV_RISCVMACROFUSION_H
16 
17 #include "llvm/CodeGen/MachineScheduler.h"
18 
19 namespace llvm {
20 
21 /// Note that you have to add:
22 ///   DAG.addMutation(createRISCVMacroFusionDAGMutation());
23 /// to RISCVPassConfig::createMachineScheduler() to have an effect.
24 std::unique_ptr<ScheduleDAGMutation> createRISCVMacroFusionDAGMutation();
25 
26 } // namespace llvm
27 
28 #endif
29