diff options
author | Craig Topper <craig.topper@intel.com> | 2018-01-26 19:34:20 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@intel.com> | 2018-01-26 19:34:20 +0000 |
commit | 8f324bb1a42309001748977068c84dfcd6029896 (patch) | |
tree | 9a83766058b7dd739233295ef8733e8d1ccf1c39 /llvm/lib/Target | |
parent | b207dd68708b8ff69dadd721c50628438a768d00 (diff) | |
download | bcm5719-llvm-8f324bb1a42309001748977068c84dfcd6029896.tar.gz bcm5719-llvm-8f324bb1a42309001748977068c84dfcd6029896.zip |
[SelectionDAGISel] Add a debug print before call to Select. Adjust where blank lines are printed during isel process to make things more sensibly grouped.
Previously some targets printed their own message at the start of Select to indicate what they were selecting. For the targets that didn't, it means there was no print of the root node before any custom handling in the target executed. So if the target did something custom and never called SelectNodeCommon, no print would be made. For the targets that did print a message in Select, if they didn't custom handle a node SelectNodeCommon would reprint the root node before walking the isel table.
It seems better to just print the message before the call to Select so all targets behave the same. And then remove the root node printing from SelectNodeCommon and just leave a message that says we're starting the table search.
There were also some oddities in blank line behavior. Usually due to a \n after a call to SelectionDAGNode::dump which already inserted a new line.
llvm-svn: 323551
Diffstat (limited to 'llvm/lib/Target')
-rw-r--r-- | llvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp | 5 | ||||
-rw-r--r-- | llvm/lib/Target/AVR/AVRISelDAGToDAG.cpp | 3 | ||||
-rw-r--r-- | llvm/lib/Target/BPF/BPFISelDAGToDAG.cpp | 3 | ||||
-rw-r--r-- | llvm/lib/Target/Lanai/LanaiISelDAGToDAG.cpp | 3 | ||||
-rw-r--r-- | llvm/lib/Target/MSP430/MSP430ISelDAGToDAG.cpp | 5 | ||||
-rw-r--r-- | llvm/lib/Target/Mips/MipsISelDAGToDAG.cpp | 3 | ||||
-rw-r--r-- | llvm/lib/Target/Nios2/Nios2ISelDAGToDAG.cpp | 3 | ||||
-rw-r--r-- | llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp | 3 | ||||
-rw-r--r-- | llvm/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp | 3 | ||||
-rw-r--r-- | llvm/lib/Target/WebAssembly/WebAssemblyISelDAGToDAG.cpp | 5 | ||||
-rw-r--r-- | llvm/lib/Target/X86/X86ISelDAGToDAG.cpp | 2 |
11 files changed, 0 insertions, 38 deletions
diff --git a/llvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp b/llvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp index 9aa7c031e60..07922959fbb 100644 --- a/llvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp +++ b/llvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp @@ -2653,11 +2653,6 @@ bool AArch64DAGToDAGISel::SelectCMP_SWAP(SDNode *N) { } void AArch64DAGToDAGISel::Select(SDNode *Node) { - // Dump information about the Node being selected - DEBUG(errs() << "Selecting: "); - DEBUG(Node->dump(CurDAG)); - DEBUG(errs() << "\n"); - // If we have a custom node, we already have selected! if (Node->isMachineOpcode()) { DEBUG(errs() << "== "; Node->dump(CurDAG); errs() << "\n"); diff --git a/llvm/lib/Target/AVR/AVRISelDAGToDAG.cpp b/llvm/lib/Target/AVR/AVRISelDAGToDAG.cpp index 462a7d57d2d..91d4e9e6598 100644 --- a/llvm/lib/Target/AVR/AVRISelDAGToDAG.cpp +++ b/llvm/lib/Target/AVR/AVRISelDAGToDAG.cpp @@ -519,9 +519,6 @@ bool AVRDAGToDAGISel::selectMultiplication(llvm::SDNode *N) { } void AVRDAGToDAGISel::Select(SDNode *N) { - // Dump information about the Node being selected - DEBUG(errs() << "Selecting: "; N->dump(CurDAG); errs() << "\n"); - // If we have a custom node, we already have selected! if (N->isMachineOpcode()) { DEBUG(errs() << "== "; N->dump(CurDAG); errs() << "\n"); diff --git a/llvm/lib/Target/BPF/BPFISelDAGToDAG.cpp b/llvm/lib/Target/BPF/BPFISelDAGToDAG.cpp index 35be4476ee0..aa91d7a9286 100644 --- a/llvm/lib/Target/BPF/BPFISelDAGToDAG.cpp +++ b/llvm/lib/Target/BPF/BPFISelDAGToDAG.cpp @@ -176,9 +176,6 @@ bool BPFDAGToDAGISel::SelectInlineAsmMemoryOperand( void BPFDAGToDAGISel::Select(SDNode *Node) { unsigned Opcode = Node->getOpcode(); - // Dump information about the Node being selected - DEBUG(dbgs() << "Selecting: "; Node->dump(CurDAG); dbgs() << '\n'); - // If we have a custom node, we already have selected! if (Node->isMachineOpcode()) { DEBUG(dbgs() << "== "; Node->dump(CurDAG); dbgs() << '\n'); diff --git a/llvm/lib/Target/Lanai/LanaiISelDAGToDAG.cpp b/llvm/lib/Target/Lanai/LanaiISelDAGToDAG.cpp index ed0c99a76ce..95964fa9f0e 100644 --- a/llvm/lib/Target/Lanai/LanaiISelDAGToDAG.cpp +++ b/llvm/lib/Target/Lanai/LanaiISelDAGToDAG.cpp @@ -273,9 +273,6 @@ bool LanaiDAGToDAGISel::SelectInlineAsmMemoryOperand( void LanaiDAGToDAGISel::Select(SDNode *Node) { unsigned Opcode = Node->getOpcode(); - // Dump information about the Node being selected - DEBUG(errs() << "Selecting: "; Node->dump(CurDAG); errs() << "\n"); - // If we have a custom node, we already have selected! if (Node->isMachineOpcode()) { DEBUG(errs() << "== "; Node->dump(CurDAG); errs() << "\n"); diff --git a/llvm/lib/Target/MSP430/MSP430ISelDAGToDAG.cpp b/llvm/lib/Target/MSP430/MSP430ISelDAGToDAG.cpp index bebf7478bcc..74d9abd30c5 100644 --- a/llvm/lib/Target/MSP430/MSP430ISelDAGToDAG.cpp +++ b/llvm/lib/Target/MSP430/MSP430ISelDAGToDAG.cpp @@ -381,11 +381,6 @@ bool MSP430DAGToDAGISel::tryIndexedBinOp(SDNode *Op, SDValue N1, SDValue N2, void MSP430DAGToDAGISel::Select(SDNode *Node) { SDLoc dl(Node); - // Dump information about the Node being selected - DEBUG(errs() << "Selecting: "); - DEBUG(Node->dump(CurDAG)); - DEBUG(errs() << "\n"); - // If we have a custom node, we already have selected! if (Node->isMachineOpcode()) { DEBUG(errs() << "== "; diff --git a/llvm/lib/Target/Mips/MipsISelDAGToDAG.cpp b/llvm/lib/Target/Mips/MipsISelDAGToDAG.cpp index 0e1173f1c61..8a56df2df6a 100644 --- a/llvm/lib/Target/Mips/MipsISelDAGToDAG.cpp +++ b/llvm/lib/Target/Mips/MipsISelDAGToDAG.cpp @@ -215,9 +215,6 @@ bool MipsDAGToDAGISel::selectVSplatMaskR(SDValue N, SDValue &Imm) const { void MipsDAGToDAGISel::Select(SDNode *Node) { unsigned Opcode = Node->getOpcode(); - // Dump information about the Node being selected - DEBUG(errs() << "Selecting: "; Node->dump(CurDAG); errs() << "\n"); - // If we have a custom node, we already have selected! if (Node->isMachineOpcode()) { DEBUG(errs() << "== "; Node->dump(CurDAG); errs() << "\n"); diff --git a/llvm/lib/Target/Nios2/Nios2ISelDAGToDAG.cpp b/llvm/lib/Target/Nios2/Nios2ISelDAGToDAG.cpp index 31d04ebe447..acc5cee055c 100644 --- a/llvm/lib/Target/Nios2/Nios2ISelDAGToDAG.cpp +++ b/llvm/lib/Target/Nios2/Nios2ISelDAGToDAG.cpp @@ -59,9 +59,6 @@ public: // expanded, promoted and normal instructions void Nios2DAGToDAGISel::Select(SDNode *Node) { - // Dump information about the Node being selected - DEBUG(errs() << "Selecting: "; Node->dump(CurDAG); errs() << "\n"); - // If we have a custom node, we already have selected! if (Node->isMachineOpcode()) { DEBUG(errs() << "== "; Node->dump(CurDAG); errs() << "\n"); diff --git a/llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp b/llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp index 23a0382d442..d07301df718 100644 --- a/llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp +++ b/llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp @@ -58,9 +58,6 @@ void RISCVDAGToDAGISel::Select(SDNode *Node) { unsigned Opcode = Node->getOpcode(); MVT XLenVT = Subtarget->getXLenVT(); - // Dump information about the Node being selected. - DEBUG(dbgs() << "Selecting: "; Node->dump(CurDAG); dbgs() << "\n"); - // If we have a custom node, we have already selected if (Node->isMachineOpcode()) { DEBUG(dbgs() << "== "; Node->dump(CurDAG); dbgs() << "\n"); diff --git a/llvm/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp b/llvm/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp index 81175013ed2..d1769757157 100644 --- a/llvm/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp +++ b/llvm/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp @@ -1249,9 +1249,6 @@ bool SystemZDAGToDAGISel::storeLoadCanUseBlockBinary(SDNode *N, } void SystemZDAGToDAGISel::Select(SDNode *Node) { - // Dump information about the Node being selected - DEBUG(errs() << "Selecting: "; Node->dump(CurDAG); errs() << "\n"); - // If we have a custom node, we already have selected! if (Node->isMachineOpcode()) { DEBUG(errs() << "== "; Node->dump(CurDAG); errs() << "\n"); diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyISelDAGToDAG.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyISelDAGToDAG.cpp index 9f40d35689a..45263ccedf6 100644 --- a/llvm/lib/Target/WebAssembly/WebAssemblyISelDAGToDAG.cpp +++ b/llvm/lib/Target/WebAssembly/WebAssemblyISelDAGToDAG.cpp @@ -68,11 +68,6 @@ private: } // end anonymous namespace void WebAssemblyDAGToDAGISel::Select(SDNode *Node) { - // Dump information about the Node being selected. - DEBUG(errs() << "Selecting: "); - DEBUG(Node->dump(CurDAG)); - DEBUG(errs() << "\n"); - // If we have a custom node, we already have selected! if (Node->isMachineOpcode()) { DEBUG(errs() << "== "; Node->dump(CurDAG); errs() << "\n"); diff --git a/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp b/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp index b47ef91d42a..e72f20572d6 100644 --- a/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp +++ b/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp @@ -2519,8 +2519,6 @@ void X86DAGToDAGISel::Select(SDNode *Node) { unsigned Opcode = Node->getOpcode(); SDLoc dl(Node); - DEBUG(dbgs() << "Selecting: "; Node->dump(CurDAG); dbgs() << '\n'); - if (Node->isMachineOpcode()) { DEBUG(dbgs() << "== "; Node->dump(CurDAG); dbgs() << '\n'); Node->setNodeId(-1); |