summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2009-07-09 18:44:09 +0000
committerOwen Anderson <resistor@mac.com>2009-07-09 18:44:09 +0000
commit092bc51cdbfb08e0ec4473963df806af09b26370 (patch)
tree67cf8cf3376ef01cbaadd99c68ec63879c940718
parent55b97265967e0aabcfc4e2fd2dcc3c67253fecdc (diff)
downloadbcm5719-llvm-092bc51cdbfb08e0ec4473963df806af09b26370.tar.gz
bcm5719-llvm-092bc51cdbfb08e0ec4473963df806af09b26370.zip
As Chris pointed out, we don't actually need to pass the context around here.
llvm-svn: 75161
-rw-r--r--llvm/include/llvm/CodeGen/SelectionDAG.h3
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp4
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp2
3 files changed, 4 insertions, 5 deletions
diff --git a/llvm/include/llvm/CodeGen/SelectionDAG.h b/llvm/include/llvm/CodeGen/SelectionDAG.h
index f90a4609ced..dc93f12df12 100644
--- a/llvm/include/llvm/CodeGen/SelectionDAG.h
+++ b/llvm/include/llvm/CodeGen/SelectionDAG.h
@@ -126,8 +126,7 @@ public:
/// init - Prepare this SelectionDAG to process code in the given
/// MachineFunction.
///
- void init(MachineFunction &mf, MachineModuleInfo *mmi, DwarfWriter *dw,
- LLVMContext* C);
+ void init(MachineFunction &mf, MachineModuleInfo *mmi, DwarfWriter *dw);
/// clear - Clear state and free memory necessary to make this
/// SelectionDAG ready to process a new block.
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
index 260996fac7a..2d154942c75 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
@@ -811,11 +811,11 @@ SelectionDAG::SelectionDAG(TargetLowering &tli, FunctionLoweringInfo &fli)
}
void SelectionDAG::init(MachineFunction &mf, MachineModuleInfo *mmi,
- DwarfWriter *dw, LLVMContext* C) {
+ DwarfWriter *dw) {
MF = &mf;
MMI = mmi;
DW = dw;
- Context = C;
+ Context = mf.getFunction()->getContext();
}
SelectionDAG::~SelectionDAG() {
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
index d815523d825..485545c63a5 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
@@ -319,7 +319,7 @@ bool SelectionDAGISel::runOnFunction(Function &Fn) {
MachineModuleInfo *MMI = getAnalysisIfAvailable<MachineModuleInfo>();
DwarfWriter *DW = getAnalysisIfAvailable<DwarfWriter>();
- CurDAG->init(*MF, MMI, DW, Context);
+ CurDAG->init(*MF, MMI, DW);
FuncInfo->set(Fn, *MF, *CurDAG, EnableFastISel);
SDL->init(GFI, *AA);
OpenPOWER on IntegriCloud