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 12349cc55cSDimitry Andric #include "llvm/CodeGen/MachineDominators.h" 13e8d8bef9SDimitry Andric #include "llvm/CodeGen/MachineFunction.h" 14e8d8bef9SDimitry Andric #include "llvm/CodeGen/TargetPassConfig.h" 15*04eeddc0SDimitry Andric #include "llvm/ADT/Triple.h" 16e8d8bef9SDimitry Andric 17e8d8bef9SDimitry Andric namespace llvm { 18e8d8bef9SDimitry Andric 19e8d8bef9SDimitry Andric // Inline namespace for types / symbols shared between different 20e8d8bef9SDimitry Andric // LiveDebugValues implementations. 21e8d8bef9SDimitry Andric inline namespace SharedLiveDebugValues { 22e8d8bef9SDimitry Andric 23e8d8bef9SDimitry Andric // Expose a base class for LiveDebugValues interfaces to inherit from. This 24e8d8bef9SDimitry Andric // allows the generic LiveDebugValues pass handles to call into the 25e8d8bef9SDimitry Andric // implementation. 26e8d8bef9SDimitry Andric class LDVImpl { 27e8d8bef9SDimitry Andric public: 28349cc55cSDimitry Andric virtual bool ExtendRanges(MachineFunction &MF, MachineDominatorTree *DomTree, 29349cc55cSDimitry Andric TargetPassConfig *TPC, unsigned InputBBLimit, 30349cc55cSDimitry Andric unsigned InputDbgValLimit) = 0; 31e8d8bef9SDimitry Andric virtual ~LDVImpl() {} 32e8d8bef9SDimitry Andric }; 33e8d8bef9SDimitry Andric 34e8d8bef9SDimitry Andric } // namespace SharedLiveDebugValues 35e8d8bef9SDimitry Andric 36e8d8bef9SDimitry Andric // Factory functions for LiveDebugValues implementations. 37e8d8bef9SDimitry Andric extern LDVImpl *makeVarLocBasedLiveDebugValues(); 38e8d8bef9SDimitry Andric extern LDVImpl *makeInstrRefBasedLiveDebugValues(); 39*04eeddc0SDimitry Andric 40*04eeddc0SDimitry Andric extern bool debuginfoShouldUseDebugInstrRef(const Triple &T); 41*04eeddc0SDimitry Andric 42e8d8bef9SDimitry Andric } // namespace llvm 43fe6060f1SDimitry Andric 44fe6060f1SDimitry Andric #endif // LLVM_LIB_CODEGEN_LIVEDEBUGVALUES_LIVEDEBUGVALUES_H 45