summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2009-02-03 18:46:32 +0000
committerDevang Patel <dpatel@apple.com>2009-02-03 18:46:32 +0000
commit70da8e8425e81198e298c5a5e7b7cec37aee3d69 (patch)
treefd849593ed9f454c6bfa96fd3155d12474b2d0c3
parent73eff2e6e87beff78154818727eabe2d52c64bce (diff)
downloadbcm5719-llvm-70da8e8425e81198e298c5a5e7b7cec37aee3d69.tar.gz
bcm5719-llvm-70da8e8425e81198e298c5a5e7b7cec37aee3d69.zip
First initialize DAG otherwise dwarf writer is used uninitialized.
Duncan spotted this. Thanks! llvm-svn: 63641
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp2
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
index c34211505ac..82cc3263ed2 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
@@ -787,7 +787,7 @@ unsigned SelectionDAG::getMVTAlignment(MVT VT) const {
}
SelectionDAG::SelectionDAG(TargetLowering &tli, FunctionLoweringInfo &fli)
- : TLI(tli), FLI(fli),
+ : TLI(tli), FLI(fli), DW(0),
EntryNode(ISD::EntryToken, getVTList(MVT::Other)),
Root(getEntryNode()) {
AllNodes.push_back(&EntryNode);
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
index 9c53fc9362c..9d480e68b5f 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
@@ -313,10 +313,10 @@ bool SelectionDAGISel::runOnFunction(Function &Fn) {
RegInfo = &MF->getRegInfo();
DOUT << "\n\n\n=== " << Fn.getName() << "\n";
- FuncInfo->set(Fn, *MF, *CurDAG, EnableFastISel);
MachineModuleInfo *MMI = getAnalysisIfAvailable<MachineModuleInfo>();
DwarfWriter *DW = getAnalysisIfAvailable<DwarfWriter>();
CurDAG->init(*MF, MMI, DW);
+ FuncInfo->set(Fn, *MF, *CurDAG, EnableFastISel);
SDL->init(GFI, *AA);
for (Function::iterator I = Fn.begin(), E = Fn.end(); I != E; ++I)
OpenPOWER on IntegriCloud