//==--- llvm/CodeGen/ReachingDefAnalysis.h - Reaching Def Analysis -*- 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 // //===----------------------------------------------------------------------===// // /// \file Reaching Defs Analysis pass. /// /// This pass tracks for each instruction what is the "closest" reaching def of /// a given register. It is used by BreakFalseDeps (for clearance calculation) /// and ExecutionDomainFix (for arbitrating conflicting domains). /// /// Note that this is different from the usual definition notion of liveness. /// The CPU doesn't care whether or not we consider a register killed. /// // //===----------------------------------------------------------------------===// #ifndef LLVM_CODEGEN_REACHINGDEFANALYSIS_H #define LLVM_CODEGEN_REACHINGDEFANALYSIS_H #include "llvm/ADT/DenseMap.h" #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/TinyPtrVector.h" #include "llvm/CodeGen/LoopTraversal.h" #include "llvm/CodeGen/MachineFunctionPass.h" #include "llvm/InitializePasses.h" namespace llvm { class MachineBasicBlock; class MachineInstr; /// Thin wrapper around "int" used to store reaching definitions, /// using an encoding that makes it compatible with TinyPtrVector. /// The 0th LSB is forced zero (and will be used for pointer union tagging), /// The 1st LSB is forced one (to make sure the value is non-zero). class ReachingDef { … }; template<> struct PointerLikeTypeTraits<ReachingDef> { … }; // The storage for all reaching definitions. class MBBReachingDefsInfo { … }; /// This class provides the reaching def analysis. class ReachingDefAnalysis : public MachineFunctionPass { … }; } // namespace llvm #endif // LLVM_CODEGEN_REACHINGDEFANALYSIS_H