
Summary: As described in PR40209, there can be issues in DBG_VALUEs handling when multiple defs present in a BB. This patch adds logic for detection of related to def DBG_VALUEs and localizes register update and movement to found DBG_VALUEs. Reviewers: aheejin Subscribers: mgorny, dschuff, sbc100, jgravelle-google, sunfish, llvm-commits Differential Revision: https://reviews.llvm.org/D56401 llvm-svn: 351216
39 lines
1.1 KiB
C++
39 lines
1.1 KiB
C++
// WebAssemblyDebugValueManager.h - WebAssembly DebugValue Manager -*- C++ -*-//
|
|
//
|
|
// The LLVM Compiler Infrastructure
|
|
//
|
|
// This file is distributed under the University of Illinois Open Source
|
|
// License. See LICENSE.TXT for details.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
///
|
|
/// \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;
|
|
|
|
public:
|
|
WebAssemblyDebugValueManager(MachineInstr *Instr);
|
|
|
|
void move(MachineInstr *Insert);
|
|
void updateReg(unsigned Reg);
|
|
void clone(MachineInstr *Insert, unsigned NewReg);
|
|
};
|
|
|
|
} // end namespace llvm
|
|
|
|
#endif
|