WebAssemblyDebugValueManager.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. // WebAssemblyDebugValueManager.h - WebAssembly DebugValue Manager -*- 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. ///
  9. /// \file
  10. /// This file contains the declaration of the WebAssembly-specific
  11. /// manager for DebugValues associated with the specific MachineInstr.
  12. ///
  13. //===----------------------------------------------------------------------===//
  14. #ifndef LLVM_LIB_TARGET_WEBASSEMBLY_WEBASSEMBLYDEBUGVALUEMANAGER_H
  15. #define LLVM_LIB_TARGET_WEBASSEMBLY_WEBASSEMBLYDEBUGVALUEMANAGER_H
  16. #include "llvm/ADT/SmallVector.h"
  17. namespace llvm {
  18. class MachineInstr;
  19. class WebAssemblyDebugValueManager {
  20. SmallVector<MachineInstr *, 2> DbgValues;
  21. unsigned CurrentReg;
  22. public:
  23. WebAssemblyDebugValueManager(MachineInstr *Instr);
  24. void move(MachineInstr *Insert);
  25. void updateReg(unsigned Reg);
  26. void clone(MachineInstr *Insert, unsigned NewReg);
  27. void replaceWithLocal(unsigned LocalId);
  28. };
  29. } // end namespace llvm
  30. #endif