xref: /llvm-project/llvm/lib/CodeGen/LiveDebugValues/LiveDebugValues.h (revision 989f1c72e0f4236ac35a35cc9998ea34bc62d5cd)
120bb9fe5SJeremy Morse //===- LiveDebugValues.cpp - Tracking Debug Value MIs ---------*- C++ -*---===//
220bb9fe5SJeremy Morse //
320bb9fe5SJeremy Morse // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
420bb9fe5SJeremy Morse // See https://llvm.org/LICENSE.txt for license information.
520bb9fe5SJeremy Morse // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
620bb9fe5SJeremy Morse //
720bb9fe5SJeremy Morse //===----------------------------------------------------------------------===//
820bb9fe5SJeremy Morse 
9627b5bdaSKazu Hirata #ifndef LLVM_LIB_CODEGEN_LIVEDEBUGVALUES_LIVEDEBUGVALUES_H
10627b5bdaSKazu Hirata #define LLVM_LIB_CODEGEN_LIVEDEBUGVALUES_LIVEDEBUGVALUES_H
11627b5bdaSKazu Hirata 
1220bb9fe5SJeremy Morse namespace llvm {
13*989f1c72Sserge-sans-paille class MachineDominatorTree;
14*989f1c72Sserge-sans-paille class MachineFunction;
15*989f1c72Sserge-sans-paille class TargetPassConfig;
16*989f1c72Sserge-sans-paille class Triple;
1720bb9fe5SJeremy Morse 
1820bb9fe5SJeremy Morse // Inline namespace for types / symbols shared between different
1920bb9fe5SJeremy Morse // LiveDebugValues implementations.
2020bb9fe5SJeremy Morse inline namespace SharedLiveDebugValues {
2120bb9fe5SJeremy Morse 
2220bb9fe5SJeremy Morse // Expose a base class for LiveDebugValues interfaces to inherit from. This
2320bb9fe5SJeremy Morse // allows the generic LiveDebugValues pass handles to call into the
2420bb9fe5SJeremy Morse // implementation.
2520bb9fe5SJeremy Morse class LDVImpl {
2620bb9fe5SJeremy Morse public:
27a3936a6cSJeremy Morse   virtual bool ExtendRanges(MachineFunction &MF, MachineDominatorTree *DomTree,
28a3936a6cSJeremy Morse                             TargetPassConfig *TPC, unsigned InputBBLimit,
29708cbda5SJeremy Morse                             unsigned InputDbgValLimit) = 0;
303a8c5148SKazu Hirata   virtual ~LDVImpl() = default;
3120bb9fe5SJeremy Morse };
3220bb9fe5SJeremy Morse 
3320bb9fe5SJeremy Morse } // namespace SharedLiveDebugValues
3420bb9fe5SJeremy Morse 
3520bb9fe5SJeremy Morse // Factory functions for LiveDebugValues implementations.
3620bb9fe5SJeremy Morse extern LDVImpl *makeVarLocBasedLiveDebugValues();
37ae6f7882SJeremy Morse extern LDVImpl *makeInstrRefBasedLiveDebugValues();
386a605b97SJeremy Morse 
396a605b97SJeremy Morse extern bool debuginfoShouldUseDebugInstrRef(const Triple &T);
406a605b97SJeremy Morse 
4120bb9fe5SJeremy Morse } // namespace llvm
42627b5bdaSKazu Hirata 
43627b5bdaSKazu Hirata #endif // LLVM_LIB_CODEGEN_LIVEDEBUGVALUES_LIVEDEBUGVALUES_H
44