LLVM 19.0.0git
WebAssemblyDebugValueManager.h
Go to the documentation of this file.
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/// This pass currently does not handle DBG_VALUE_LISTs; they are assumed to
13/// have been set to undef in NullifyDebugValueLists pass.
14/// TODO Handle DBG_VALUE_LIST
15///
16//===----------------------------------------------------------------------===//
17
18#ifndef LLVM_LIB_TARGET_WEBASSEMBLY_WEBASSEMBLYDEBUGVALUEMANAGER_H
19#define LLVM_LIB_TARGET_WEBASSEMBLY_WEBASSEMBLYDEBUGVALUEMANAGER_H
20
23
24namespace llvm {
25
26class MachineInstr;
27
29 MachineInstr *Def;
31 Register CurrentReg;
33 getSinkableDebugValues(MachineInstr *Insert) const;
34 bool isInsertSamePlace(MachineInstr *Insert) const;
35
36public:
38
39 // Sink 'Def', and also sink its eligible DBG_VALUEs to the place before
40 // 'Insert'. Convert the original DBG_VALUEs into undefs.
41 void sink(MachineInstr *Insert);
42 // Clone 'Def' (optionally), and also clone its eligible DBG_VALUEs to the
43 // place before 'Insert'.
44 void cloneSink(MachineInstr *Insert, Register NewReg = Register(),
45 bool CloneDef = true) const;
46 // Update the register for Def and DBG_VALUEs.
48 // Replace the current register in DBG_VALUEs with the given LocalId target
49 // index.
50 void replaceWithLocal(unsigned LocalId);
51 // Remove Def, and set its DBG_VALUEs to undef.
52 void removeDef();
53};
54
55} // end namespace llvm
56
57#endif
unsigned Reg
This file defines the SmallVector class.
Representation of each machine instruction.
Definition: MachineInstr.h:69
Wrapper class representing virtual and physical registers.
Definition: Register.h:19
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
Definition: SmallVector.h:1209
void cloneSink(MachineInstr *Insert, Register NewReg=Register(), bool CloneDef=true) const
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18