LLVM  15.0.0git
CFIFixup.h
Go to the documentation of this file.
1 //===-- CFIFixup.h - Insert CFI remember/restore instructions ---*- C++ -*-===//
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
10 /// Contains definition of the base CFIFixup pass.
11 ///
12 //===----------------------------------------------------------------------===//
13 
14 #ifndef LLVM_CODEGEN_CFIFIXUP_H
15 #define LLVM_CODEGEN_CFIFIXUP_H
16 
18 #include "llvm/InitializePasses.h"
19 
20 namespace llvm {
21 class CFIFixup : public MachineFunctionPass {
22 public:
23  static char ID;
24 
27  }
28 
29  void getAnalysisUsage(AnalysisUsage &AU) const override {
30  AU.setPreservesAll();
32  }
33 
34  bool runOnMachineFunction(MachineFunction &MF) override;
35 };
36 } // namespace llvm
37 
38 #endif // LLVM_CODEGEN_CFIFIXUP_H
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:17
llvm::initializeCFIFixupPass
void initializeCFIFixupPass(PassRegistry &)
llvm::MachineFunctionPass
MachineFunctionPass - This class adapts the FunctionPass interface to allow convenient creation of pa...
Definition: MachineFunctionPass.h:30
llvm::CFIFixup::getAnalysisUsage
void getAnalysisUsage(AnalysisUsage &AU) const override
getAnalysisUsage - This function should be overriden by passes that need analysis information to do t...
Definition: CFIFixup.h:29
llvm::MachineFunctionPass::getAnalysisUsage
void getAnalysisUsage(AnalysisUsage &AU) const override
getAnalysisUsage - Subclasses that override getAnalysisUsage must call this.
Definition: MachineFunctionPass.cpp:103
llvm::CFIFixup
Definition: CFIFixup.h:21
llvm::PassRegistry::getPassRegistry
static PassRegistry * getPassRegistry()
getPassRegistry - Access the global registry object, which is automatically initialized at applicatio...
Definition: PassRegistry.cpp:31
llvm::CFIFixup::runOnMachineFunction
bool runOnMachineFunction(MachineFunction &MF) override
runOnMachineFunction - This method must be overloaded to perform the desired machine code transformat...
Definition: CFIFixup.cpp:99
llvm::AnalysisUsage
Represent the analysis usage information of a pass.
Definition: PassAnalysisSupport.h:47
llvm::CallingConv::ID
unsigned ID
LLVM IR allows to use arbitrary numbers as calling convention identifiers.
Definition: CallingConv.h:24
MachineFunctionPass.h
llvm::MachineFunction
Definition: MachineFunction.h:257
llvm::AnalysisUsage::setPreservesAll
void setPreservesAll()
Set by analyses that do not transform their input at all.
Definition: PassAnalysisSupport.h:130
llvm::CFIFixup::CFIFixup
CFIFixup()
Definition: CFIFixup.h:25
llvm::CFIFixup::ID
static char ID
Definition: CFIFixup.h:23
InitializePasses.h