Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-10 08:43:31

0001 //===-- llvm/CodeGen/MachineModuleInfo.h ------------------------*- C++ -*-===//
0002 //
0003 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0004 // See https://llvm.org/LICENSE.txt for license information.
0005 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0006 //
0007 //===----------------------------------------------------------------------===//
0008 
0009 #ifndef LLVM_CODEGEN_MACHINEMODULESLOTTRACKER_H
0010 #define LLVM_CODEGEN_MACHINEMODULESLOTTRACKER_H
0011 
0012 #include "llvm/IR/ModuleSlotTracker.h"
0013 
0014 namespace llvm {
0015 
0016 class AbstractSlotTrackerStorage;
0017 class Function;
0018 class MachineModuleInfo;
0019 class MachineFunction;
0020 class Module;
0021 
0022 class MachineModuleSlotTracker : public ModuleSlotTracker {
0023   const Function &TheFunction;
0024   const MachineModuleInfo &TheMMI;
0025   unsigned MDNStartSlot = 0, MDNEndSlot = 0;
0026 
0027   void processMachineFunctionMetadata(AbstractSlotTrackerStorage *AST,
0028                                       const MachineFunction &MF);
0029   void processMachineModule(AbstractSlotTrackerStorage *AST, const Module *M,
0030                             bool ShouldInitializeAllMetadata);
0031   void processMachineFunction(AbstractSlotTrackerStorage *AST,
0032                               const Function *F,
0033                               bool ShouldInitializeAllMetadata);
0034 
0035 public:
0036   MachineModuleSlotTracker(const MachineModuleInfo &MMI,
0037                            const MachineFunction *MF,
0038                            bool ShouldInitializeAllMetadata = true);
0039   ~MachineModuleSlotTracker();
0040 
0041   void collectMachineMDNodes(MachineMDNodeListType &L) const;
0042 };
0043 
0044 } // namespace llvm
0045 
0046 #endif // LLVM_CODEGEN_MACHINEMODULESLOTTRACKER_H