LLVM 24.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
15using namespace llvm;
16
17namespace llvm {
19}
20
22
24 "machine-domfrontier",
25 "Machine Dominance Frontier Construction", true, true)
28 "Machine Dominance Frontier Construction", true, true)
29
32
35
38 MachineFunctionAnalysisManager::Invalidator &) {
40 return !PAC.preserved() &&
41 !PAC.preservedSet<AllAnalysesOn<MachineFunction>>() &&
42 !PAC.preservedSet<CFGAnalyses>();
43}
44
47 MDF.releaseMemory();
48 auto &MDT = getAnalysis<MachineDominatorTreeWrapperPass>().getDomTree();
49 MDF.analyze(MDT);
50 return false;
51}
52
54 MDF.releaseMemory();
55}
56
63
64AnalysisKey MachineDominanceFrontierAnalysis::Key;
65
#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...
void analyze(const DomTreeT &DT)
LLVM_ABI 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...
LLVM_ABI 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.
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