LiveDebugValues.h 1.5 KB

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