Applied some recommend changes from sabre. The dominate one beginning "let the

pass manager do it's thing."  Fixes crash when compiling -g files and suppresses
dwarf statements if no debug info is present.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25100 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Jim Laskey
2006-01-04 22:28:25 +00:00
parent 62281a132f
commit b2efb853f0
11 changed files with 257 additions and 218 deletions

View File

@ -25,6 +25,7 @@
namespace llvm {
class TargetLowering;
class TargetMachine;
class MachineDebugInfo;
class MachineFunction;
/// SelectionDAG class - This is used to represent a portion of an LLVM function
@ -41,6 +42,7 @@ namespace llvm {
class SelectionDAG {
TargetLowering &TLI;
MachineFunction &MF;
MachineDebugInfo *DI;
// Root - The root of the entire DAG. EntryNode - The starting token.
SDOperand Root, EntryNode;
@ -52,7 +54,8 @@ class SelectionDAG {
std::map<std::pair<const Value*, int>, SDNode*> ValueNodes;
public:
SelectionDAG(TargetLowering &tli, MachineFunction &mf) : TLI(tli), MF(mf) {
SelectionDAG(TargetLowering &tli, MachineFunction &mf, MachineDebugInfo *di)
: TLI(tli), MF(mf), DI(di) {
EntryNode = Root = getNode(ISD::EntryToken, MVT::Other);
}
~SelectionDAG();
@ -60,6 +63,7 @@ public:
MachineFunction &getMachineFunction() const { return MF; }
const TargetMachine &getTarget() const;
TargetLowering &getTargetLoweringInfo() const { return TLI; }
MachineDebugInfo *getMachineDebugInfo() const { return DI; }
/// viewGraph - Pop up a ghostview window with the DAG rendered using 'dot'.
///