Alexey Samsonov | 414b6fb | 2014-04-30 21:34:11 +0000 | [diff] [blame] | 1 | //===-- 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 Samsonov | 0436caa | 2014-04-30 23:02:40 +0000 | [diff] [blame] | 13 | #include "llvm/ADT/MapVector.h" |
Alexey Samsonov | 414b6fb | 2014-04-30 21:34:11 +0000 | [diff] [blame] | 14 | #include "llvm/ADT/SmallVector.h" |
| 15 | |
| 16 | namespace llvm { |
| 17 | |
| 18 | class MachineFunction; |
| 19 | class MachineInstr; |
| 20 | class MDNode; |
| 21 | class TargetRegisterInfo; |
| 22 | |
Alexey Samsonov | dfcaf9c | 2014-05-20 18:34:54 +0000 | [diff] [blame] | 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. |
Alexey Samsonov | 0436caa | 2014-04-30 23:02:40 +0000 | [diff] [blame] | 27 | typedef MapVector<const MDNode *, SmallVector<const MachineInstr *, 4>> |
Alexey Samsonov | 414b6fb | 2014-04-30 21:34:11 +0000 | [diff] [blame] | 28 | DbgValueHistoryMap; |
| 29 | |
| 30 | void calculateDbgValueHistory(const MachineFunction *MF, |
| 31 | const TargetRegisterInfo *TRI, |
| 32 | DbgValueHistoryMap &Result); |
| 33 | } |
| 34 | |
| 35 | #endif |