LLVM 24.0.0git
LeonPasses.h
Go to the documentation of this file.
1//===------- LeonPasses.h - Define passes specific to LEON ----------------===//
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//
10//===----------------------------------------------------------------------===//
11
12#ifndef LLVM_LIB_TARGET_SPARC_LEON_PASSES_H
13#define LLVM_LIB_TARGET_SPARC_LEON_PASSES_H
14
16#include "llvm/Pass.h"
17
18namespace llvm {
19class SparcSubtarget;
20
22 : public MachineFunctionPass {
23public:
24 static char ID;
25
27 bool runOnMachineFunction(MachineFunction &MF) override;
28
29 StringRef getPassName() const override { return "Errata workaround pass"; };
30
35};
36
38 : public MachineFunctionPass {
39public:
40 static char ID;
41
43 bool runOnMachineFunction(MachineFunction &MF) override;
44
45 StringRef getPassName() const override {
46 return "InsertNOPLoad: Erratum Fix LBR35: insert a NOP instruction after "
47 "every single-cycle load instruction when the next instruction is "
48 "another load/store instruction";
49 }
50
55};
56
58 : public MachineFunctionPass {
59public:
60 static char ID;
61
63 bool runOnMachineFunction(MachineFunction &MF) override;
64
65 StringRef getPassName() const override {
66 return "DetectRoundChange: Leon erratum detection: detect any rounding "
67 "mode change request: use only the round-to-nearest rounding mode";
68 }
69
74};
75
77 : public MachineFunctionPass {
78public:
79 static char ID;
80
82 bool runOnMachineFunction(MachineFunction &MF) override;
83
84 StringRef getPassName() const override {
85 return "FixAllFDIVSQRT: Erratum Fix LBR34: fix FDIVS/FDIVD/FSQRTS/FSQRTD "
86 "instructions with NOPs and floating-point store";
87 }
88
93};
94} // namespace llvm
95
96#endif // LLVM_LIB_TARGET_SPARC_LEON_PASSES_H
#define LLVM_LIBRARY_VISIBILITY
Definition Compiler.h:137
Represent the analysis usage information of a pass.
LLVM_ABI void setPreservesCFG()
This function should be called by the pass, iff they do not:
Definition Pass.cpp:280
void setPreservesAll()
Set by analyses that do not transform their input at all.
void getAnalysisUsage(AnalysisUsage &AU) const override
getAnalysisUsage - Subclasses that override getAnalysisUsage must call this.
void getAnalysisUsage(AnalysisUsage &AU) const override
getAnalysisUsage - Subclasses that override getAnalysisUsage must call this.
Definition LeonPasses.h:70
StringRef getPassName() const override
getPassName - Return a nice clean name for a pass.
Definition LeonPasses.h:65
bool runOnMachineFunction(MachineFunction &MF) override
runOnMachineFunction - This method must be overloaded to perform the desired machine code transformat...
bool runOnMachineFunction(MachineFunction &MF) override
runOnMachineFunction - This method must be overloaded to perform the desired machine code transformat...
void getAnalysisUsage(AnalysisUsage &AU) const override
getAnalysisUsage - Subclasses that override getAnalysisUsage must call this.
Definition LeonPasses.h:31
StringRef getPassName() const override
getPassName - Return a nice clean name for a pass.
Definition LeonPasses.h:29
void getAnalysisUsage(AnalysisUsage &AU) const override
getAnalysisUsage - Subclasses that override getAnalysisUsage must call this.
Definition LeonPasses.h:89
bool runOnMachineFunction(MachineFunction &MF) override
runOnMachineFunction - This method must be overloaded to perform the desired machine code transformat...
StringRef getPassName() const override
getPassName - Return a nice clean name for a pass.
Definition LeonPasses.h:84
bool runOnMachineFunction(MachineFunction &MF) override
runOnMachineFunction - This method must be overloaded to perform the desired machine code transformat...
StringRef getPassName() const override
getPassName - Return a nice clean name for a pass.
Definition LeonPasses.h:45
void getAnalysisUsage(AnalysisUsage &AU) const override
getAnalysisUsage - Subclasses that override getAnalysisUsage must call this.
Definition LeonPasses.h:51
Represent a constant reference to a string, i.e.
Definition StringRef.h:56
This is an optimization pass for GlobalISel generic memory operations.