llvm.org GIT mirror llvm / 88d2075
Cleanup dump() functions. We had various variants of defining dump() functions in LLVM. Normalize them (this should just consistently implement the things discussed in http://lists.llvm.org/pipermail/cfe-dev/2014-January/034323.html For reference: - Public headers should just declare the dump() method but not use LLVM_DUMP_METHOD or #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) - The definition of a dump method should look like this: #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) LLVM_DUMP_METHOD void MyClass::dump() { // print stuff to dbgs()... } #endif git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293359 91177308-0d34-0410-b5e6-96231b3b80d8 Matthias Braun 2 years ago
94 changed file(s) with 392 addition(s) and 211 deletion(s). Raw diff Collapse all Expand all
228228 void print(raw_ostream &os, ModuleSlotTracker &MST,
229229 const TargetRegisterInfo *TRI = nullptr,
230230 const TargetIntrinsicInfo *IntrinsicInfo = nullptr) const;
231 LLVM_DUMP_METHOD void dump() const;
231 void dump() const;
232232
233233 //===--------------------------------------------------------------------===//
234234 // Accessors that tell you what kind of MachineOperand you're looking at.
145145 void addPressureChange(unsigned RegUnit, bool IsDec,
146146 const MachineRegisterInfo *MRI);
147147
148 LLVM_DUMP_METHOD void dump(const TargetRegisterInfo &TRI) const;
148 void dump(const TargetRegisterInfo &TRI) const;
149149 };
150150
151151 /// List of registers defined and used by a machine instruction.
444444
445445 /// \brief Mark debug helper function definitions like dump() that should not be
446446 /// stripped from debug builds.
447 /// Note that you should also surround dump() functions with
448 /// `#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)` so they do always
449 /// get stripped in release builds.
447450 // FIXME: Move this to a private config.h as it's not usable in public headers.
448451 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
449452 #define LLVM_DUMP_METHOD LLVM_ATTRIBUTE_NOINLINE LLVM_ATTRIBUTE_USED
247247 bool readGCNO(GCOVBuffer &Buffer);
248248 bool readGCDA(GCOVBuffer &Buffer);
249249 uint32_t getChecksum() const { return Checksum; }
250 void print(raw_ostream &OS) const;
250251 void dump() const;
251252 void collectLineCounts(FileInfo &FI);
252253
289290 return make_range(block_begin(), block_end());
290291 }
291292
293 void print(raw_ostream &OS) const;
292294 void dump() const;
293295 void collectLineCounts(FileInfo &FI);
294296
360362 return make_range(dst_begin(), dst_end());
361363 }
362364
365 void print(raw_ostream &OS) const;
363366 void dump() const;
364367 void collectLineCounts(FileInfo &FI);
365368
14611461 ResolveFirst = b;
14621462 }
14631463
1464 void print(raw_ostream &OS) const;
14641465 void dump() const;
14651466
14661467 //===--------------------------------------------------------------------===//
2727 return ScaledNumber(getMass() + 1, -64);
2828 }
2929
30 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
3031 LLVM_DUMP_METHOD void BlockMass::dump() const { print(dbgs()); }
32 #endif
3133
3234 static char getHexDigit(int N) {
3335 assert(N < 16);
124124 CN->print(OS);
125125 }
126126
127 LLVM_DUMP_METHOD
128 void CallGraph::dump() const { print(dbgs()); }
127 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
128 LLVM_DUMP_METHOD void CallGraph::dump() const { print(dbgs()); }
129 #endif
129130
130131 // removeFunctionFromModule - Unlink the function from this module, returning
131132 // it. Because this removes the function from the module, the call graph node
193194 OS << '\n';
194195 }
195196
196 LLVM_DUMP_METHOD
197 void CallGraphNode::dump() const { print(dbgs()); }
197 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
198 LLVM_DUMP_METHOD void CallGraphNode::dump() const { print(dbgs()); }
199 #endif
198200
199201 /// removeCallEdgeFor - This method removes the edge in the node for the
200202 /// specified call site. Note that this method takes linear time, so it
306308 G->print(OS);
307309 }
308310
311 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
309312 LLVM_DUMP_METHOD
310313 void CallGraphWrapperPass::dump() const { print(dbgs(), nullptr); }
314 #endif
311315
312316 namespace {
313317 struct CallGraphPrinterLegacyPass : public ModulePass {
384384 Kind = Any;
385385 }
386386
387
387 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
388388 // For debugging purposes. Dumps the constraint out to OS.
389 void DependenceInfo::Constraint::dump(raw_ostream &OS) const {
389 LLVM_DUMP_METHOD void DependenceInfo::Constraint::dump(raw_ostream &OS) const {
390390 if (isEmpty())
391391 OS << " Empty\n";
392392 else if (isAny())
402402 else
403403 llvm_unreachable("unknown constraint type in Constraint::dump");
404404 }
405 #endif
405406
406407
407408 // Updates X with the intersection
107107 EdgeIndexMap.erase(IndexMapI);
108108 }
109109
110 void LazyCallGraph::Node::dump() const {
110 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
111 LLVM_DUMP_METHOD void LazyCallGraph::Node::dump() const {
111112 dbgs() << *this << '\n';
112113 }
114 #endif
113115
114116 LazyCallGraph::LazyCallGraph(Module &M) : NextDFSNumber(0) {
115117 DEBUG(dbgs() << "Building CG for module: " << M.getModuleIdentifier()
166168 return *this;
167169 }
168170
169 void LazyCallGraph::SCC::dump() const {
171 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
172 LLVM_DUMP_METHOD void LazyCallGraph::SCC::dump() const {
170173 dbgs() << *this << '\n';
171174 }
175 #endif
172176
173177 #ifndef NDEBUG
174178 void LazyCallGraph::SCC::verify() {
242246
243247 LazyCallGraph::RefSCC::RefSCC(LazyCallGraph &G) : G(&G) {}
244248
245 void LazyCallGraph::RefSCC::dump() const {
249 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
250 LLVM_DUMP_METHOD void LazyCallGraph::RefSCC::dump() const {
246251 dbgs() << *this << '\n';
247252 }
253 #endif
248254
249255 #ifndef NDEBUG
250256 void LazyCallGraph::RefSCC::verify() {
148148 // Implementation of the SCEV class.
149149 //
150150
151 LLVM_DUMP_METHOD
152 void SCEV::dump() const {
151 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
152 LLVM_DUMP_METHOD void SCEV::dump() const {
153153 print(dbgs());
154154 dbgs() << '\n';
155155 }
156 #endif
156157
157158 void SCEV::print(raw_ostream &OS) const {
158159 switch (static_cast(getSCEVType())) {
431431 return I->second-1;
432432 }
433433
434 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
434435 LLVM_DUMP_METHOD void ValueEnumerator::dump() const {
435436 print(dbgs(), ValueMap, "Default");
436437 dbgs() << '\n';
437438 print(dbgs(), MetadataMap, "MetaData");
438439 dbgs() << '\n';
439440 }
441 #endif
440442
441443 void ValueEnumerator::print(raw_ostream &OS, const ValueMapType &Map,
442444 const char *Name) const {
451453 OS << "Value: " << V->getName();
452454 else
453455 OS << "Value: [null]\n";
454 V->dump();
456 V->print(errs());
457 errs() << '\n';
455458
456459 OS << " Uses(" << std::distance(V->use_begin(),V->use_end()) << "):";
457460 for (const Use &U : V->uses()) {
111111 }
112112 }
113113
114 LLVM_DUMP_METHOD
115 void DIEAbbrev::dump() { print(dbgs()); }
114 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
115 LLVM_DUMP_METHOD void DIEAbbrev::dump() {
116 print(dbgs());
117 }
118 #endif
116119
117120 //===----------------------------------------------------------------------===//
118121 // DIEAbbrevSet Implementation
248251 O << "\n";
249252 }
250253
251 LLVM_DUMP_METHOD
252 void DIE::dump() {
254 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
255 LLVM_DUMP_METHOD void DIE::dump() {
253256 print(dbgs());
254257 }
258 #endif
255259
256260 unsigned DIE::computeOffsetsAndAbbrevs(const AsmPrinter *AP,
257261 DIEAbbrevSet &AbbrevSet,
339343 }
340344 }
341345
342 LLVM_DUMP_METHOD
343 void DIEValue::dump() const {
346 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
347 LLVM_DUMP_METHOD void DIEValue::dump() const {
344348 print(dbgs());
345349 }
350 #endif
346351
347352 //===----------------------------------------------------------------------===//
348353 // DIEInteger Implementation
125125 #endif
126126 }
127127
128 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
128129 /// print block size and offset information - debugging
129 void BranchRelaxation::dumpBBs() {
130 LLVM_DUMP_METHOD void BranchRelaxation::dumpBBs() {
130131 for (auto &MBB : *MF) {
131132 const BasicBlockInfo &BBI = BlockInfo[MBB.getNumber()];
132133 dbgs() << format("BB#%u\toffset=%08x\t", MBB.getNumber(), BBI.Offset)
133134 << format("size=%#x\n", BBI.Size);
134135 }
135136 }
137 #endif
136138
137139 /// scanFunction - Do the initial scan of the function, building up
138140 /// information about each block.
967967 LocalFreq == Cost.LocalFreq;
968968 }
969969
970 void RegBankSelect::MappingCost::dump() const {
970 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
971 LLVM_DUMP_METHOD void RegBankSelect::MappingCost::dump() const {
971972 print(dbgs());
972973 dbgs() << '\n';
973974 }
975 #endif
974976
975977 void RegBankSelect::MappingCost::print(raw_ostream &OS) const {
976978 if (*this == ImpossibleCost()) {
7575 return &OtherRB == this;
7676 }
7777
78 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
7879 LLVM_DUMP_METHOD void RegisterBank::dump(const TargetRegisterInfo *TRI) const {
7980 print(dbgs(), /* IsForDebug */ true, TRI);
8081 }
82 #endif
8183
8284 void RegisterBank::print(raw_ostream &OS, bool IsForDebug,
8385 const TargetRegisterInfo *TRI) const {
401401 //------------------------------------------------------------------------------
402402 // Helper classes implementation.
403403 //------------------------------------------------------------------------------
404 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
404405 LLVM_DUMP_METHOD void RegisterBankInfo::PartialMapping::dump() const {
405406 print(dbgs());
406407 dbgs() << '\n';
407408 }
409 #endif
408410
409411 bool RegisterBankInfo::PartialMapping::verify() const {
410412 assert(RegBank && "Register bank not set");
452454 return true;
453455 }
454456
457 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
455458 LLVM_DUMP_METHOD void RegisterBankInfo::ValueMapping::dump() const {
456459 print(dbgs());
457460 dbgs() << '\n';
458461 }
462 #endif
459463
460464 void RegisterBankInfo::ValueMapping::print(raw_ostream &OS) const {
461465 OS << "#BreakDown: " << NumBreakDowns << " ";
504508 return true;
505509 }
506510
511 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
507512 LLVM_DUMP_METHOD void RegisterBankInfo::InstructionMapping::dump() const {
508513 print(dbgs());
509514 dbgs() << '\n';
510515 }
516 #endif
511517
512518 void RegisterBankInfo::InstructionMapping::print(raw_ostream &OS) const {
513519 OS << "ID: " << getID() << " Cost: " << getCost() << " Mapping: ";
620626 return Res;
621627 }
622628
629 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
623630 LLVM_DUMP_METHOD void RegisterBankInfo::OperandsMapper::dump() const {
624631 print(dbgs(), true);
625632 dbgs() << '\n';
626633 }
634 #endif
627635
628636 void RegisterBankInfo::OperandsMapper::print(raw_ostream &OS,
629637 bool ForDebug) const {
298298 return Result;
299299 }
300300
301 /// dump - Print data structures.
302 void LexicalScope::dump(unsigned Indent) const {
303 #ifndef NDEBUG
301 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
302 LLVM_DUMP_METHOD void LexicalScope::dump(unsigned Indent) const {
304303 raw_ostream &err = dbgs();
305304 err.indent(Indent);
306305 err << "DFSIn: " << DFSIn << " DFSOut: " << DFSOut << "\n";
315314 for (unsigned i = 0, e = Children.size(); i != e; ++i)
316315 if (Children[i] != this)
317316 Children[i]->dump(Indent + 2);
317 }
318318 #endif
319 }
10041004 return Pass::doInitialization(M);
10051005 }
10061006
1007 #ifndef NDEBUG
1007 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
10081008 LLVM_DUMP_METHOD void LiveDebugVariables::dump() {
10091009 if (pImpl)
10101010 static_cast(pImpl)->print(dbgs());
10311031 // When they exist, Spills.back().start <= LastStart,
10321032 // and WriteI[-1].start <= LastStart.
10331033
1034 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
10341035 void LiveRangeUpdater::print(raw_ostream &OS) const {
10351036 if (!isDirty()) {
10361037 if (LR)
10571058 LLVM_DUMP_METHOD void LiveRangeUpdater::dump() const {
10581059 print(errs());
10591060 }
1061 #endif
10601062
10611063 // Determine if A and B should be coalesced.
10621064 static inline bool coalescable(const LiveRange::Segment &A,
161161 }
162162
163163 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
164 void LiveIntervals::dumpInstrs() const {
164 LLVM_DUMP_METHOD void LiveIntervals::dumpInstrs() const {
165165 printInstrs(dbgs());
166166 }
167167 #endif
119119 OS << "\n";
120120 }
121121
122 /// Dumps the currently live registers to the debug output.
122 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
123123 LLVM_DUMP_METHOD void LivePhysRegs::dump() const {
124 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
125124 dbgs() << " " << *this;
125 }
126126 #endif
127 }
128127
129128 bool LivePhysRegs::available(const MachineRegisterInfo &MRI,
130129 unsigned Reg) const {
6363 return nullptr;
6464 }
6565
66 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
6667 LLVM_DUMP_METHOD void LiveVariables::VarInfo::dump() const {
67 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
6868 dbgs() << " Alive in blocks: ";
6969 for (SparseBitVector<>::iterator I = AliveBlocks.begin(),
7070 E = AliveBlocks.end(); I != E; ++I)
7777 dbgs() << "\n #" << i << ": " << *Kills[i];
7878 dbgs() << "\n";
7979 }
80 }
8081 #endif
81 }
8282
8383 /// getVarInfo - Get (possibly creating) a VarInfo object for the given vreg.
8484 LiveVariables::VarInfo &LiveVariables::getVarInfo(unsigned RegIdx) {
955955 }
956956
957957 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
958 void MachineFrameInfo::dump(const MachineFunction &MF) const {
958 LLVM_DUMP_METHOD void MachineFrameInfo::dump(const MachineFunction &MF) const {
959959 print(MF, dbgs());
960960 }
961961 #endif
16911691 }
16921692 }
16931693
1694 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
16941695 LLVM_DUMP_METHOD void MachineInstr::dump(const TargetInstrInfo *TII) const {
1695 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
16961696 dbgs() << " ";
16971697 print(dbgs(), false /* SkipOpers */, TII);
1698 }
16981699 #endif
1699 }
17001700
17011701 void MachineInstr::print(raw_ostream &OS, bool SkipOpers,
17021702 const TargetInstrInfo *TII) const {
551551 os << "\n";
552552 }
553553
554 void dump() const { print(dbgs()); }
554 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
555 LLVM_DUMP_METHOD void dump() const { print(dbgs()); }
556 #endif
555557 };
556558
557559 /// This class repesents the scheduled code. The main data structure is a
39793981 }
39803982 }
39813983
3984 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
39823985 /// Utility function used for debugging to print the schedule.
3983 void SMSchedule::dump() const { print(dbgs()); }
3986 LLVM_DUMP_METHOD void SMSchedule::dump() const { print(dbgs()); }
3987 #endif
443443 return TRC.getLaneMask();
444444 }
445445
446 #ifndef NDEBUG
447 void MachineRegisterInfo::dumpUses(unsigned Reg) const {
446 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
447 LLVM_DUMP_METHOD void MachineRegisterInfo::dumpUses(unsigned Reg) const {
448448 for (MachineInstr &I : use_instructions(Reg))
449449 I.dump();
450450 }
503503 // unimplemented
504504 }
505505
506 LLVM_DUMP_METHOD
507 void ReadyQueue::dump() {
506 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
507 LLVM_DUMP_METHOD void ReadyQueue::dump() {
508508 dbgs() << "Queue " << Name << ": ";
509509 for (unsigned i = 0, e = Queue.size(); i < e; ++i)
510510 dbgs() << Queue[i]->NodeNum << " ";
511511 dbgs() << "\n";
512512 }
513 #endif
513514
514515 //===----------------------------------------------------------------------===//
515516 // ScheduleDAGMI - Basic machine instruction scheduling. This is
840841 }
841842
842843 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
843 void ScheduleDAGMI::dumpSchedule() const {
844 LLVM_DUMP_METHOD void ScheduleDAGMI::dumpSchedule() const {
844845 for (MachineBasicBlock::iterator MI = begin(), ME = end(); MI != ME; ++MI) {
845846 if (SUnit *SU = getSUnit(&(*MI)))
846847 SU->dump(this);
23222323 return nullptr;
23232324 }
23242325
2325 #ifndef NDEBUG
2326 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
23262327 // This is useful information to dump after bumpNode.
23272328 // Note that the Queue contents are more useful before pickNodeFromQueue.
2328 void SchedBoundary::dumpScheduledState() {
2329 LLVM_DUMP_METHOD void SchedBoundary::dumpScheduledState() {
23292330 unsigned ResFactor;
23302331 unsigned ResCount;
23312332 if (ZoneCritResIdx) {
26652666 }
26662667
26672668 void GenericScheduler::dumpPolicy() {
2669 // Cannot completely remove virtual function even in release mode.
2670 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
26682671 dbgs() << "GenericScheduler RegionPolicy: "
26692672 << " ShouldTrackPressure=" << RegionPolicy.ShouldTrackPressure
26702673 << " OnlyTopDown=" << RegionPolicy.OnlyTopDown
26712674 << " OnlyBottomUp=" << RegionPolicy.OnlyBottomUp
26722675 << "\n";
2676 #endif
26732677 }
26742678
26752679 /// Set IsAcyclicLatencyLimited if the acyclic path is longer than the cyclic
252252
253253 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
254254 /// dumpSchedule - dump the scheduled Sequence.
255 void SchedulePostRATDList::dumpSchedule() const {
255 LLVM_DUMP_METHOD void SchedulePostRATDList::dumpSchedule() const {
256256 for (unsigned i = 0, e = Sequence.size(); i != e; i++) {
257257 if (SUnit *SU = Sequence[i])
258258 SU->dump(this);
839839 });
840840 }
841841
842 void PBQP::RegAlloc::PBQPRAGraph::dump(raw_ostream &OS) const {
842 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
843 LLVM_DUMP_METHOD void PBQP::RegAlloc::PBQPRAGraph::dump(raw_ostream &OS) const {
843844 for (auto NId : nodeIds()) {
844845 const Vector &Costs = getNodeCosts(NId);
845846 assert(Costs.getLength() != 0 && "Empty vector in graph.");
860861 }
861862 }
862863
863 LLVM_DUMP_METHOD void PBQP::RegAlloc::PBQPRAGraph::dump() const { dump(dbgs()); }
864 LLVM_DUMP_METHOD void PBQP::RegAlloc::PBQPRAGraph::dump() const {
865 dump(dbgs());
866 }
867 #endif
864868
865869 void PBQP::RegAlloc::PBQPRAGraph::printDot(raw_ostream &OS) const {
866870 OS << "graph {\n";
5151 }
5252 }
5353
54 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
5455 LLVM_DUMP_METHOD
5556 void llvm::dumpRegSetPressure(ArrayRef SetPressure,
5657 const TargetRegisterInfo *TRI) {
9697 P.dump(TRI);
9798 }
9899
100 LLVM_DUMP_METHOD
99101 void PressureDiff::dump(const TargetRegisterInfo &TRI) const {
100102 const char *sep = "";
101103 for (const PressureChange &Change : *this) {
107109 }
108110 dbgs() << '\n';
109111 }
112 #endif
110113
111114 void RegPressureTracker::increaseRegPressure(unsigned RegUnit,
112115 LaneBitmask PreviousMask,
235235 }
236236 }
237237
238 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
238239 LLVM_DUMP_METHOD void StackColoring::dumpAllocas() {
239240 dbgs() << "Allocas:\n";
240241 for (unsigned AllocaNo = 0; AllocaNo < NumAllocas; ++AllocaNo)
261262 dbgs() << " " << AllocaNo << ": " << Range << "\n";
262263 }
263264 }
265 #endif
264266
265267 void StackColoring::run() {
266268 DEBUG(dumpAllocas());
309309 }
310310
311311 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
312 LLVM_DUMP_METHOD
312313 void SUnit::print(raw_ostream &OS, const ScheduleDAG *DAG) const {
313314 if (this == &DAG->ExitSU)
314315 OS << "ExitSU";
320321
321322 /// SUnit - Scheduling unit. It's an wrapper around either a single SDNode or
322323 /// a group of nodes flagged together.
323 void SUnit::dump(const ScheduleDAG *G) const {
324 LLVM_DUMP_METHOD void SUnit::dump(const ScheduleDAG *G) const {
324325 print(dbgs(), G);
325326 dbgs() << ": ";
326327 G->dumpNode(this);
327328 }
328329
329 void SUnit::dumpAll(const ScheduleDAG *G) const {
330 LLVM_DUMP_METHOD void SUnit::dumpAll(const ScheduleDAG *G) const {
330331 dump(G);
331332
332333 dbgs() << " # preds left : " << NumPredsLeft << "\n";
12961296 }
12971297
12981298 void ScheduleDAGInstrs::dumpNode(const SUnit *SU) const {
1299 // Cannot completely remove virtual function even in release mode.
12991300 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
13001301 SU->getInstr()->dump();
13011302 #endif
16031604 }
16041605 }
16051606
1606 LLVM_DUMP_METHOD
1607 void ILPValue::print(raw_ostream &OS) const {
1607 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
1608 LLVM_DUMP_METHOD void ILPValue::print(raw_ostream &OS) const {
16081609 OS << InstrCount << " / " << Length << " = ";
16091610 if (!Length)
16101611 OS << "BADILP";
16121613 OS << format("%g", ((double)InstrCount / Length));
16131614 }
16141615
1615 LLVM_DUMP_METHOD
1616 void ILPValue::dump() const {
1616 LLVM_DUMP_METHOD void ILPValue::dump() const {
16171617 dbgs() << *this << '\n';
16181618 }
16191619
16261626 }
16271627
16281628 } // end namespace llvm
1629 #endif
17861786 }
17871787
17881788 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
1789 void dump(ScheduleDAG *DAG) const override {
1789 LLVM_DUMP_METHOD void dump(ScheduleDAG *DAG) const override {
17901790 // Emulate pop() without clobbering NodeQueueIds.
17911791 std::vector DumpQueue = Queue;
17921792 SF DumpPicker = Picker;
19221922 // Register Pressure Tracking
19231923 //===----------------------------------------------------------------------===//
19241924
1925 void RegReductionPQBase::dumpRegPressure() const {
19261925 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
1926 LLVM_DUMP_METHOD void RegReductionPQBase::dumpRegPressure() const {
19271927 for (const TargetRegisterClass *RC : TRI->regclasses()) {
19281928 unsigned Id = RC->getID();
19291929 unsigned RP = RegPressure[Id];
19311931 DEBUG(dbgs() << TRI->getRegClassName(RC) << ": " << RP << " / "
19321932 << RegLimit[Id] << '\n');
19331933 }
1934 }
19341935 #endif
1935 }
19361936
19371937 bool RegReductionPQBase::HighRegPressure(const SUnit *SU) const {
19381938 if (!TLI)
20882088 RegPressure[RCId] -= Cost;
20892089 }
20902090 }
2091 dumpRegPressure();
2091 DEBUG(dumpRegPressure());
20922092 }
20932093
20942094 void RegReductionPQBase::unscheduledNode(SUnit *SU) {
21682168 }
21692169 }
21702170
2171 dumpRegPressure();
2171 DEBUG(dumpRegPressure());
21722172 }
21732173
21742174 //===----------------------------------------------------------------------===//
649649 }
650650
651651 void ScheduleDAGSDNodes::dumpNode(const SUnit *SU) const {
652 // Cannot completely remove virtual function even in release mode.
652653 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
653654 if (!SU->getNode()) {
654655 dbgs() << "PHYS REG COPY\n";
365365 });
366366 }
367367
368 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
368369 LLVM_DUMP_METHOD void SDNode::dump() const { dump(nullptr); }
369 void SDNode::dump(const SelectionDAG *G) const {
370 LLVM_DUMP_METHOD void SDNode::dump(const SelectionDAG *G) const {
370371 print(dbgs(), G);
371372 dbgs() << '\n';
372373 }
374 #endif
373375
374376 void SDNode::print_types(raw_ostream &OS, const SelectionDAG *G) const {
375377 for (unsigned i = 0, e = getNumValues(); i != e; ++i) {
415417 OS << '<' << CSDN->getValueAPF().convertToDouble() << '>';
416418 else {
417419 OS << "
418 CSDN->getValueAPF().bitcastToAPInt().dump();
420 CSDN->getValueAPF().bitcastToAPInt().print(OS, false);
419421 OS << ")>";
420422 }
421423 } else if (const GlobalAddressSDNode *GADN =
565567 return Node.getNumOperands() == 0;
566568 }
567569
570 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
568571 static void DumpNodes(const SDNode *N, unsigned indent, const SelectionDAG *G) {
569572 for (const SDValue &Op : N->op_values()) {
570573 if (shouldPrintInline(*Op.getNode()))
591594 if (getRoot().getNode()) DumpNodes(getRoot().getNode(), 2, this);
592595 dbgs() << "\n\n";
593596 }
597 #endif
594598
595599 void SDNode::printr(raw_ostream &OS, const SelectionDAG *G) const {
596600 OS << PrintNodeId(*this) << ": ";
617621 }
618622 }
619623
624 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
620625 typedef SmallPtrSet VisitedSDNodeSet;
621626 static void DumpNodesr(raw_ostream &OS, const SDNode *N, unsigned indent,
622627 const SelectionDAG *G, VisitedSDNodeSet &once) {
645650 DumpNodesr(OS, Op.getNode(), indent+2, G, once);
646651 }
647652
648 void SDNode::dumpr() const {
653 LLVM_DUMP_METHOD void SDNode::dumpr() const {
649654 VisitedSDNodeSet once;
650655 DumpNodesr(dbgs(), this, 0, nullptr, once);
651656 }
652657
653 void SDNode::dumpr(const SelectionDAG *G) const {
658 LLVM_DUMP_METHOD void SDNode::dumpr(const SelectionDAG *G) const {
654659 VisitedSDNodeSet once;
655660 DumpNodesr(dbgs(), this, 0, G, once);
656661 }
662 #endif
657663
658664 static void printrWithDepthHelper(raw_ostream &OS, const SDNode *N,
659665 const SelectionDAG *G, unsigned depth,
687693 printrWithDepth(OS, G, 10);
688694 }
689695
696 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
697 LLVM_DUMP_METHOD
690698 void SDNode::dumprWithDepth(const SelectionDAG *G, unsigned depth) const {
691699 printrWithDepth(dbgs(), G, depth);
692700 }
693701
694 void SDNode::dumprFull(const SelectionDAG *G) const {
702 LLVM_DUMP_METHOD void SDNode::dumprFull(const SelectionDAG *G) const {
695703 // Don't print impossibly deep things.
696704 dumprWithDepth(G, 10);
697705 }
706 #endif
698707
699708 void SDNode::print(raw_ostream &OS, const SelectionDAG *G) const {
700709 printr(OS, G);
15341534
15351535 if (EnableFastISelVerbose || EnableFastISelAbort) {
15361536 dbgs() << "FastISel missed call: ";
1537 Inst->dump();
1537 Inst->print(dbgs());
15381538 }
15391539 if (EnableFastISelAbort > 2)
15401540 // FastISel selector couldn't handle something and bailed.
15781578 } else {
15791579 dbgs() << "FastISel miss: ";
15801580 }
1581 Inst->dump();
1581 Inst->print(dbgs());
15821582 }
15831583 if (ShouldAbort)
15841584 // FastISel selector couldn't handle something and bailed.
384384 MachineFunctionPass::getAnalysisUsage(AU);
385385 }
386386
387 #ifndef NDEBUG
388
387 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
389388 LLVM_DUMP_METHOD void StackColoring::dumpBV(const char *tag,
390389 const BitVector &BV) const {
391 DEBUG(dbgs() << tag << " : { ");
390 dbgs() << tag << " : { ";
392391 for (unsigned I = 0, E = BV.size(); I != E; ++I)
393 DEBUG(dbgs() << BV.test(I) << " ");
394 DEBUG(dbgs() << "}\n");
392 dbgs() << BV.test(I) << " ";
393 dbgs() << "}\n";
395394 }
396395
397396 LLVM_DUMP_METHOD void StackColoring::dumpBB(MachineBasicBlock *MBB) const {
407406
408407 LLVM_DUMP_METHOD void StackColoring::dump() const {
409408 for (MachineBasicBlock *MBB : depth_first(MF)) {
410 DEBUG(dbgs() << "Inspecting block #" << MBB->getNumber() << " ["
411 << MBB->getName() << "]\n");
412 DEBUG(dumpBB(MBB));
409 dbgs() << "Inspecting block #" << MBB->getNumber() << " ["
410 << MBB->getName() << "]\n";
411 dumpBB(MBB);
413412 }
414413 }
415414
416415 LLVM_DUMP_METHOD void StackColoring::dumpIntervals() const {
417416 for (unsigned I = 0, E = Intervals.size(); I != E; ++I) {
418 DEBUG(dbgs() << "Interval[" << I << "]:\n");
419 DEBUG(Intervals[I]->dump());
420 }
421 }
422
423 #endif // not NDEBUG
417 dbgs() << "Interval[" << I << "]:\n";
418 Intervals[I]->dump();
419 }
420 }
421 #endif
424422
425423 static inline int getStartOrEndSlot(const MachineInstr &MI)
426424 {
412412 }
413413
414414 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
415 void
416 TargetRegisterInfo::dumpReg(unsigned Reg, unsigned SubRegIndex,
417 const TargetRegisterInfo *TRI) {
415 LLVM_DUMP_METHOD
416 void TargetRegisterInfo::dumpReg(unsigned Reg, unsigned SubRegIndex,
417 const TargetRegisterInfo *TRI) {
418418 dbgs() << PrintReg(Reg, TRI, SubRegIndex) << "\n";
419419 }
420420 #endif
4545 return true;
4646 }
4747
48 void DWARFAcceleratorTable::dump(raw_ostream &OS) const {
48 LLVM_DUMP_METHOD void DWARFAcceleratorTable::dump(raw_ostream &OS) const {
4949 // Dump the header.
5050 OS << "Magic = " << format("0x%08x", Hdr.Magic) << '\n'
5151 << "Version = " << format("0x%04x", Hdr.Version) << '\n'
35343534 printMetadataImpl(OS, *this, MST, M, /* OnlyAsOperand */ false);
35353535 }
35363536
3537 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
35373538 // Value::dump - allow easy printing of Values from the debugger.
35383539 LLVM_DUMP_METHOD
35393540 void Value::dump() const { print(dbgs(), /*IsForDebug=*/true); dbgs() << '\n'; }
35653566 print(dbgs(), M, /*IsForDebug=*/true);
35663567 dbgs() << '\n';
35673568 }
3569 #endif
580580 // AttributeSetImpl Definition
581581 //===----------------------------------------------------------------------===//
582582
583 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
583584 LLVM_DUMP_METHOD void AttributeSetImpl::dump() const {
584585 AttributeSet(const_cast(this)).dump();
585586 }
587 #endif
586588
587589 //===----------------------------------------------------------------------===//
588590 // AttributeSet Construction and Mutation Methods
11141116 return pImpl->getSlotAttributes(Slot);
11151117 }
11161118
1119 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
11171120 LLVM_DUMP_METHOD void AttributeSet::dump() const {
11181121 dbgs() << "PAL[\n";
11191122
11291132
11301133 dbgs() << "]\n";
11311134 }
1135 #endif
11321136
11331137 //===----------------------------------------------------------------------===//
11341138 // AttrBuilder Method Implementations
995995 OS << "[" << Lower << "," << Upper << ")";
996996 }
997997
998 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
998999 /// dump - Allow printing from a debugger easily...
9991000 ///
10001001 LLVM_DUMP_METHOD void ConstantRange::dump() const {
10011002 print(dbgs());
10021003 }
1004 #endif
10031005
10041006 ConstantRange llvm::getConstantRangeFromMetadata(const MDNode &Ranges) {
10051007 const unsigned NumRanges = Ranges.getNumOperands() / 2;
257257 unwrap(M)->setTargetTriple(Triple);
258258 }
259259
260 void LLVMDumpModule(LLVMModuleRef M) {
260 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
261 LLVM_DUMP_METHOD void LLVMDumpModule(LLVMModuleRef M) {
261262 unwrap(M)->dump();
262263 }
264 #endif
263265
264266 LLVMBool LLVMPrintModuleToFile(LLVMModuleRef M, const char *Filename,
265267 char **ErrorMessage) {
357359 return wrap(&unwrap(Ty)->getContext());
358360 }
359361
360 void LLVMDumpType(LLVMTypeRef Ty) {
362 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
363 LLVM_DUMP_METHOD void LLVMDumpType(LLVMTypeRef Ty) {
361364 return unwrap(Ty)->dump();
362365 }
366 #endif
363367
364368 char *LLVMPrintTypeToString(LLVMTypeRef Ty) {
365369 std::string buf;
639643 unwrap(Val)->setName(Name);
640644 }
641645
642 void LLVMDumpValue(LLVMValueRef Val) {
646 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
647 LLVM_DUMP_METHOD void LLVMDumpValue(LLVMValueRef Val) {
643648 unwrap(Val)->dump();
644649 }
650 #endif
645651
646652 char* LLVMPrintValueToString(LLVMValueRef Val) {
647653 std::string buf;
6565 const_cast(InlinedAt));
6666 }
6767
68 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
6869 LLVM_DUMP_METHOD void DebugLoc::dump() const {
69 #ifndef NDEBUG
7070 if (!Loc)
7171 return;
7272
7878 InlinedAtDL.dump();
7979 } else
8080 dbgs() << "\n";
81 }
8182 #endif
82 }
8383
8484 void DebugLoc::print(raw_ostream &OS) const {
8585 if (!Loc)
102102 return true;
103103 }
104104
105 void GCOVFile::print(raw_ostream &OS) const {
106 for (const auto &FPtr : Functions)
107 FPtr->print(OS);
108 }
109
110 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
105111 /// dump - Dump GCOVFile content to dbgs() for debugging purposes.
106112 LLVM_DUMP_METHOD void GCOVFile::dump() const {
107 for (const auto &FPtr : Functions)
108 FPtr->dump();
109 }
113 print(dbgs());
114 }
115 #endif
110116
111117 /// collectLineCounts - Collect line counts. This must be used after
112118 /// reading .gcno and .gcda files.
342348 return Blocks.back()->getCount();
343349 }
344350
351 void GCOVFunction::print(raw_ostream &OS) const {
352 OS << "===== " << Name << " (" << Ident << ") @ " << Filename << ":"
353 << LineNumber << "\n";
354 for (const auto &Block : Blocks)
355 Block->print(OS);
356 }
357
358 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
345359 /// dump - Dump GCOVFunction content to dbgs() for debugging purposes.
346360 LLVM_DUMP_METHOD void GCOVFunction::dump() const {
347 dbgs() << "===== " << Name << " (" << Ident << ") @ " << Filename << ":"
348 << LineNumber << "\n";
349 for (const auto &Block : Blocks)
350 Block->dump();
351 }
361 print(dbgs());
362 }
363 #endif
352364
353365 /// collectLineCounts - Collect line counts. This must be used after
354366 /// reading .gcno and .gcda files.
399411 FI.addBlockLine(Parent.getFilename(), N, this);
400412 }
401413
414 void GCOVBlock::print(raw_ostream &OS) const {
415 OS << "Block : " << Number << " Counter : " << Counter << "\n";
416 if (!SrcEdges.empty()) {
417 OS << "\tSource Edges : ";
418 for (const GCOVEdge *Edge : SrcEdges)
419 OS << Edge->Src.Number << " (" << Edge->Count << "), ";
420 OS << "\n";
421 }
422 if (!DstEdges.empty()) {
423 OS << "\tDestination Edges : ";
424 for (const GCOVEdge *Edge : DstEdges)
425 OS << Edge->Dst.Number << " (" << Edge->Count << "), ";
426 OS << "\n";
427 }
428 if (!Lines.empty()) {
429 OS << "\tLines : ";
430 for (uint32_t N : Lines)
431 OS << (N) << ",";
432 OS << "\n";
433 }
434 }
435
436 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
402437 /// dump - Dump GCOVBlock content to dbgs() for debugging purposes.
403438 LLVM_DUMP_METHOD void GCOVBlock::dump() const {
404 dbgs() << "Block : " << Number << " Counter : " << Counter << "\n";
405 if (!SrcEdges.empty()) {
406 dbgs() << "\tSource Edges : ";
407 for (const GCOVEdge *Edge : SrcEdges)
408 dbgs() << Edge->Src.Number << " (" << Edge->Count << "), ";
409 dbgs() << "\n";
410 }
411 if (!DstEdges.empty()) {
412 dbgs() << "\tDestination Edges : ";
413 for (const GCOVEdge *Edge : DstEdges)
414 dbgs() << Edge->Dst.Number << " (" << Edge->Count << "), ";
415 dbgs() << "\n";
416 }
417 if (!Lines.empty()) {
418 dbgs() << "\tLines : ";
419 for (uint32_t N : Lines)
420 dbgs() << (N) << ",";
421 dbgs() << "\n";
422 }
423 }
439 print(dbgs());
440 }
441 #endif
424442
425443 //===----------------------------------------------------------------------===//
426444 // FileInfo implementation.
117117 O << "Pass::print not implemented for pass: '" << getPassName() << "'!\n";
118118 }
119119
120 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
120121 // dump - call print(cerr);
121122 LLVM_DUMP_METHOD void Pass::dump() const {
122123 print(dbgs(), nullptr);
123124 }
125 #endif
124126
125127 //===----------------------------------------------------------------------===//
126128 // ImmutablePass Implementation
9898 return makeUniqueName(V, UniqueName);
9999 }
100100
101 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
101102 // dump - print out the symbol table
102103 //
103104 LLVM_DUMP_METHOD void ValueSymbolTable::dump() const {
104 //DEBUG(dbgs() << "ValueSymbolTable:\n");
105 //dbgs() << "ValueSymbolTable:\n";
105106 for (const auto &I : *this) {
106 //DEBUG(dbgs() << " '" << I->getKeyData() << "' = ");
107 //dbgs() << " '" << I->getKeyData() << "' = ";
107108 I.getValue()->dump();
108 //DEBUG(dbgs() << "\n");
109 //dbgs() << "\n";
109110 }
110111 }
112 #endif
128128 llvm_unreachable("Invalid expression kind!");
129129 }
130130
131 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
131132 LLVM_DUMP_METHOD void MCExpr::dump() const {
132133 dbgs() << *this;
133134 dbgs() << '\n';
134135 }
136 #endif
135137
136138 /* *** */
137139
308308
309309 }
310310
311 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
311312 LLVM_DUMP_METHOD void MCFragment::dump() {
312313 raw_ostream &OS = llvm::errs();
313314
467468 }
468469 OS << "]>\n";
469470 }
471 #endif
3333 OS << ">";
3434 }
3535
36 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
3637 LLVM_DUMP_METHOD void MCOperand::dump() const {
3738 print(dbgs());
3839 dbgs() << "\n";
3940 }
41 #endif
4042
4143 void MCInst::print(raw_ostream &OS) const {
4244 OS << "
6264 OS << ">";
6365 }
6466
67 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
6568 LLVM_DUMP_METHOD void MCInst::dump() const {
6669 print(dbgs());
6770 dbgs() << "\n";
6871 }
72 #endif
1515 OS << '"' << getInstance() << '"';
1616 }
1717
18 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
1819 LLVM_DUMP_METHOD void MCLabel::dump() const {
1920 print(dbgs());
2021 }
22 #endif
136136 return parseExpression(Res, L);
137137 }
138138
139 LLVM_DUMP_METHOD void MCParsedAsmOperand::dump() const {
139 void MCParsedAsmOperand::dump() const {
140 // Cannot completely remove virtual function even in release mode.
141 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
140142 dbgs() << " " << *this;
143 #endif
141144 }
8484 return IP;
8585 }
8686
87 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
8788 LLVM_DUMP_METHOD void MCSection::dump() {
8889 raw_ostream &OS = llvm::errs();
8990
9697 }
9798 OS << "]>";
9899 }
100 #endif
7474 OS << '"';
7575 }
7676
77 LLVM_DUMP_METHOD void MCSymbol::dump() const { dbgs() << *this; }
77 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
78 LLVM_DUMP_METHOD void MCSymbol::dump() const {
79 dbgs() << *this;
80 }
81 #endif
3636 OS << " + " << getConstant();
3737 }
3838
39 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
3940 LLVM_DUMP_METHOD void MCValue::dump() const {
4041 print(dbgs());
4142 }
43 #endif
4244
4345 MCSymbolRefExpr::VariantKind MCValue::getAccessVariant() const {
4446 const MCSymbolRefExpr *B = getSymB();
281281 OS << "\n";
282282 }
283283
284 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
284285 /// dump - Dump feature info.
285286 ///
286287 LLVM_DUMP_METHOD void SubtargetFeatures::dump() const {
287288 print(dbgs());
288289 }
290 #endif
289291
290292 /// Adds the default features for the specified target triple.
291293 ///
6060 O << "]>\n";
6161 }
6262
63 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
6364 LLVM_DUMP_METHOD void Arg::dump() const { print(dbgs()); }
65 #endif
6466
6567 std::string Arg::getAsString(const ArgList &Args) const {
6668 SmallString<256> Res;
352352 }
353353 }
354354
355 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
355356 LLVM_DUMP_METHOD void ArgList::dump() const { print(dbgs()); }
357 #endif
356358
357359 //
358360
8282 O << ">\n";
8383 }
8484
85 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
8586 LLVM_DUMP_METHOD void Option::dump() const { print(dbgs()); }
87 #endif
8688
8789 bool Option::matches(OptSpecifier Opt) const {
8890 // Aliases are never considered in matching, look through them.
7373 return OS;
7474 }
7575
76 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
7677 LLVM_DUMP_METHOD void LineLocation::dump() const { print(dbgs()); }
78 #endif
7779
7880 /// \brief Print the sample record to the stream \p OS indented by \p Indent.
7981 void SampleRecord::print(raw_ostream &OS, unsigned Indent) const {
8688 OS << "\n";
8789 }
8890
91 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
8992 LLVM_DUMP_METHOD void SampleRecord::dump() const { print(dbgs(), 0); }
93 #endif
9094
9195 raw_ostream &llvm::sampleprof::operator<<(raw_ostream &OS,
9296 const SampleRecord &Sample) {
135139 return OS;
136140 }
137141
138 void FunctionSamples::dump(void) const { print(dbgs(), 0); }
142 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
143 LLVM_DUMP_METHOD void FunctionSamples::dump(void) const { print(dbgs(), 0); }
144 #endif
44934493 OS << Buffer << "\n";
44944494 }
44954495
4496 void APFloat::dump() const { print(dbgs()); }
4496 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
4497 LLVM_DUMP_METHOD void APFloat::dump() const { print(dbgs()); }
4498 #endif
44974499
44984500 void APFloat::Profile(FoldingSetNodeID &NID) const {
44994501 NID.Add(bitcastToAPInt());
22402240 return S.str();
22412241 }
22422242
2243
2243 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
22442244 LLVM_DUMP_METHOD void APInt::dump() const {
22452245 SmallString<40> S, U;
22462246 this->toStringUnsigned(U);
22482248 dbgs() << "APInt(" << BitWidth << "b, "
22492249 << U << "u " << S << "s)";
22502250 }
2251 #endif
22512252
22522253 void APInt::print(raw_ostream &OS, bool isSigned) const {
22532254 SmallString<40> S;
3131 Percent);
3232 }
3333
34 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
3435 LLVM_DUMP_METHOD void BranchProbability::dump() const { print(dbgs()) << '\n'; }
36 #endif
3537
3638 BranchProbability::BranchProbability(uint32_t Numerator, uint32_t Denominator) {
3739 assert(Denominator > 0 && "Denominator cannot be 0!");
172172 OS << ")";
173173 }
174174
175 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
175176 LLVM_DUMP_METHOD void Twine::dump() const {
176177 print(dbgs());
177178 }
178179
179 void Twine::dumpRepr() const {
180 LLVM_DUMP_METHOD void Twine::dumpRepr() const {
180181 printRepr(dbgs());
181182 }
183 #endif
3939 StringRecTy StringRecTy::Shared;
4040 DagRecTy DagRecTy::Shared;
4141
42 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
4243 LLVM_DUMP_METHOD void RecTy::dump() const { print(errs()); }
44 #endif
4345
4446 ListRecTy *RecTy::getListTy() {
4547 if (!ListTy)
160162 //===----------------------------------------------------------------------===//
161163
162164 void Init::anchor() { }
165 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
163166 LLVM_DUMP_METHOD void Init::dump() const { return print(errs()); }
167 #endif
164168
165169 UnsetInit *UnsetInit::get() {
166170 static UnsetInit TheInit;
15901594 return cast(getNameInit())->getValue();
15911595 }
15921596
1597 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
15931598 LLVM_DUMP_METHOD void RecordVal::dump() const { errs() << *this; }
1599 #endif
15941600
15951601 void RecordVal::print(raw_ostream &OS, bool PrintSem) const {
15961602 if (getPrefix()) OS << "field ";
16721678 }
16731679 }
16741680
1681 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
16751682 LLVM_DUMP_METHOD void Record::dump() const { errs() << *this; }
1683 #endif
16761684
16771685 raw_ostream &llvm::operator<<(raw_ostream &OS, const Record &R) {
16781686 OS << R.getNameInitAsString();
18641872 FieldName + "' does not have a dag initializer!");
18651873 }
18661874
1875 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
18671876 LLVM_DUMP_METHOD void MultiClass::dump() const {
18681877 errs() << "Record:\n";
18691878 Rec.dump();
18741883 }
18751884
18761885 LLVM_DUMP_METHOD void RecordKeeper::dump() const { errs() << *this; }
1886 #endif
18771887
18781888 raw_ostream &llvm::operator<<(raw_ostream &OS, const RecordKeeper &RK) {
18791889 OS << "------------- Classes -----------------\n";
944944 else if (ListInit *Arg0 = dyn_cast(InitList[0]))
945945 Type = Arg0->getType();
946946 else {
947 InitList[0]->dump();
947 InitList[0]->print(errs());
948948 Error(OpLoc, "expected a list");
949949 return nullptr;
950950 }
831831 SelectionDAG &DAG) const {
832832 switch (Op.getOpcode()) {
833833 default:
834 Op->dump(&DAG);
834 Op->print(errs(), &DAG);
835835 llvm_unreachable("Custom lowering code for this"
836836 "instruction is not implemented yet!");
837837 break;
161161 if (!STI.getInstrInfo()->verifyInstruction(*MI, Err)) {
162162 LLVMContext &C = MI->getParent()->getParent()->getFunction()->getContext();
163163 C.emitError("Illegal instruction detected: " + Err);
164 MI->dump();
164 MI->print(errs());
165165 }
166166
167167 if (MI->isBundle()) {
860860 continue;
861861 }
862862 default:
863 Intr->dump();
863 Intr->print(errs());
864864 llvm_unreachable("Don't know how to promote alloca intrinsic use.");
865865 }
866866 }
12541254
12551255 switch (Opc) {
12561256 default:
1257 MI->dump();
1257 MI->print(errs());
12581258 llvm_unreachable("Unsupported opcode for unwinding information");
12591259 case ARM::tPUSH:
12601260 // Special case here: no src & dst reg, but two extra imp ops.
12901290 int64_t Offset = 0;
12911291 switch (Opc) {
12921292 default:
1293 MI->dump();
1293 MI->print(errs());
12941294 llvm_unreachable("Unsupported opcode for unwinding information");
12951295 case ARM::MOVr:
12961296 case ARM::tMOVr:
13451345 }
13461346 }
13471347 } else if (DstReg == ARM::SP) {
1348 MI->dump();
1348 MI->print(errs());
13491349 llvm_unreachable("Unsupported opcode for unwinding information");
13501350 }
13511351 else {
1352 MI->dump();
1352 MI->print(errs());
13531353 llvm_unreachable("Unsupported opcode for unwinding information");
13541354 }
13551355 }
319319 #endif
320320 }
321321
322 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
322323 /// print block size and offset information - debugging
323 void ARMConstantIslands::dumpBBs() {
324 LLVM_DUMP_METHOD void ARMConstantIslands::dumpBBs() {
324325 DEBUG({
325326 for (unsigned J = 0, E = BBInfo.size(); J !=E; ++J) {
326327 const BasicBlockInfo &BBI = BBInfo[J];
332333 }
333334 });
334335 }
336 #endif
335337
336338 bool ARMConstantIslands::runOnMachineFunction(MachineFunction &mf) {
337339 MF = &mf;
9797 return false;
9898 }
9999
100 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
100101 LLVM_DUMP_METHOD void ARMConstantPoolValue::dump() const {
101102 errs() << " " << *this;
102103 }
104 #endif
103105
104106 void ARMConstantPoolValue::print(raw_ostream &O) const {
105107 if (Modifier) O << "(" << getModifierText() << ")";
87288728 bool isThumb2 = Subtarget->isThumb2();
87298729 switch (MI.getOpcode()) {
87308730 default: {
8731 MI.dump();
8731 MI.print(errs());
87328732 llvm_unreachable("Unexpected instr type to insert");
87338733 }
87348734
137137 else
138138 errs() << "Error: ";
139139 errs() << "Unsupport signed division for DAG: ";
140 Node->dump(CurDAG);
140 Node->print(errs(), CurDAG);
141141 errs() << "Please convert to unsigned div/mod.\n";
142142 break;
143143 }
5353 MCOperand MCOp;
5454 switch (MO.getType()) {
5555 default:
56 MI->dump();
56 MI->print(errs());
5757 llvm_unreachable("unknown operand type");
5858 case MachineOperand::MO_Register:
5959 // Ignore all implicit register operands.
108108
109109 switch (MO.getType()) {
110110 default:
111 MI->dump();
111 MI->print(errs());
112112 llvm_unreachable("unknown operand type");
113113 case MachineOperand::MO_Register:
114114 // Ignore all implicit register operands.
130130 INITIALIZE_PASS(HexagonSplitDoubleRegs, "hexagon-split-double",
131131 "Hexagon Split Double Registers", false, false)
132132
133 void HexagonSplitDoubleRegs::dump_partition(raw_ostream &os,
133 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
134 LLVM_DUMP_METHOD void HexagonSplitDoubleRegs::dump_partition(raw_ostream &os,
134135 const USet &Part, const TargetRegisterInfo &TRI) {
135136 dbgs() << '{';
136137 for (auto I : Part)
137138 dbgs() << ' ' << PrintReg(I, &TRI);
138139 dbgs() << " }";
139140 }
141 #endif
140142
141143 bool HexagonSplitDoubleRegs::isInduction(unsigned Reg, LoopRegMap &IRM) const {
142144 for (auto I : IRM) {
129129 MCOp = LowerSymbolOperand(MO, GetConstantPoolIndexSymbol(MO));
130130 break;
131131 default:
132 MI->dump();
132 MI->print(errs());
133133 llvm_unreachable("unknown operand type");
134134 }
135135
118118 MCOperand MCOp;
119119 switch (MO.getType()) {
120120 default:
121 MI->dump();
121 MI->print(errs());
122122 llvm_unreachable("unknown operand type");
123123 case MachineOperand::MO_Register:
124124 // Ignore all implicit register operands.
416416 return isOffsetInRange(UserOffset, TrialOffset,
417417 U.getMaxDisp(), U.NegOk);
418418 }
419 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
419420 /// print block size and offset information - debugging
420 void MipsConstantIslands::dumpBBs() {
421 DEBUG({
422 for (unsigned J = 0, E = BBInfo.size(); J !=E; ++J) {
423 const BasicBlockInfo &BBI = BBInfo[J];
424 dbgs() << format("%08x BB#%u\t", BBI.Offset, J)
425 << format(" size=%#x\n", BBInfo[J].Size);
426 }
427 });
428 }
421 LLVM_DUMP_METHOD void MipsConstantIslands::dumpBBs() {
422 for (unsigned J = 0, E = BBInfo.size(); J !=E; ++J) {
423 const BasicBlockInfo &BBI = BBInfo[J];
424 dbgs() << format("%08x BB#%u\t", BBI.Offset, J)
425 << format(" size=%#x\n", BBInfo[J].Size);
426 }
427 }
428 #endif
429429 /// Returns a pass that converts branches to long branches.
430430 FunctionPass *llvm::createMipsConstantIslandPass() {
431431 return new MipsConstantIslands();
147147 MCOperand MCOp;
148148 switch (MO.getType()) {
149149 default:
150 MI->dump();
150 MI->print(errs());
151151 llvm_unreachable("unknown operand type");
152152 case MachineOperand::MO_Register:
153153 assert(!MO.getSubReg() && "Subregs should be eliminated!");
521521
522522 if (RelevantFunction) {
523523 DEBUG(dbgs() << "Swap vector when first built\n\n");
524 dumpSwapVector();
524 DEBUG(dumpSwapVector());
525525 }
526526
527527 return RelevantFunction;
730730 }
731731
732732 DEBUG(dbgs() << "Swap vector after web analysis:\n\n");
733 dumpSwapVector();
733 DEBUG(dumpSwapVector());
734734 }
735735
736736 // Walk the swap vector entries looking for swaps fed by permuting loads
950950 return Changed;
951951 }
952952
953 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
953954 // For debug purposes, dump the contents of the swap vector.
954 void PPCVSXSwapRemoval::dumpSwapVector() {
955 LLVM_DUMP_METHOD void PPCVSXSwapRemoval::dumpSwapVector() {
955956
956957 for (unsigned EntryIdx = 0; EntryIdx < SwapVector.size(); ++EntryIdx) {
957958
958959 MachineInstr *MI = SwapVector[EntryIdx].VSEMI;
959960 int ID = SwapVector[EntryIdx].VSEId;
960961
961 DEBUG(dbgs() << format("%6d", ID));
962 DEBUG(dbgs() << format("%6d", EC->getLeaderValue(ID)));
963 DEBUG(dbgs() << format(" BB#%3d", MI->getParent()->getNumber()));
964 DEBUG(dbgs() << format(" %14s ",
965 TII->getName(MI->getOpcode()).str().c_str()));
962 dbgs() << format("%6d", ID);
963 dbgs() << format("%6d", EC->getLeaderValue(ID));
964 dbgs() << format(" BB#%3d", MI->getParent()->getNumber());
965 dbgs() << format(" %14s ", TII->getName(MI->getOpcode()).str().c_str());
966966
967967 if (SwapVector[EntryIdx].IsLoad)
968 DEBUG(dbgs() << "load ");
968 dbgs() << "load ";
969969 if (SwapVector[EntryIdx].IsStore)
970 DEBUG(dbgs() << "store ");
970 dbgs() << "store ";
971971 if (SwapVector[EntryIdx].IsSwap)
972 DEBUG(dbgs() << "swap ");
972 dbgs() << "swap ";
973973 if (SwapVector[EntryIdx].MentionsPhysVR)
974 DEBUG(dbgs() << "physreg ");
974 dbgs() << "physreg ";
975975 if (SwapVector[EntryIdx].MentionsPartialVR)
976 DEBUG(dbgs() << "partialreg ");
976 dbgs() << "partialreg ";
977977
978978 if (SwapVector[EntryIdx].IsSwappable) {
979 DEBUG(dbgs() << "swappable ");
979 dbgs() << "swappable ";
980980 switch(SwapVector[EntryIdx].SpecialHandling) {
981981 default:
982 DEBUG(dbgs() << "special:**unknown**");
982 dbgs() << "special:**unknown**";
983983 break;
984984 case SH_NONE:
985985 break;
986986 case SH_EXTRACT:
987 DEBUG(dbgs() << "special:extract ");
987 dbgs() << "special:extract ";
988988 break;
989989 case SH_INSERT:
990 DEBUG(dbgs() << "special:insert ");
990 dbgs() << "special:insert ";
991991 break;
992992 case SH_NOSWAP_LD:
993 DEBUG(dbgs() << "special:load ");
993 dbgs() << "special:load ";
994994 break;
995995 case SH_NOSWAP_ST:
996 DEBUG(dbgs() << "special:store ");
996 dbgs() << "special:store ";
997997 break;
998998 case SH_SPLAT:
999 DEBUG(dbgs() << "special:splat ");
999 dbgs() << "special:splat ";
10001000 break;
10011001 case SH_XXPERMDI:
1002 DEBUG(dbgs() << "special:xxpermdi ");
1002 dbgs() << "special:xxpermdi ";
10031003 break;
10041004 case SH_COPYWIDEN:
1005 DEBUG(dbgs() << "special:copywiden ");
1005 dbgs() << "special:copywiden ";
10061006 break;
10071007 }
10081008 }
10091009
10101010 if (SwapVector[EntryIdx].WebRejected)
1011 DEBUG(dbgs() << "rejected ");
1011 dbgs() << "rejected ";
10121012 if (SwapVector[EntryIdx].WillRemove)
1013 DEBUG(dbgs() << "remove ");
1014
1015 DEBUG(dbgs() << "\n");
1013 dbgs() << "remove ";
1014
1015 dbgs() << "\n";
10161016
10171017 // For no-asserts builds.
10181018 (void)MI;
10191019 (void)ID;
10201020 }
10211021
1022 DEBUG(dbgs() << "\n");
1023 }
1022 dbgs() << "\n";
1023 }
1024 #endif
10241025
10251026 } // end default namespace
10261027
356356 const MachineOperand &MO) const {
357357 switch (MO.getType()) {
358358 default:
359 MI->dump();
359 MI->print(errs());
360360 llvm_unreachable("unknown operand type");
361361 case MachineOperand::MO_Register:
362362 // Ignore all implicit register operands.
132132 };
133133 } // end anonymous namespace
134134
135 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
135136 LLVM_DUMP_METHOD void SuspendCrossingInfo::dump(StringRef Label,
136137 BitVector const &BV) const {
137138 dbgs() << Label << ":";
150151 }
151152 dbgs() << "\n";
152153 }
154 #endif
153155
154156 SuspendCrossingInfo::SuspendCrossingInfo(Function &F, coro::Shape &Shape)
155157 : Mapping(F) {
597597 return PA;
598598 }
599599
600 LLVM_DUMP_METHOD
601 void GVN::dump(DenseMap& d) {
600 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
601 LLVM_DUMP_METHOD void GVN::dump(DenseMap& d) {
602602 errs() << "{\n";
603603 for (DenseMap::iterator I = d.begin(),
604604 E = d.end(); I != E; ++I) {
607607 }
608608 errs() << "}\n";
609609 }
610 #endif
610611
611612 /// Return true if we can prove that the value
612613 /// we're analyzing is fully available in the specified block. As we go, keep
179179 OS << "[NumUses=" << UsedByIndices.count() << ']';
180180 }
181181
182 LLVM_DUMP_METHOD
183 void RegSortData::dump() const {
182 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
183 LLVM_DUMP_METHOD void RegSortData::dump() const {
184184 print(errs()); errs() << '\n';
185185 }
186 #endif
186187
187188 namespace {
188189
532533 }
533534 }
534535
535 LLVM_DUMP_METHOD
536 void Formula::dump() const {
536 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
537 LLVM_DUMP_METHOD void Formula::dump() const {
537538 print(errs()); errs() << '\n';
538539 }
540 #endif
539541
540542 /// Return true if the given addrec can be sign-extended without changing its
541543 /// value.
12371239 OS << ", plus " << SetupCost << " setup cost";
12381240 }
12391241
1240 LLVM_DUMP_METHOD
1241 void Cost::dump() const {
1242 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
1243 LLVM_DUMP_METHOD void Cost::dump() const {
12421244 print(errs()); errs() << '\n';
12431245 }
1246 #endif
12441247
12451248 LSRFixup::LSRFixup()
12461249 : UserInst(nullptr), OperandValToReplace(nullptr),
12831286 OS << ", Offset=" << Offset;
12841287 }
12851288
1286 LLVM_DUMP_METHOD
1287 void LSRFixup::dump() const {
1289 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
1290 LLVM_DUMP_METHOD void LSRFixup::dump() const {
12881291 print(errs()); errs() << '\n';
12891292 }
1293 #endif
12901294
12911295 /// Test whether this use as a formula which has the same registers as the given
12921296 /// formula.
13891393 OS << ", widest fixup type: " << *WidestFixupType;
13901394 }
13911395
1392 LLVM_DUMP_METHOD
1393 void LSRUse::dump() const {
1396 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
1397 LLVM_DUMP_METHOD void LSRUse::dump() const {
13941398 print(errs()); errs() << '\n';
13951399 }
1400 #endif
13961401
13971402 static bool isAMCompletelyFolded(const TargetTransformInfo &TTI,
13981403 LSRUse::KindType Kind, MemAccessTy AccessTy,
36953700 << " , add offset " << Imm;
36963701 }
36973702
3698 LLVM_DUMP_METHOD
3699 void WorkItem::dump() const {
3703 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
3704 LLVM_DUMP_METHOD void WorkItem::dump() const {
37003705 print(errs()); errs() << '\n';
37013706 }
3707 #endif
37023708
37033709 /// Look for registers which are a constant distance apart and try to form reuse
37043710 /// opportunities between them.
49734979 print_uses(OS);
49744980 }
49754981
4976 LLVM_DUMP_METHOD
4977 void LSRInstance::dump() const {
4982 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
4983 LLVM_DUMP_METHOD void LSRInstance::dump() const {
49784984 print(errs()); errs() << '\n';
49794985 }
4986 #endif
49804987
49814988 namespace {
49824989
18871887 F.print(OS, &Writer);
18881888 }
18891889
1890 void MemorySSA::dump() const {
1891 MemorySSAAnnotatedWriter Writer(this);
1892 F.print(dbgs(), &Writer);
1893 }
1890 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
1891 LLVM_DUMP_METHOD void MemorySSA::dump() const {
1892 print(dbgs());
1893 }
1894 #endif
18941895
18951896 void MemorySSA::verifyMemorySSA() const {
18961897 verifyDefUses(F);
21602161 }
21612162
21622163 void MemoryAccess::dump() const {
2164 // Cannot completely remove virtual function even in release mode.
2165 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
21632166 print(dbgs());
21642167 dbgs() << "\n";
2168 #endif
21652169 }
21662170
21672171 char MemorySSAPrinterLegacyPass::ID = 0;
129129 Function *llvm::checkSanitizerInterfaceFunction(Constant *FuncOrBitcast) {
130130 if (isa(FuncOrBitcast))
131131 return cast(FuncOrBitcast);
132 FuncOrBitcast->dump();
132 FuncOrBitcast->print(errs());
133 errs() << '\n';
133134 std::string Err;
134135 raw_string_ostream Stream(Err);
135136 Stream << "Sanitizer interface function redefined: " << *FuncOrBitcast;
7373 }
7474
7575 if (DumpGCOV)
76 GF.dump();
76 GF.print(errs());
7777
7878 FileInfo FI(Options);
7979 GF.collectLineCounts(FI);
1414 #include "llvm/IR/Instructions.h"
1515 #include "llvm/IR/Module.h"
1616 #include "llvm/Support/ErrorHandling.h"
17 #include "llvm/Support/Debug.h"
1718
1819 using namespace llvm;
1920
194195 switch (Log.getLineKind(I)) {
195196 case DC_match:
196197 out << " ";
197 Log.getLeft(I)->dump();
198 Log.getLeft(I)->print(dbgs()); dbgs() << '\n';
198199 //printValue(Log.getLeft(I), true);
199200 break;
200201 case DC_left:
201202 out << "< ";
202 Log.getLeft(I)->dump();
203 Log.getLeft(I)->print(dbgs()); dbgs() << '\n';
203204 //printValue(Log.getLeft(I), true);
204205 break;
205206 case DC_right:
206207 out << "> ";
207 Log.getRight(I)->dump();
208 Log.getRight(I)->print(dbgs()); dbgs() << '\n';
208209 //printValue(Log.getRight(I), false);
209210 break;
210211 }
3434 }
3535
3636 bool runOnFunction(Function &F) override {
37 getAnalysis().dump();
37 getAnalysis().print(dbgs());
3838 return false;
3939 }
4040 };
9595 } else if (Action->isSubClassOf("CCIf")) {
9696 O << Action->getValueAsString("Predicate");
9797 } else {
98 Action->dump();
98 errs() << *Action;
9999 PrintFatalError("Unknown CCPredicateAction!");
100100 }
101101
267267 << "LocVT, LocInfo, ArgFlags, State))\n";
268268 O << IndentStr << IndentStr << "return false;\n";
269269 } else {
270 Action->dump();
270 errs() << *Action;
271271 PrintFatalError("Unknown CCAction!");
272272 }
273273 }
12471247 if (Operator->isSubClassOf("ComplexPattern"))
12481248 return 1;
12491249
1250 Operator->dump();
1250 errs() << *Operator;
12511251 PrintFatalError("Unhandled node in GetNumNodeResults");
12521252 }
12531253
21132113
21142114 DagInit *Dag = dyn_cast(TheInit);
21152115 if (!Dag) {
2116 TheInit->dump();
2116 TheInit->print(errs());
21172117 error("Pattern has unexpected init kind!");
21182118 }
21192119 DefInit *OpDef = dyn_cast(Dag->getOperator());