blob: 2945c1522de3a20163a99a160bd6ae7bc2918fae [file] [log] [blame]
Alexey Samsonov414b6fb2014-04-30 21:34:11 +00001//===-- llvm/CodeGen/AsmPrinter/DbgValueHistoryCalculator.h ----*- C++ -*--===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9
10#ifndef CODEGEN_ASMPRINTER_DBGVALUEHISTORYCALCULATOR_H_
11#define CODEGEN_ASMPRINTER_DBGVALUEHISTORYCALCULATOR_H_
12
Alexey Samsonov0436caa2014-04-30 23:02:40 +000013#include "llvm/ADT/MapVector.h"
Alexey Samsonov414b6fb2014-04-30 21:34:11 +000014#include "llvm/ADT/SmallVector.h"
15
16namespace llvm {
17
18class MachineFunction;
19class MachineInstr;
20class MDNode;
21class TargetRegisterInfo;
22
23// For each user variable, keep a list of DBG_VALUE instructions in order.
24// The list can also contain normal instructions that clobber the previous
Alexey Samsonov0436caa2014-04-30 23:02:40 +000025// DBG_VALUE. The variables are listed in order of appearance.
26typedef MapVector<const MDNode *, SmallVector<const MachineInstr *, 4>>
Alexey Samsonov414b6fb2014-04-30 21:34:11 +000027DbgValueHistoryMap;
28
29void calculateDbgValueHistory(const MachineFunction *MF,
30 const TargetRegisterInfo *TRI,
31 DbgValueHistoryMap &Result);
32}
33
34#endif