aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/llvm16/lib/Target/WebAssembly/WebAssemblyDebugValueManager.h
blob: c2dd5690930446599e7cdf8eee33a4cb14d9bc23 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// WebAssemblyDebugValueManager.h - WebAssembly DebugValue Manager -*- C++ -*-//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
///
/// \file
/// This file contains the declaration of the WebAssembly-specific
/// manager for DebugValues associated with the specific MachineInstr.
///
//===----------------------------------------------------------------------===//

#ifndef LLVM_LIB_TARGET_WEBASSEMBLY_WEBASSEMBLYDEBUGVALUEMANAGER_H
#define LLVM_LIB_TARGET_WEBASSEMBLY_WEBASSEMBLYDEBUGVALUEMANAGER_H

#include "llvm/ADT/SmallVector.h"

namespace llvm {

class MachineInstr;

class WebAssemblyDebugValueManager {
  SmallVector<MachineInstr *, 2> DbgValues;
  unsigned CurrentReg;

public:
  WebAssemblyDebugValueManager(MachineInstr *Instr);

  void move(MachineInstr *Insert);
  void updateReg(unsigned Reg);
  void clone(MachineInstr *Insert, unsigned NewReg);
  void replaceWithLocal(unsigned LocalId);
};

} // end namespace llvm

#endif