blob: 2ca0bee68efe677e8d3f16b08a34537aff1bd2dd [file] [log] [blame]
Jakob Stoklund Olesenbb7b23f2010-11-30 02:17:10 +00001//===- LiveDebugVariables.cpp - Tracking debug info variables -------------===//
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// This file implements the LiveDebugVariables analysis.
11//
12// Remove all DBG_VALUE instructions referencing virtual registers and replace
13// them with a data structure tracking where live user variables are kept - in a
14// virtual register or in a stack slot.
15//
16// Allow the data structure to be updated during register allocation when values
17// are moved between registers and stack slots. Finally emit new DBG_VALUE
18// instructions after register allocation is complete.
19//
20//===----------------------------------------------------------------------===//
21
22#include "LiveDebugVariables.h"
23#include "llvm/CodeGen/LiveIntervalAnalysis.h"
24#include "llvm/CodeGen/MachineFunction.h"
25#include "llvm/CodeGen/Passes.h"
26#include "llvm/Target/TargetMachine.h"
27
28using namespace llvm;
29
30char LiveDebugVariables::ID = 0;
31
32INITIALIZE_PASS_BEGIN(LiveDebugVariables, "livedebugvars",
33 "Debug Variable Analysis", false, false)
34INITIALIZE_PASS_DEPENDENCY(LiveIntervals)
35INITIALIZE_PASS_END(LiveDebugVariables, "livedebugvars",
36 "Debug Variable Analysis", false, false)
37
38void LiveDebugVariables::getAnalysisUsage(AnalysisUsage &AU) const {
39 AU.addRequiredTransitive<LiveIntervals>();
40 AU.setPreservesAll();
41 MachineFunctionPass::getAnalysisUsage(AU);
42}
43
44LiveDebugVariables::LiveDebugVariables() : MachineFunctionPass(ID) {
45 initializeLiveDebugVariablesPass(*PassRegistry::getPassRegistry());
46}
47
48bool LiveDebugVariables::runOnMachineFunction(MachineFunction &mf) {
49 return false;
50}