diff options
author | Craig Topper <craig.topper@intel.com> | 2018-03-16 21:10:07 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@intel.com> | 2018-03-16 21:10:07 +0000 |
commit | 25007c4f32521cbc516b785c7a6d6a63240a45e3 (patch) | |
tree | ac079784aed796e21feddce97bd4bb3b4f4105a6 /llvm/lib | |
parent | 5a5c33d8b5e6a7d95507c3832768820e508e060c (diff) | |
download | bcm5719-llvm-25007c4f32521cbc516b785c7a6d6a63240a45e3.tar.gz bcm5719-llvm-25007c4f32521cbc516b785c7a6d6a63240a45e3.zip |
[X86] Pass SelectionDAG into X86ISelAddressMode::dump and on to SDNode::dump.
This prevents a crash in SelectionDAGDumper with -debug when trying to print mem operands if one of the registers in the addressing mode comes from a load.
llvm-svn: 327744
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Target/X86/X86ISelDAGToDAG.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp b/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp index 27a1adbaef7..4ff36f03f1c 100644 --- a/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp +++ b/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp @@ -100,11 +100,11 @@ namespace { } #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) - void dump() { + void dump(SelectionDAG *DAG = nullptr) { dbgs() << "X86ISelAddressMode " << this << '\n'; dbgs() << "Base_Reg "; if (Base_Reg.getNode()) - Base_Reg.getNode()->dump(); + Base_Reg.getNode()->dump(DAG); else dbgs() << "nul\n"; if (BaseType == FrameIndexBase) @@ -112,7 +112,7 @@ namespace { dbgs() << " Scale " << Scale << '\n' << "IndexReg "; if (IndexReg.getNode()) - IndexReg.getNode()->dump(); + IndexReg.getNode()->dump(DAG); else dbgs() << "nul\n"; dbgs() << " Disp " << Disp << '\n' @@ -1280,7 +1280,7 @@ bool X86DAGToDAGISel::matchAddressRecursively(SDValue N, X86ISelAddressMode &AM, SDLoc dl(N); DEBUG({ dbgs() << "MatchAddress: "; - AM.dump(); + AM.dump(CurDAG); }); // Limit recursion. if (Depth > 5) |