LLVM 23.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"
13#include "llvm/Pass.h"
14#include "llvm/PassRegistry.h"
15
16using namespace llvm;
17
18namespace llvm {
20}
21
23
25 "machine-domfrontier",
26 "Machine Dominance Frontier Construction", true, true)
29 "Machine Dominance Frontier Construction", true, true)
30
33
36
39 MachineFunctionAnalysisManager::Invalidator &) {
41 return !PAC.preserved() &&
42 !PAC.preservedSet<AllAnalysesOn<MachineFunction>>() &&
43 !PAC.preservedSet<CFGAnalyses>();
44}
45
48 MDF.releaseMemory();
49 auto &MDT = getAnalysis<MachineDominatorTreeWrapperPass>().getDomTree();
50 MDF.analyze(MDT);
51 return false;
52}
53
55 MDF.releaseMemory();
56}
57
64
65AnalysisKey MachineDominanceFrontierAnalysis::Key;
66
#define F(x, y, z)
Definition MD5.cpp:54
#define INITIALIZE_PASS_DEPENDENCY(depName)
Definition PassSupport.h:42
#define INITIALIZE_PASS_END(passName, arg, name, cfg, analysis)
Definition PassSupport.h:44
#define INITIALIZE_PASS_BEGIN(passName, arg, name, cfg, analysis)
Definition PassSupport.h:39
This templated class represents "all analyses that operate over <aparticular IR unit>" (e....
Definition Analysis.h:50
PassT::Result & getResult(IRUnitT &IR, ExtraArgTs... ExtraArgs)
Get the result of an analysis pass for a given IR unit.
Represent the analysis usage information of a pass.
AnalysisUsage & addRequired()
void setPreservesAll()
Set by analyses that do not transform their input at all.
Represents analyses that only rely on functions' control flow.
Definition Analysis.h:73
DominanceFrontierBase - Common base class for computing forward and inverse dominance frontiers for a...
Result run(MachineFunction &MF, MachineFunctionAnalysisManager &MFAM)
bool runOnMachineFunction(MachineFunction &F) override
runOnMachineFunction - This method must be overloaded to perform the desired machine code transformat...
void getAnalysisUsage(AnalysisUsage &AU) const override
getAnalysisUsage - This function should be overriden by passes that need analysis information to do t...
void releaseMemory() override
releaseMemory() - This member can be implemented by a pass if it wants to be able to release its memo...
bool invalidate(MachineFunction &F, const PreservedAnalyses &PA, MachineFunctionAnalysisManager::Invalidator &)
Analysis pass which computes a MachineDominatorTree.
Analysis pass which computes a MachineDominatorTree.
void getAnalysisUsage(AnalysisUsage &AU) const override
getAnalysisUsage - Subclasses that override getAnalysisUsage must call this.
AnalysisType & getAnalysis() const
getAnalysis<AnalysisType>() - This function is used by subclasses to get to the analysis information ...
A set of analyses that are preserved following a run of a transformation pass.
Definition Analysis.h:112
PreservedAnalysisChecker getChecker() const
Build a checker for this PreservedAnalyses and the specified analysis type.
Definition Analysis.h:275
This is an optimization pass for GlobalISel generic memory operations.
Definition Types.h:26
LLVM_ABI char & MachineDominanceFrontierID
MachineDominanaceFrontier - This pass is a machine dominators analysis.
AnalysisManager< MachineFunction > MachineFunctionAnalysisManager
A special type used by analysis passes to provide an address that identifies that particular analysis...
Definition Analysis.h:29