LLVM 20.0.0git
ARMLatencyMutations.h
Go to the documentation of this file.
1//===- ARMLatencyMutations.h - ARM Latency Mutations ----------------------===//
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 ARM definition DAG scheduling mutations which
10/// change inter-instruction latencies
11//
12//===----------------------------------------------------------------------===//
13
14#ifndef LLVM_LIB_TARGET_ARM_LATENCYMUTATIONS_H
15#define LLVM_LIB_TARGET_ARM_LATENCYMUTATIONS_H
16
19
20namespace llvm {
21
22class AAResults;
23class ARMBaseInstrInfo;
24
25/// Post-process the DAG to create cluster edges between instrs that may
26/// be fused by the processor into a single operation.
28public:
30 : ScheduleDAGMutation(), TII(t), AA(a) {}
31
32 void apply(ScheduleDAGInstrs *DAGInstrs) override;
33
34private:
35 virtual void modifyBypasses(SUnit &) = 0;
36
37protected:
41
42 static void setBidirLatencies(SUnit &SrcSU, SDep &SrcDep, unsigned latency);
43 static bool zeroOutputDependences(SUnit &ISU, SDep &Dep);
44 unsigned makeBundleAssumptions(SUnit &ISU, SDep &Dep);
45 bool memoryRAWHazard(SUnit &ISU, SDep &Dep, unsigned latency);
46};
47
48/// Note that you have to add:
49/// DAG.addMutation(createARMLatencyMutation(ST, AA));
50/// to ARMPassConfig::createMachineScheduler() to have an effect.
51std::unique_ptr<ScheduleDAGMutation>
53
54} // namespace llvm
55
56#endif
Post-process the DAG to create cluster edges between instrs that may be fused by the processor into a...
bool memoryRAWHazard(SUnit &ISU, SDep &Dep, unsigned latency)
static void setBidirLatencies(SUnit &SrcSU, SDep &SrcDep, unsigned latency)
ARMOverrideBypasses(const ARMBaseInstrInfo *t, AAResults *a)
static bool zeroOutputDependences(SUnit &ISU, SDep &Dep)
void apply(ScheduleDAGInstrs *DAGInstrs) override
unsigned makeBundleAssumptions(SUnit &ISU, SDep &Dep)
const ARMBaseInstrInfo * TII
Scheduling dependency.
Definition: ScheduleDAG.h:49
Scheduling unit. This is a node in the scheduling DAG.
Definition: ScheduleDAG.h:242
A ScheduleDAG for scheduling lists of MachineInstr.
Mutate the DAG as a postpass after normal DAG building.
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
std::unique_ptr< ScheduleDAGMutation > createARMLatencyMutations(const ARMSubtarget &ST, AAResults *AA)