mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-10-26 18:20:39 +00:00
selection dag doesn't need DwarfWriter, remove some tendrils.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100382 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -29,7 +29,6 @@
|
|||||||
namespace llvm {
|
namespace llvm {
|
||||||
|
|
||||||
class AliasAnalysis;
|
class AliasAnalysis;
|
||||||
class DwarfWriter;
|
|
||||||
class FunctionLoweringInfo;
|
class FunctionLoweringInfo;
|
||||||
class MachineConstantPoolValue;
|
class MachineConstantPoolValue;
|
||||||
class MachineFunction;
|
class MachineFunction;
|
||||||
@@ -123,7 +122,6 @@ class SelectionDAG {
|
|||||||
MachineFunction *MF;
|
MachineFunction *MF;
|
||||||
FunctionLoweringInfo &FLI;
|
FunctionLoweringInfo &FLI;
|
||||||
MachineModuleInfo *MMI;
|
MachineModuleInfo *MMI;
|
||||||
DwarfWriter *DW;
|
|
||||||
LLVMContext* Context;
|
LLVMContext* Context;
|
||||||
|
|
||||||
/// EntryNode - The starting token.
|
/// EntryNode - The starting token.
|
||||||
@@ -182,7 +180,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, DwarfWriter *dw);
|
void init(MachineFunction &mf, MachineModuleInfo *mmi);
|
||||||
|
|
||||||
/// 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.
|
||||||
@@ -194,7 +192,6 @@ public:
|
|||||||
TargetLowering &getTargetLoweringInfo() const { return TLI; }
|
TargetLowering &getTargetLoweringInfo() const { return TLI; }
|
||||||
FunctionLoweringInfo &getFunctionLoweringInfo() const { return FLI; }
|
FunctionLoweringInfo &getFunctionLoweringInfo() const { return FLI; }
|
||||||
MachineModuleInfo *getMachineModuleInfo() const { return MMI; }
|
MachineModuleInfo *getMachineModuleInfo() const { return MMI; }
|
||||||
DwarfWriter *getDwarfWriter() const { return DW; }
|
|
||||||
LLVMContext *getContext() const {return Context; }
|
LLVMContext *getContext() const {return Context; }
|
||||||
|
|
||||||
/// viewGraph - Pop up a GraphViz/gv window with the DAG rendered using 'dot'.
|
/// viewGraph - Pop up a GraphViz/gv window with the DAG rendered using 'dot'.
|
||||||
|
|||||||
@@ -793,7 +793,7 @@ unsigned SelectionDAG::getEVTAlignment(EVT VT) const {
|
|||||||
|
|
||||||
// EntryNode could meaningfully have debug info if we can find it...
|
// EntryNode could meaningfully have debug info if we can find it...
|
||||||
SelectionDAG::SelectionDAG(TargetLowering &tli, FunctionLoweringInfo &fli)
|
SelectionDAG::SelectionDAG(TargetLowering &tli, FunctionLoweringInfo &fli)
|
||||||
: TLI(tli), FLI(fli), DW(0),
|
: TLI(tli), FLI(fli),
|
||||||
EntryNode(ISD::EntryToken, DebugLoc(), getVTList(MVT::Other)),
|
EntryNode(ISD::EntryToken, DebugLoc(), getVTList(MVT::Other)),
|
||||||
Root(getEntryNode()), Ordering(0) {
|
Root(getEntryNode()), Ordering(0) {
|
||||||
AllNodes.push_back(&EntryNode);
|
AllNodes.push_back(&EntryNode);
|
||||||
@@ -801,11 +801,9 @@ SelectionDAG::SelectionDAG(TargetLowering &tli, FunctionLoweringInfo &fli)
|
|||||||
DbgInfo = new SDDbgInfo();
|
DbgInfo = new SDDbgInfo();
|
||||||
}
|
}
|
||||||
|
|
||||||
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;
|
|
||||||
Context = &mf.getFunction()->getContext();
|
Context = &mf.getFunction()->getContext();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -40,7 +40,6 @@
|
|||||||
#include "llvm/CodeGen/MachineRegisterInfo.h"
|
#include "llvm/CodeGen/MachineRegisterInfo.h"
|
||||||
#include "llvm/CodeGen/PseudoSourceValue.h"
|
#include "llvm/CodeGen/PseudoSourceValue.h"
|
||||||
#include "llvm/CodeGen/SelectionDAG.h"
|
#include "llvm/CodeGen/SelectionDAG.h"
|
||||||
#include "llvm/CodeGen/DwarfWriter.h"
|
|
||||||
#include "llvm/Analysis/DebugInfo.h"
|
#include "llvm/Analysis/DebugInfo.h"
|
||||||
#include "llvm/Target/TargetRegisterInfo.h"
|
#include "llvm/Target/TargetRegisterInfo.h"
|
||||||
#include "llvm/Target/TargetData.h"
|
#include "llvm/Target/TargetData.h"
|
||||||
@@ -3798,9 +3797,6 @@ SelectionDAGBuilder::visitIntrinsicCall(CallInst &I, unsigned Intrinsic) {
|
|||||||
if (OptLevel != CodeGenOpt::None)
|
if (OptLevel != CodeGenOpt::None)
|
||||||
// FIXME: Variable debug info is not supported here.
|
// FIXME: Variable debug info is not supported here.
|
||||||
return 0;
|
return 0;
|
||||||
DwarfWriter *DW = DAG.getDwarfWriter();
|
|
||||||
if (!DW)
|
|
||||||
return 0;
|
|
||||||
DbgDeclareInst &DI = cast<DbgDeclareInst>(I);
|
DbgDeclareInst &DI = cast<DbgDeclareInst>(I);
|
||||||
if (!DIDescriptor::ValidDebugInfo(DI.getVariable(), CodeGenOpt::None))
|
if (!DIDescriptor::ValidDebugInfo(DI.getVariable(), CodeGenOpt::None))
|
||||||
return 0;
|
return 0;
|
||||||
@@ -3822,14 +3818,11 @@ SelectionDAGBuilder::visitIntrinsicCall(CallInst &I, unsigned Intrinsic) {
|
|||||||
int FI = SI->second;
|
int FI = SI->second;
|
||||||
|
|
||||||
if (MachineModuleInfo *MMI = DAG.getMachineModuleInfo())
|
if (MachineModuleInfo *MMI = DAG.getMachineModuleInfo())
|
||||||
if (!DI.getDebugLoc().isUnknown())
|
if (!DI.getDebugLoc().isUnknown() && MMI->hasDebugInfo())
|
||||||
MMI->setVariableDbgInfo(Variable, FI, DI.getDebugLoc());
|
MMI->setVariableDbgInfo(Variable, FI, DI.getDebugLoc());
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
case Intrinsic::dbg_value: {
|
case Intrinsic::dbg_value: {
|
||||||
DwarfWriter *DW = DAG.getDwarfWriter();
|
|
||||||
if (!DW)
|
|
||||||
return 0;
|
|
||||||
DbgValueInst &DI = cast<DbgValueInst>(I);
|
DbgValueInst &DI = cast<DbgValueInst>(I);
|
||||||
if (!DIDescriptor::ValidDebugInfo(DI.getVariable(), CodeGenOpt::None))
|
if (!DIDescriptor::ValidDebugInfo(DI.getVariable(), CodeGenOpt::None))
|
||||||
return 0;
|
return 0;
|
||||||
@@ -3875,7 +3868,7 @@ SelectionDAGBuilder::visitIntrinsicCall(CallInst &I, unsigned Intrinsic) {
|
|||||||
int FI = SI->second;
|
int FI = SI->second;
|
||||||
|
|
||||||
if (MachineModuleInfo *MMI = DAG.getMachineModuleInfo())
|
if (MachineModuleInfo *MMI = DAG.getMachineModuleInfo())
|
||||||
if (!DI.getDebugLoc().isUnknown())
|
if (!DI.getDebugLoc().isUnknown() && MMI->hasDebugInfo())
|
||||||
MMI->setVariableDbgInfo(Variable, FI, DI.getDebugLoc());
|
MMI->setVariableDbgInfo(Variable, FI, DI.getDebugLoc());
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -332,8 +332,7 @@ bool SelectionDAGISel::runOnMachineFunction(MachineFunction &mf) {
|
|||||||
DEBUG(dbgs() << "\n\n\n=== " << Fn.getName() << "\n");
|
DEBUG(dbgs() << "\n\n\n=== " << Fn.getName() << "\n");
|
||||||
|
|
||||||
MachineModuleInfo *MMI = getAnalysisIfAvailable<MachineModuleInfo>();
|
MachineModuleInfo *MMI = getAnalysisIfAvailable<MachineModuleInfo>();
|
||||||
DwarfWriter *DW = getAnalysisIfAvailable<DwarfWriter>();
|
CurDAG->init(*MF, MMI);
|
||||||
CurDAG->init(*MF, MMI, DW);
|
|
||||||
FuncInfo->set(Fn, *MF, EnableFastISel);
|
FuncInfo->set(Fn, *MF, EnableFastISel);
|
||||||
SDB->init(GFI, *AA);
|
SDB->init(GFI, *AA);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user