One Hat Cyber Team
Your IP :
216.73.216.14
Server IP :
194.44.31.54
Server :
Linux zen.imath.kiev.ua 4.18.0-553.77.1.el8_10.x86_64 #1 SMP Fri Oct 3 14:30:23 UTC 2025 x86_64
Server Software :
Apache/2.4.37 (Rocky Linux) OpenSSL/1.1.1k
PHP Version :
5.6.40
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
usr
/
include
/
llvm
/
CodeGen
/
View File Name :
MachinePostDominators.h
//===- llvm/CodeGen/MachinePostDominators.h ----------------------*- C++ -*-==// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // // This file exposes interfaces to post dominance information for // target-specific code. // //===----------------------------------------------------------------------===// #ifndef LLVM_CODEGEN_MACHINEPOSTDOMINATORS_H #define LLVM_CODEGEN_MACHINEPOSTDOMINATORS_H #include "llvm/CodeGen/MachineDominators.h" namespace llvm { extern template class DominatorTreeBase<MachineBasicBlock, true>; // PostDomTree namespace DomTreeBuilder { using MBBPostDomTree = PostDomTreeBase<MachineBasicBlock>; using MBBPostDomTreeGraphDiff = GraphDiff<MachineBasicBlock *, true>; extern template void Calculate<MBBPostDomTree>(MBBPostDomTree &DT); extern template void InsertEdge<MBBPostDomTree>(MBBPostDomTree &DT, MachineBasicBlock *From, MachineBasicBlock *To); extern template void DeleteEdge<MBBPostDomTree>(MBBPostDomTree &DT, MachineBasicBlock *From, MachineBasicBlock *To); extern template void ApplyUpdates<MBBPostDomTree>(MBBPostDomTree &DT, MBBPostDomTreeGraphDiff &, MBBPostDomTreeGraphDiff *); extern template bool Verify<MBBPostDomTree>(const MBBPostDomTree &DT, MBBPostDomTree::VerificationLevel VL); } // namespace DomTreeBuilder /// /// MachinePostDominatorTree - an analysis pass wrapper for DominatorTree /// used to compute the post-dominator tree for MachineFunctions. /// class MachinePostDominatorTree : public PostDomTreeBase<MachineBasicBlock> { using Base = PostDomTreeBase<MachineBasicBlock>; public: MachinePostDominatorTree() = default; explicit MachinePostDominatorTree(MachineFunction &MF) { recalculate(MF); } /// Handle invalidation explicitly. bool invalidate(MachineFunction &, const PreservedAnalyses &PA, MachineFunctionAnalysisManager::Invalidator &); /// Make findNearestCommonDominator(const NodeT *A, const NodeT *B) available. using Base::findNearestCommonDominator; /// Returns the nearest common dominator of the given blocks. /// If that tree node is a virtual root, a nullptr will be returned. MachineBasicBlock * findNearestCommonDominator(ArrayRef<MachineBasicBlock *> Blocks) const; }; class MachinePostDominatorTreeAnalysis : public AnalysisInfoMixin<MachinePostDominatorTreeAnalysis> { friend AnalysisInfoMixin<MachinePostDominatorTreeAnalysis>; static AnalysisKey Key; public: using Result = MachinePostDominatorTree; Result run(MachineFunction &MF, MachineFunctionAnalysisManager &MFAM); }; class MachinePostDominatorTreePrinterPass : public PassInfoMixin<MachinePostDominatorTreePrinterPass> { raw_ostream &OS; public: explicit MachinePostDominatorTreePrinterPass(raw_ostream &OS) : OS(OS) {} PreservedAnalyses run(MachineFunction &MF, MachineFunctionAnalysisManager &MFAM); static bool isRequired() { return true; } }; class MachinePostDominatorTreeWrapperPass : public MachineFunctionPass { std::optional<MachinePostDominatorTree> PDT; public: static char ID; MachinePostDominatorTreeWrapperPass(); MachinePostDominatorTree &getPostDomTree() { return *PDT; } const MachinePostDominatorTree &getPostDomTree() const { return *PDT; } bool runOnMachineFunction(MachineFunction &MF) override; void getAnalysisUsage(AnalysisUsage &AU) const override; void releaseMemory() override { PDT.reset(); } void verifyAnalysis() const override; void print(llvm::raw_ostream &OS, const Module *M = nullptr) const override; }; } //end of namespace llvm #endif