| 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 | |
| 15 | #include "llvm/CodeGen/MachineFunctionPass.h" |
| 16 | #include "llvm/Pass.h" |
| 17 | |
| 18 | namespace llvm { |
| 19 | class SparcSubtarget; |
| 20 | |
| 21 | class LLVM_LIBRARY_VISIBILITY SparcErrataWorkaroundLegacy |
| 22 | : public MachineFunctionPass { |
| 23 | public: |
| 24 | static char ID; |
| 25 | |
| 26 | SparcErrataWorkaroundLegacy(); |
| 27 | bool runOnMachineFunction(MachineFunction &MF) override; |
| 28 | |
| 29 | StringRef getPassName() const override { return "Errata workaround pass"; }; |
| 30 | |
| 31 | void getAnalysisUsage(AnalysisUsage &AU) const override { |
| 32 | AU.setPreservesCFG(); |
| 33 | MachineFunctionPass::getAnalysisUsage(AU); |
| 34 | } |
| 35 | }; |
| 36 | |
| 37 | } // namespace llvm |
| 38 | |
| 39 | #endif // LLVM_LIB_TARGET_SPARC_LEON_PASSES_H |
| 40 |