diff options
author | Alexey Samsonov <samsonov@google.com> | 2014-04-30 21:34:11 +0000 |
---|---|---|
committer | Alexey Samsonov <samsonov@google.com> | 2014-04-30 21:34:11 +0000 |
commit | 414b6fb1701e321354bdccade60dd36c5ba62e4a (patch) | |
tree | 46520a489c73533eb19ee331c067501123883905 /llvm/lib/CodeGen/AsmPrinter/DbgValueHistoryCalculator.h | |
parent | 6759fd9fdd3c9d49c8aaf64626d5a8c59648ed10 (diff) | |
download | bcm5719-llvm-414b6fb1701e321354bdccade60dd36c5ba62e4a.tar.gz bcm5719-llvm-414b6fb1701e321354bdccade60dd36c5ba62e4a.zip |
Move logic for calculating DBG_VALUE history map into separate file/class.
Summary: No functionality change.
Test Plan: llvm regression test suite.
Reviewers: dblaikie
Reviewed By: dblaikie
Subscribers: echristo, llvm-commits
Differential Revision: http://reviews.llvm.org/D3573
llvm-svn: 207708
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DbgValueHistoryCalculator.h')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DbgValueHistoryCalculator.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DbgValueHistoryCalculator.h b/llvm/lib/CodeGen/AsmPrinter/DbgValueHistoryCalculator.h new file mode 100644 index 00000000000..d919522f9bc --- /dev/null +++ b/llvm/lib/CodeGen/AsmPrinter/DbgValueHistoryCalculator.h @@ -0,0 +1,34 @@ +//===-- llvm/CodeGen/AsmPrinter/DbgValueHistoryCalculator.h ----*- C++ -*--===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef CODEGEN_ASMPRINTER_DBGVALUEHISTORYCALCULATOR_H_ +#define CODEGEN_ASMPRINTER_DBGVALUEHISTORYCALCULATOR_H_ + +#include "llvm/ADT/DenseMap.h" +#include "llvm/ADT/SmallVector.h" + +namespace llvm { + +class MachineFunction; +class MachineInstr; +class MDNode; +class TargetRegisterInfo; + +// For each user variable, keep a list of DBG_VALUE instructions in order. +// The list can also contain normal instructions that clobber the previous +// DBG_VALUE. +typedef DenseMap<const MDNode *, SmallVector<const MachineInstr *, 4>> +DbgValueHistoryMap; + +void calculateDbgValueHistory(const MachineFunction *MF, + const TargetRegisterInfo *TRI, + DbgValueHistoryMap &Result); +} + +#endif |