LLVM  15.0.0git
MachineDominanceFrontier.cpp
Go to the documentation of this file.
1 //===- MachineDominanceFrontier.cpp ---------------------------------------===//
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 
11 #include "llvm/CodeGen/Passes.h"
12 #include "llvm/InitializePasses.h"
13 #include "llvm/Pass.h"
14 #include "llvm/PassRegistry.h"
15 
16 using namespace llvm;
17 
18 namespace llvm {
22 }
23 
24 
26 
27 INITIALIZE_PASS_BEGIN(MachineDominanceFrontier, "machine-domfrontier",
28  "Machine Dominance Frontier Construction", true, true)
31  "Machine Dominance Frontier Construction", true, true)
32 
35 }
36 
38 
40  releaseMemory();
41  Base.analyze(getAnalysis<MachineDominatorTree>().getBase());
42  return false;
43 }
44 
46  Base.releaseMemory();
47 }
48 
50  AU.setPreservesAll();
53 }
llvm::MachineDominanceFrontier::runOnMachineFunction
bool runOnMachineFunction(MachineFunction &F) override
runOnMachineFunction - This method must be overloaded to perform the desired machine code transformat...
Definition: MachineDominanceFrontier.cpp:39
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:17
Pass.h
llvm::MachineFunctionPass
MachineFunctionPass - This class adapts the FunctionPass interface to allow convenient creation of pa...
Definition: MachineFunctionPass.h:30
PassRegistry.h
llvm::MachineFunctionPass::getAnalysisUsage
void getAnalysisUsage(AnalysisUsage &AU) const override
getAnalysisUsage - Subclasses that override getAnalysisUsage must call this.
Definition: MachineFunctionPass.cpp:103
llvm::PassRegistry::getPassRegistry
static PassRegistry * getPassRegistry()
getPassRegistry - Access the global registry object, which is automatically initialized at applicatio...
Definition: PassRegistry.cpp:31
llvm::AnalysisUsage
Represent the analysis usage information of a pass.
Definition: PassAnalysisSupport.h:47
domfrontier
machine domfrontier
Definition: MachineDominanceFrontier.cpp:30
llvm::MachineDominanceFrontier::releaseMemory
void releaseMemory() override
releaseMemory() - This member can be implemented by a pass if it wants to be able to release its memo...
Definition: MachineDominanceFrontier.cpp:45
llvm::CallingConv::ID
unsigned ID
LLVM IR allows to use arbitrary numbers as calling convention identifiers.
Definition: CallingConv.h:24
INITIALIZE_PASS_END
#define INITIALIZE_PASS_END(passName, arg, name, cfg, analysis)
Definition: PassSupport.h:58
Passes.h
llvm::MachineDominanceFrontier::getBase
ForwardDominanceFrontierBase< MachineBasicBlock > & getBase()
Definition: MachineDominanceFrontier.h:38
Construction
machine Machine Dominance Frontier Construction
Definition: MachineDominanceFrontier.cpp:31
llvm::ForwardDominanceFrontierBase
DominanceFrontier Class - Concrete subclass of DominanceFrontierBase that is used to compute a forwar...
Definition: DominanceFrontier.h:121
llvm::MachineDominanceFrontier
Definition: MachineDominanceFrontier.h:20
INITIALIZE_PASS_DEPENDENCY
INITIALIZE_PASS_DEPENDENCY(DominatorTreeWrapperPass)
llvm::initializeMachineDominanceFrontierPass
void initializeMachineDominanceFrontierPass(PassRegistry &)
llvm::DominanceFrontierBase
DominanceFrontierBase - Common base class for computing forward and inverse dominance frontiers for a...
Definition: DominanceFrontier.h:40
llvm::MachineFunction
Definition: MachineFunction.h:241
llvm::MachineDominanceFrontier::ID
static char ID
Definition: MachineDominanceFrontier.h:34
INITIALIZE_PASS_BEGIN
INITIALIZE_PASS_BEGIN(MachineDominanceFrontier, "machine-domfrontier", "Machine Dominance Frontier Construction", true, true) INITIALIZE_PASS_END(MachineDominanceFrontier
llvm::AnalysisUsage::setPreservesAll
void setPreservesAll()
Set by analyses that do not transform their input at all.
Definition: PassAnalysisSupport.h:130
llvm::MachineDominanceFrontier::getAnalysisUsage
void getAnalysisUsage(AnalysisUsage &AU) const override
getAnalysisUsage - This function should be overriden by passes that need analysis information to do t...
Definition: MachineDominanceFrontier.cpp:49
MachineDominanceFrontier.h
true
machine Machine Dominance Frontier true
Definition: MachineDominanceFrontier.cpp:31
llvm::MachineDominanceFrontierID
char & MachineDominanceFrontierID
MachineDominanaceFrontier - This pass is a machine dominators analysis.
Definition: MachineDominanceFrontier.cpp:37
Machine
COFF::MachineTypes Machine
Definition: COFFYAML.cpp:369
llvm::AnalysisUsage::addRequired
AnalysisUsage & addRequired()
Definition: PassAnalysisSupport.h:75
llvm::MachineDominatorTree
DominatorTree Class - Concrete subclass of DominatorTreeBase that is used to compute a normal dominat...
Definition: MachineDominators.h:51
InitializePasses.h
MachineDominators.h