forked from OSchip/llvm-project
Request DwarfWriter. This will be used to handle dbg_* intrinsics.
llvm-svn: 61999
This commit is contained in:
parent
c72e645fd6
commit
235acaa131
|
@ -32,6 +32,7 @@ class AliasAnalysis;
|
||||||
class TargetLowering;
|
class TargetLowering;
|
||||||
class TargetMachine;
|
class TargetMachine;
|
||||||
class MachineModuleInfo;
|
class MachineModuleInfo;
|
||||||
|
class DwarfWriter;
|
||||||
class MachineFunction;
|
class MachineFunction;
|
||||||
class MachineConstantPoolValue;
|
class MachineConstantPoolValue;
|
||||||
class FunctionLoweringInfo;
|
class FunctionLoweringInfo;
|
||||||
|
@ -76,6 +77,7 @@ class SelectionDAG {
|
||||||
MachineFunction *MF;
|
MachineFunction *MF;
|
||||||
FunctionLoweringInfo &FLI;
|
FunctionLoweringInfo &FLI;
|
||||||
MachineModuleInfo *MMI;
|
MachineModuleInfo *MMI;
|
||||||
|
DwarfWriter *DW;
|
||||||
|
|
||||||
/// EntryNode - The starting token.
|
/// EntryNode - The starting token.
|
||||||
SDNode EntryNode;
|
SDNode EntryNode;
|
||||||
|
@ -122,7 +124,7 @@ public:
|
||||||
/// init - Prepare this SelectionDAG to process code in the given
|
/// init - Prepare this SelectionDAG to process code in the given
|
||||||
/// MachineFunction.
|
/// MachineFunction.
|
||||||
///
|
///
|
||||||
void init(MachineFunction &mf, MachineModuleInfo *mmi);
|
void init(MachineFunction &mf, MachineModuleInfo *mmi, DwarfWriter *dw);
|
||||||
|
|
||||||
/// clear - Clear state and free memory necessary to make this
|
/// clear - Clear state and free memory necessary to make this
|
||||||
/// SelectionDAG ready to process a new block.
|
/// SelectionDAG ready to process a new block.
|
||||||
|
|
|
@ -772,9 +772,11 @@ SelectionDAG::SelectionDAG(TargetLowering &tli, FunctionLoweringInfo &fli)
|
||||||
AllNodes.push_back(&EntryNode);
|
AllNodes.push_back(&EntryNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SelectionDAG::init(MachineFunction &mf, MachineModuleInfo *mmi) {
|
void SelectionDAG::init(MachineFunction &mf, MachineModuleInfo *mmi,
|
||||||
|
DwarfWriter *dw) {
|
||||||
MF = &mf;
|
MF = &mf;
|
||||||
MMI = mmi;
|
MMI = mmi;
|
||||||
|
DW = dw;
|
||||||
}
|
}
|
||||||
|
|
||||||
SelectionDAG::~SelectionDAG() {
|
SelectionDAG::~SelectionDAG() {
|
||||||
|
|
|
@ -36,6 +36,7 @@
|
||||||
#include "llvm/CodeGen/ScheduleDAGSDNodes.h"
|
#include "llvm/CodeGen/ScheduleDAGSDNodes.h"
|
||||||
#include "llvm/CodeGen/SchedulerRegistry.h"
|
#include "llvm/CodeGen/SchedulerRegistry.h"
|
||||||
#include "llvm/CodeGen/SelectionDAG.h"
|
#include "llvm/CodeGen/SelectionDAG.h"
|
||||||
|
#include "llvm/CodeGen/DwarfWriter.h"
|
||||||
#include "llvm/Target/TargetRegisterInfo.h"
|
#include "llvm/Target/TargetRegisterInfo.h"
|
||||||
#include "llvm/Target/TargetData.h"
|
#include "llvm/Target/TargetData.h"
|
||||||
#include "llvm/Target/TargetFrameInfo.h"
|
#include "llvm/Target/TargetFrameInfo.h"
|
||||||
|
@ -288,6 +289,7 @@ unsigned SelectionDAGISel::MakeReg(MVT VT) {
|
||||||
void SelectionDAGISel::getAnalysisUsage(AnalysisUsage &AU) const {
|
void SelectionDAGISel::getAnalysisUsage(AnalysisUsage &AU) const {
|
||||||
AU.addRequired<AliasAnalysis>();
|
AU.addRequired<AliasAnalysis>();
|
||||||
AU.addRequired<GCModuleInfo>();
|
AU.addRequired<GCModuleInfo>();
|
||||||
|
AU.addRequired<DwarfWriter>();
|
||||||
AU.setPreservesAll();
|
AU.setPreservesAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -316,7 +318,8 @@ bool SelectionDAGISel::runOnFunction(Function &Fn) {
|
||||||
|
|
||||||
FuncInfo->set(Fn, MF, EnableFastISel);
|
FuncInfo->set(Fn, MF, EnableFastISel);
|
||||||
MachineModuleInfo *MMI = getAnalysisToUpdate<MachineModuleInfo>();
|
MachineModuleInfo *MMI = getAnalysisToUpdate<MachineModuleInfo>();
|
||||||
CurDAG->init(MF, MMI);
|
DwarfWriter *DW = getAnalysisToUpdate<DwarfWriter>();
|
||||||
|
CurDAG->init(MF, MMI, DW);
|
||||||
SDL->init(GFI, *AA);
|
SDL->init(GFI, *AA);
|
||||||
|
|
||||||
for (Function::iterator I = Fn.begin(), E = Fn.end(); I != E; ++I)
|
for (Function::iterator I = Fn.begin(), E = Fn.end(); I != E; ++I)
|
||||||
|
|
Loading…
Reference in New Issue