1 //===-- llvm/CodeGen/AsmPrinter/DbgValueHistoryCalculator.h ----*- C++ -*--===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef CODEGEN_ASMPRINTER_DBGVALUEHISTORYCALCULATOR_H_
11 #define CODEGEN_ASMPRINTER_DBGVALUEHISTORYCALCULATOR_H_
13 #include "llvm/ADT/MapVector.h"
14 #include "llvm/ADT/SmallVector.h"
18 class MachineFunction;
21 class TargetRegisterInfo;
23 // For each user variable, keep a list of DBG_VALUE instructions for it
24 // in the order of appearance. The list can also contain another
25 // instructions, which are assumed to clobber the previous DBG_VALUE.
26 // The variables are listed in order of appearance.
27 typedef MapVector<const MDNode *, SmallVector<const MachineInstr *, 4>>
30 void calculateDbgValueHistory(const MachineFunction *MF,
31 const TargetRegisterInfo *TRI,
32 DbgValueHistoryMap &Result);