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 12e8d8bef9SDimitry Andric namespace llvm { 13*81ad6265SDimitry Andric class MachineDominatorTree; 14*81ad6265SDimitry Andric class MachineFunction; 15*81ad6265SDimitry Andric class TargetPassConfig; 16*81ad6265SDimitry Andric class Triple; 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: 27349cc55cSDimitry Andric virtual bool ExtendRanges(MachineFunction &MF, MachineDominatorTree *DomTree, 28349cc55cSDimitry Andric TargetPassConfig *TPC, unsigned InputBBLimit, 29349cc55cSDimitry Andric unsigned InputDbgValLimit) = 0; 30*81ad6265SDimitry Andric virtual ~LDVImpl() = default; 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(); 3804eeddc0SDimitry Andric 3904eeddc0SDimitry Andric extern bool debuginfoShouldUseDebugInstrRef(const Triple &T); 4004eeddc0SDimitry Andric 41e8d8bef9SDimitry Andric } // namespace llvm 42fe6060f1SDimitry Andric 43fe6060f1SDimitry Andric #endif // LLVM_LIB_CODEGEN_LIVEDEBUGVALUES_LIVEDEBUGVALUES_H 44