1e8d8bef9SDimitry Andric //===- LiveDebugValues.cpp - Tracking Debug Value MIs ---------*- C++ -*---===// 2e8d8bef9SDimitry Andric // 3e8d8bef9SDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4e8d8bef9SDimitry Andric // See https://llvm.org/LICENSE.txt for license information. 5e8d8bef9SDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6e8d8bef9SDimitry Andric // 7e8d8bef9SDimitry Andric //===----------------------------------------------------------------------===// 8e8d8bef9SDimitry Andric 9fe6060f1SDimitry Andric #ifndef LLVM_LIB_CODEGEN_LIVEDEBUGVALUES_LIVEDEBUGVALUES_H 10fe6060f1SDimitry Andric #define LLVM_LIB_CODEGEN_LIVEDEBUGVALUES_LIVEDEBUGVALUES_H 11fe6060f1SDimitry Andric 12*349cc55cSDimitry Andric #include "llvm/CodeGen/MachineDominators.h" 13e8d8bef9SDimitry Andric #include "llvm/CodeGen/MachineFunction.h" 14e8d8bef9SDimitry Andric #include "llvm/CodeGen/TargetPassConfig.h" 15e8d8bef9SDimitry Andric 16e8d8bef9SDimitry Andric namespace llvm { 17e8d8bef9SDimitry Andric 18e8d8bef9SDimitry Andric // Inline namespace for types / symbols shared between different 19e8d8bef9SDimitry Andric // LiveDebugValues implementations. 20e8d8bef9SDimitry Andric inline namespace SharedLiveDebugValues { 21e8d8bef9SDimitry Andric 22e8d8bef9SDimitry Andric // Expose a base class for LiveDebugValues interfaces to inherit from. This 23e8d8bef9SDimitry Andric // allows the generic LiveDebugValues pass handles to call into the 24e8d8bef9SDimitry Andric // implementation. 25e8d8bef9SDimitry Andric class LDVImpl { 26e8d8bef9SDimitry Andric public: 27*349cc55cSDimitry Andric virtual bool ExtendRanges(MachineFunction &MF, MachineDominatorTree *DomTree, 28*349cc55cSDimitry Andric TargetPassConfig *TPC, unsigned InputBBLimit, 29*349cc55cSDimitry Andric unsigned InputDbgValLimit) = 0; 30e8d8bef9SDimitry Andric virtual ~LDVImpl() {} 31e8d8bef9SDimitry Andric }; 32e8d8bef9SDimitry Andric 33e8d8bef9SDimitry Andric } // namespace SharedLiveDebugValues 34e8d8bef9SDimitry Andric 35e8d8bef9SDimitry Andric // Factory functions for LiveDebugValues implementations. 36e8d8bef9SDimitry Andric extern LDVImpl *makeVarLocBasedLiveDebugValues(); 37e8d8bef9SDimitry Andric extern LDVImpl *makeInstrRefBasedLiveDebugValues(); 38e8d8bef9SDimitry Andric } // namespace llvm 39fe6060f1SDimitry Andric 40fe6060f1SDimitry Andric #endif // LLVM_LIB_CODEGEN_LIVEDEBUGVALUES_LIVEDEBUGVALUES_H 41