llvm.org GIT mirror llvm / 1d03d38
Reverting r315590; it did not include changes for llvm-tblgen, which is causing link errors for several people. Error LNK2019 unresolved external symbol "public: void __cdecl `anonymous namespace'::MatchableInfo::dump(void)const " (?dump@MatchableInfo@?A0xf4f1c304@@QEBAXXZ) referenced in function "public: void __cdecl `anonymous namespace'::AsmMatcherEmitter::run(class llvm::raw_ostream &)" (?run@AsmMatcherEmitter@?A0xf4f1c304@@QEAAXAEAVraw_ostream@llvm@@@Z) llvm-tblgen D:\llvm\2017\utils\TableGen\AsmMatcherEmitter.obj 1 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315854 91177308-0d34-0410-b5e6-96231b3b80d8 Aaron Ballman 2 years ago
113 changed file(s) with 174 addition(s) and 175 deletion(s). Raw diff Collapse all Expand all
387387 option(LLVM_ENABLE_PEDANTIC "Compile with pedantic enabled." ON)
388388 option(LLVM_ENABLE_WERROR "Fail and stop if a warning is triggered." OFF)
389389
390 option(LLVM_ENABLE_DUMP "Enable dump functions in release builds" OFF)
391
390392 if( NOT uppercase_CMAKE_BUILD_TYPE STREQUAL "DEBUG" )
391393 option(LLVM_ENABLE_ASSERTIONS "Enable assertions" OFF)
392 option(LLVM_FORCE_ENABLE_DUMP "Enable dump functions in release builds" OFF)
393394 else()
394395 option(LLVM_ENABLE_ASSERTIONS "Enable assertions" ON)
395 option(LLVM_FORCE_ENABLE_DUMP "Enable dump functions in release builds" ON)
396 endif()
397
398 if( LLVM_ENABLE_ASSERTIONS OR LLVM_FORCE_ENABLE_DUMP )
396 endif()
397
398 if( LLVM_ENABLE_ASSERTIONS )
399399 set(LLVM_ENABLE_DUMP ON)
400400 endif()
401401
335335
336336 /* lltype -> unit */
337337 CAMLprim value llvm_dump_type(LLVMTypeRef Val) {
338 #ifdef LLVM_ENABLE_DUMP
338 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
339339 LLVMDumpType(Val);
340340 #else
341341 caml_raise_with_arg(*caml_named_value("Llvm.FeatureDisabled"),
108108 void print(raw_ostream &OS) const;
109109
110110 /// dump - Dump the dominance frontier to dbgs().
111 #ifdef LLVM_ENABLE_DUMP
111 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
112112 void dump() const;
113113 #endif
114114 };
147147 }
148148 }
149149
150 #ifdef LLVM_ENABLE_DUMP
150 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
151151 template
152152 void DominanceFrontierBase::dump() const {
153153 print(dbgs());
436436 void print(raw_ostream &OS, bool printTree = true, unsigned level = 0,
437437 PrintStyle Style = PrintNone) const;
438438
439 #ifdef LLVM_ENABLE_DUMP
439 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
440440 /// @brief Print the region to stderr.
441441 void dump() const;
442442 #endif
804804 static typename RegionT::PrintStyle printStyle;
805805
806806 void print(raw_ostream &OS) const;
807 #ifdef LLVM_ENABLE_DUMP
807 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
808808 void dump() const;
809809 #endif
810810
::dump() const { ::printStyle); ::dump() const { print(dbgs()); }
520520 OS.indent(level * 2) << "} \n";
521521 }
522522
523 #ifdef LLVM_ENABLE_DUMP
523 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
524524 template
525525 void RegionBase
526526 print(dbgs(), true, getDepth(), RegionInfoBase
788788 OS << "End region tree\n";
789789 }
790790
791 #ifdef LLVM_ENABLE_DUMP
791 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
792792 template
793793 void RegionInfoBase
794794 #endif
115115 return SchedModel.getProcResource(PIdx);
116116 }
117117
118 #ifdef LLVM_ENABLE_DUMP
118 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
119119 const char *getResourceName(unsigned PIdx) const {
120120 if (!PIdx)
121121 return "MOps";
352352 /* Has gcc/MSVC atomic intrinsics */
353353 #cmakedefine01 LLVM_HAS_ATOMICS
354354
355 /* Define if LLVM_ENABLE_DUMP is enabled */
356 #cmakedefine LLVM_ENABLE_DUMP
357
355358 /* Host triple LLVM will be executed on */
356359 #cmakedefine LLVM_HOST_TRIPLE "${LLVM_HOST_TRIPLE}"
357360
1212
1313 #ifndef LLVM_CONFIG_H
1414 #define LLVM_CONFIG_H
15
16 /* Defined in debug builds and release builds if LLVM_FORCE_ENABLE_DUMP
17 or LLVM_ENABLE_ASSERTIONS */
18 #cmakedefine LLVM_ENABLE_DUMP
1915
2016 /* Define if we link Polly to the tools */
2117 #cmakedefine LINK_POLLY_INTO_TOOLS
282282
283283 iterator begin() const;
284284 iterator end() const;
285 #ifdef LLVM_ENABLE_DUMP
285 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
286286 void dump() const;
287287 #endif
288288 };
2323
2424 /// Define a kind of processor resource that will be modeled by the scheduler.
2525 struct MCProcResourceDesc {
26 #ifdef LLVM_ENABLE_DUMP
26 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
2727 const char *Name;
2828 #endif
2929 unsigned NumUnits; // Number of resource of this kind
101101 static const unsigned short InvalidNumMicroOps = UINT16_MAX;
102102 static const unsigned short VariantNumMicroOps = UINT16_MAX - 1;
103103
104 #ifdef LLVM_ENABLE_DUMP
104 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
105105 const char* Name;
106106 #endif
107107 unsigned short NumMicroOps;
8686 << ", ImportIndex=" << ImportIndex;
8787 }
8888
89 #ifdef LLVM_ENABLE_DUMP
89 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
9090 LLVM_DUMP_METHOD void dump() const { print(dbgs()); }
9191 #endif
9292 };
441441 /// \brief Mark debug helper function definitions like dump() that should not be
442442 /// stripped from debug builds.
443443 /// Note that you should also surround dump() functions with
444 /// `#ifdef LLVM_ENABLE_DUMP` so they do always get stripped in release builds
445 /// unless asserts are enabled..
444 /// `#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)` so they do always
445 /// get stripped in release builds.
446446 // FIXME: Move this to a private config.h as it's not usable in public headers.
447 #ifdef LLVM_ENABLE_DUMP
447 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
448448 #define LLVM_DUMP_METHOD LLVM_ATTRIBUTE_NOINLINE LLVM_ATTRIBUTE_USED
449449 #else
450450 #define LLVM_DUMP_METHOD LLVM_ATTRIBUTE_NOINLINE
647647 OS << "\n";
648648 }
649649
650 #ifdef LLVM_ENABLE_DUMP
650 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
651651 LLVM_DUMP_METHOD void AliasSet::dump() const { print(dbgs()); }
652652 LLVM_DUMP_METHOD void AliasSetTracker::dump() const { print(dbgs()); }
653653 #endif
4545 return ScaledNumber(getMass() + 1, -64);
4646 }
4747
48 #ifdef LLVM_ENABLE_DUMP
48 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
4949 LLVM_DUMP_METHOD void BlockMass::dump() const { print(dbgs()); }
5050 #endif
5151
108108 CN->print(OS);
109109 }
110110
111 #ifdef LLVM_ENABLE_DUMP
111 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
112112 LLVM_DUMP_METHOD void CallGraph::dump() const { print(dbgs()); }
113113 #endif
114114
177177 OS << '\n';
178178 }
179179
180 #ifdef LLVM_ENABLE_DUMP
180 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
181181 LLVM_DUMP_METHOD void CallGraphNode::dump() const { print(dbgs()); }
182182 #endif
183183
291291 G->print(OS);
292292 }
293293
294 #ifdef LLVM_ENABLE_DUMP
294 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
295295 LLVM_DUMP_METHOD
296296 void CallGraphWrapperPass::dump() const { print(dbgs(), nullptr); }
297297 #endif
384384 Kind = Any;
385385 }
386386
387 #ifdef LLVM_ENABLE_DUMP
387 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
388388 // For debugging purposes. Dumps the constraint out to OS.
389389 LLVM_DUMP_METHOD void DependenceInfo::Constraint::dump(raw_ostream &OS) const {
390390 if (isEmpty())
5858 DF.print(OS);
5959 }
6060
61 #ifdef LLVM_ENABLE_DUMP
61 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
6262 LLVM_DUMP_METHOD void DominanceFrontierWrapperPass::dump() const {
6363 print(dbgs());
6464 }
339339 }
340340 }
341341
342 #ifdef LLVM_ENABLE_DUMP
342 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
343343 LLVM_DUMP_METHOD void IVUsers::dump() const { print(dbgs()); }
344344 #endif
345345
16971697 return Cost < std::max(1, Threshold);
16981698 }
16991699
1700 #ifdef LLVM_ENABLE_DUMP
1700 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
17011701 /// \brief Dump stats about this call's analysis.
17021702 LLVM_DUMP_METHOD void CallAnalyzer::dump() {
17031703 #define DEBUG_PRINT_STAT(x) dbgs() << " " #x ": " << x << "\n"
136136 F = &NewF;
137137 }
138138
139 #ifdef LLVM_ENABLE_DUMP
139 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
140140 LLVM_DUMP_METHOD void LazyCallGraph::Node::dump() const {
141141 dbgs() << *this << '\n';
142142 }
206206 return *this;
207207 }
208208
209 #ifdef LLVM_ENABLE_DUMP
209 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
210210 LLVM_DUMP_METHOD void LazyCallGraph::SCC::dump() const {
211211 dbgs() << *this << '\n';
212212 }
280280
281281 LazyCallGraph::RefSCC::RefSCC(LazyCallGraph &G) : G(&G) {}
282282
283 #ifdef LLVM_ENABLE_DUMP
283 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
284284 LLVM_DUMP_METHOD void LazyCallGraph::RefSCC::dump() const {
285285 dbgs() << *this << '\n';
286286 }
439439 return nullptr;
440440 }
441441
442 #ifdef LLVM_ENABLE_DUMP
442 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
443443 LLVM_DUMP_METHOD void Loop::dump() const { print(dbgs()); }
444444
445445 LLVM_DUMP_METHOD void Loop::dumpVerbose() const {
16211621 F.print(OS, &Writer);
16221622 }
16231623
1624 #ifdef LLVM_ENABLE_DUMP
1624 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
16251625 LLVM_DUMP_METHOD void MemorySSA::dump() const { print(dbgs()); }
16261626 #endif
16271627
18981898
18991899 void MemoryAccess::dump() const {
19001900 // Cannot completely remove virtual function even in release mode.
1901 #ifdef LLVM_ENABLE_DUMP
1901 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
19021902 print(dbgs());
19031903 dbgs() << "\n";
19041904 #endif
4040 return false;
4141 }
4242
43 #ifdef LLVM_ENABLE_DUMP
43 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
4444 LLVM_DUMP_METHOD void PHITransAddr::dump() const {
4545 if (!Addr) {
4646 dbgs() << "PHITransAddr: null\n";
151151 RI.print(OS);
152152 }
153153
154 #ifdef LLVM_ENABLE_DUMP
154 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
155155 LLVM_DUMP_METHOD void RegionInfoPass::dump() const {
156156 RI.dump();
157157 }
211211 // Implementation of the SCEV class.
212212 //
213213
214 #ifdef LLVM_ENABLE_DUMP
214 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
215215 LLVM_DUMP_METHOD void SCEV::dump() const {
216216 print(dbgs());
217217 dbgs() << '\n';
4343 O << "; Trace parent function: \n" << *F;
4444 }
4545
46 #ifdef LLVM_ENABLE_DUMP
46 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
4747 /// dump - Debugger convenience method; writes trace to standard error
4848 /// output stream.
4949 LLVM_DUMP_METHOD void Trace::dump() const {
464464 return I->second-1;
465465 }
466466
467 #ifdef LLVM_ENABLE_DUMP
467 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
468468 LLVM_DUMP_METHOD void ValueEnumerator::dump() const {
469469 print(dbgs(), ValueMap, "Default");
470470 dbgs() << '\n';
126126 }
127127 }
128128
129 #ifdef LLVM_ENABLE_DUMP
129 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
130130 LLVM_DUMP_METHOD void DIEAbbrev::dump() const {
131131 print(dbgs());
132132 }
266266 O << "\n";
267267 }
268268
269 #ifdef LLVM_ENABLE_DUMP
269 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
270270 LLVM_DUMP_METHOD void DIE::dump() const {
271271 print(dbgs());
272272 }
358358 }
359359 }
360360
361 #ifdef LLVM_ENABLE_DUMP
361 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
362362 LLVM_DUMP_METHOD void DIEValue::dump() const {
363363 print(dbgs());
364364 }
7575 const DIExpression *getExpression() const { return Expression; }
7676 friend bool operator==(const Value &, const Value &);
7777 friend bool operator<(const Value &, const Value &);
78 #ifdef LLVM_ENABLE_DUMP
78 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
7979 LLVM_DUMP_METHOD void dump() const {
8080 if (isLocation()) {
8181 llvm::dbgs() << "Loc = { reg=" << Loc.getReg() << " ";
137137 #endif
138138 }
139139
140 #ifdef LLVM_ENABLE_DUMP
140 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
141141 /// print block size and offset information - debugging
142142 LLVM_DUMP_METHOD void BranchRelaxation::dumpBBs() {
143143 for (auto &MBB : *MF) {
27492749 }
27502750 #endif
27512751
2752 #ifdef LLVM_ENABLE_DUMP
2752 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
27532753 void ExtAddrMode::print(raw_ostream &OS) const {
27542754 bool NeedPlus = false;
27552755 OS << "[";
985985 LocalFreq == Cost.LocalFreq;
986986 }
987987
988 #ifdef LLVM_ENABLE_DUMP
988 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
989989 LLVM_DUMP_METHOD void RegBankSelect::MappingCost::dump() const {
990990 print(dbgs());
991991 dbgs() << '\n';
7575 return &OtherRB == this;
7676 }
7777
78 #ifdef LLVM_ENABLE_DUMP
78 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
7979 LLVM_DUMP_METHOD void RegisterBank::dump(const TargetRegisterInfo *TRI) const {
8080 print(dbgs(), /* IsForDebug */ true, TRI);
8181 }
477477 //------------------------------------------------------------------------------
478478 // Helper classes implementation.
479479 //------------------------------------------------------------------------------
480 #ifdef LLVM_ENABLE_DUMP
480 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
481481 LLVM_DUMP_METHOD void RegisterBankInfo::PartialMapping::dump() const {
482482 print(dbgs());
483483 dbgs() << '\n';
530530 return true;
531531 }
532532
533 #ifdef LLVM_ENABLE_DUMP
533 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
534534 LLVM_DUMP_METHOD void RegisterBankInfo::ValueMapping::dump() const {
535535 print(dbgs());
536536 dbgs() << '\n';
584584 return true;
585585 }
586586
587 #ifdef LLVM_ENABLE_DUMP
587 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
588588 LLVM_DUMP_METHOD void RegisterBankInfo::InstructionMapping::dump() const {
589589 print(dbgs());
590590 dbgs() << '\n';
707707 return Res;
708708 }
709709
710 #ifdef LLVM_ENABLE_DUMP
710 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
711711 LLVM_DUMP_METHOD void RegisterBankInfo::OperandsMapper::dump() const {
712712 print(dbgs(), true);
713713 dbgs() << '\n';
705705 return true;
706706 }
707707
708 #ifdef LLVM_ENABLE_DUMP
708 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
709709 LLVM_DUMP_METHOD
710710 // Dump the range of instructions from B to E with their slot indexes.
711711 static void dumpMachineInstrRangeWithSlotIndex(MachineBasicBlock::iterator B,
316316 return Result;
317317 }
318318
319 #ifdef LLVM_ENABLE_DUMP
319 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
320320 LLVM_DUMP_METHOD void LexicalScope::dump(unsigned Indent) const {
321321 raw_ostream &err = dbgs();
322322 err.indent(Indent);
159159 /// dominates MBB.
160160 bool dominates(MachineBasicBlock &MBB) const { return UVS.dominates(&MBB); }
161161
162 #ifdef LLVM_ENABLE_DUMP
162 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
163163 LLVM_DUMP_METHOD void dump() const { MI.dump(); }
164164 #endif
165165
397397
398398 } // end anonymous namespace
399399
400 #ifdef LLVM_ENABLE_DUMP
400 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
401401 static void printDebugLoc(const DebugLoc &DL, raw_ostream &CommentOS,
402402 const LLVMContext &Ctx) {
403403 if (!DL)
12171217 return Pass::doInitialization(M);
12181218 }
12191219
1220 #ifdef LLVM_ENABLE_DUMP
1220 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
12211221 LLVM_DUMP_METHOD void LiveDebugVariables::dump() const {
12221222 if (pImpl)
12231223 static_cast(pImpl)->print(dbgs());
943943 return OS << '[' << S.start << ',' << S.end << ':' << S.valno->id << ')';
944944 }
945945
946 #ifdef LLVM_ENABLE_DUMP
946 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
947947 LLVM_DUMP_METHOD void LiveRange::Segment::dump() const {
948948 dbgs() << *this << '\n';
949949 }
992992 OS << SR;
993993 }
994994
995 #ifdef LLVM_ENABLE_DUMP
995 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
996996 LLVM_DUMP_METHOD void LiveRange::dump() const {
997997 dbgs() << *this << '\n';
998998 }
10761076 // When they exist, Spills.back().start <= LastStart,
10771077 // and WriteI[-1].start <= LastStart.
10781078
1079 #ifdef LLVM_ENABLE_DUMP
1079 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
10801080 void LiveRangeUpdater::print(raw_ostream &OS) const {
10811081 if (!isDirty()) {
10821082 if (LR)
178178 MF->print(OS, Indexes);
179179 }
180180
181 #ifdef LLVM_ENABLE_DUMP
181 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
182182 LLVM_DUMP_METHOD void LiveIntervals::dumpInstrs() const {
183183 printInstrs(dbgs());
184184 }
129129 OS << "\n";
130130 }
131131
132 #ifdef LLVM_ENABLE_DUMP
132 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
133133 LLVM_DUMP_METHOD void LivePhysRegs::dump() const {
134134 dbgs() << " " << *this;
135135 }
6363 return nullptr;
6464 }
6565
66 #ifdef LLVM_ENABLE_DUMP
66 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
6767 LLVM_DUMP_METHOD void LiveVariables::VarInfo::dump() const {
6868 dbgs() << " Alive in blocks: ";
6969 for (SparseBitVector<>::iterator I = AliveBlocks.begin(),
221221 return false;
222222 }
223223
224 #ifdef LLVM_ENABLE_DUMP
224 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
225225 LLVM_DUMP_METHOD void MachineBasicBlock::dump() const {
226226 print(dbgs());
227227 }
241241 }
242242 }
243243
244 #ifdef LLVM_ENABLE_DUMP
244 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
245245 LLVM_DUMP_METHOD void MachineFrameInfo::dump(const MachineFunction &MF) const {
246246 print(MF, dbgs());
247247 }
477477 return Dest;
478478 }
479479
480 #ifdef LLVM_ENABLE_DUMP
480 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
481481 LLVM_DUMP_METHOD void MachineFunction::dump() const {
482482 print(dbgs());
483483 }
913913 OS << '\n';
914914 }
915915
916 #ifdef LLVM_ENABLE_DUMP
916 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
917917 LLVM_DUMP_METHOD void MachineJumpTableInfo::dump() const { print(dbgs()); }
918918 #endif
919919
10681068 }
10691069 }
10701070
1071 #ifdef LLVM_ENABLE_DUMP
1071 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
10721072 LLVM_DUMP_METHOD void MachineConstantPool::dump() const { print(dbgs()); }
10731073 #endif
565565 OS << "[TF=" << TF << ']';
566566 }
567567
568 #ifdef LLVM_ENABLE_DUMP
568 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
569569 LLVM_DUMP_METHOD void MachineOperand::dump() const {
570570 dbgs() << *this << '\n';
571571 }
18721872 }
18731873 }
18741874
1875 #ifdef LLVM_ENABLE_DUMP
1875 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
18761876 LLVM_DUMP_METHOD void MachineInstr::dump() const {
18771877 dbgs() << " ";
18781878 print(dbgs());
137137 return Preheader;
138138 }
139139
140 #ifdef LLVM_ENABLE_DUMP
140 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
141141 LLVM_DUMP_METHOD void MachineLoop::dump() const {
142142 print(dbgs());
143143 }
557557 os << "\n";
558558 }
559559
560 #ifdef LLVM_ENABLE_DUMP
560 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
561561 LLVM_DUMP_METHOD void dump() const { print(dbgs()); }
562562 #endif
563563 };
40094009 DEBUG(dump(););
40104010 }
40114011
4012 #ifdef LLVM_ENABLE_DUMP
4012 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
40134013 /// Print the schedule information to the given output.
40144014 void SMSchedule::print(raw_ostream &os) const {
40154015 // Iterate over each cycle.
117117 RI.print(OS);
118118 }
119119
120 #ifdef LLVM_ENABLE_DUMP
120 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
121121 LLVM_DUMP_METHOD void MachineRegionInfoPass::dump() const {
122122 RI.dump();
123123 }
457457 return TRC.getLaneMask();
458458 }
459459
460 #ifdef LLVM_ENABLE_DUMP
460 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
461461 LLVM_DUMP_METHOD void MachineRegisterInfo::dumpUses(unsigned Reg) const {
462462 for (MachineInstr &I : use_instructions(Reg))
463463 I.dump();
580580 // unimplemented
581581 }
582582
583 #ifdef LLVM_ENABLE_DUMP
583 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
584584 LLVM_DUMP_METHOD void ReadyQueue::dump() const {
585585 dbgs() << "Queue " << Name << ": ";
586586 for (const SUnit *SU : Queue)
918918 FirstDbgValue = nullptr;
919919 }
920920
921 #ifdef LLVM_ENABLE_DUMP
921 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
922922 LLVM_DUMP_METHOD void ScheduleDAGMI::dumpSchedule() const {
923923 for (MachineBasicBlock::iterator MI = begin(), ME = end(); MI != ME; ++MI) {
924924 if (SUnit *SU = getSUnit(&(*MI)))
23532353 return nullptr;
23542354 }
23552355
2356 #ifdef LLVM_ENABLE_DUMP
2356 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
23572357 // This is useful information to dump after bumpNode.
23582358 // Note that the Queue contents are more useful before pickNodeFromQueue.
23592359 LLVM_DUMP_METHOD void SchedBoundary::dumpScheduledState() const {
26972697
26982698 void GenericScheduler::dumpPolicy() const {
26992699 // Cannot completely remove virtual function even in release mode.
2700 #ifdef LLVM_ENABLE_DUMP
2700 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
27012701 dbgs() << "GenericScheduler RegionPolicy: "
27022702 << " ShouldTrackPressure=" << RegionPolicy.ShouldTrackPressure
27032703 << " OnlyTopDown=" << RegionPolicy.OnlyTopDown
250250 ScheduleDAGInstrs::exitRegion();
251251 }
252252
253 #ifdef LLVM_ENABLE_DUMP
253 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
254254 /// dumpSchedule - dump the scheduled Sequence.
255255 LLVM_DUMP_METHOD void SchedulePostRATDList::dumpSchedule() const {
256256 for (unsigned i = 0, e = Sequence.size(); i != e; i++) {
867867 });
868868 }
869869
870 #ifdef LLVM_ENABLE_DUMP
870 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
871871 LLVM_DUMP_METHOD void PBQP::RegAlloc::PBQPRAGraph::dump(raw_ostream &OS) const {
872872 for (auto NId : nodeIds()) {
873873 const Vector &Costs = getNodeCosts(NId);
7575 }
7676 }
7777
78 #ifdef LLVM_ENABLE_DUMP
78 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
7979 LLVM_DUMP_METHOD
8080 void llvm::dumpRegSetPressure(ArrayRef SetPressure,
8181 const TargetRegisterInfo *TRI) {
249249 }
250250 }
251251
252 #ifdef LLVM_ENABLE_DUMP
252 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
253253 LLVM_DUMP_METHOD void StackColoring::dumpAllocas() {
254254 dbgs() << "Allocas:\n";
255255 for (unsigned AllocaNo = 0; AllocaNo < NumAllocas; ++AllocaNo)
334334 std::swap(*Preds.begin(), *BestI);
335335 }
336336
337 #ifdef LLVM_ENABLE_DUMP
337 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
338338 LLVM_DUMP_METHOD
339339 raw_ostream &SUnit::print(raw_ostream &OS,
340340 const SUnit *Entry, const SUnit *Exit) const {
9696 }
9797
9898 static void dumpSUList(ScheduleDAGInstrs::SUList &L) {
99 #ifdef LLVM_ENABLE_DUMP
99 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
100100 dbgs() << "{ ";
101101 for (const SUnit *su : L) {
102102 dbgs() << "SU(" << su->NodeNum << ")";
10951095
10961096 void ScheduleDAGInstrs::dumpNode(const SUnit *SU) const {
10971097 // Cannot completely remove virtual function even in release mode.
1098 #ifdef LLVM_ENABLE_DUMP
1098 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
10991099 SU->getInstr()->dump();
11001100 #endif
11011101 }
14071407 }
14081408 }
14091409
1410 #ifdef LLVM_ENABLE_DUMP
1410 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
14111411 LLVM_DUMP_METHOD void ILPValue::print(raw_ostream &OS) const {
14121412 OS << InstrCount << " / " << Length << " = ";
14131413 if (!Length)
8282 ReservedScoreboard.reset();
8383 }
8484
85 #ifdef LLVM_ENABLE_DUMP
85 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
8686 LLVM_DUMP_METHOD void ScoreboardHazardRecognizer::Scoreboard::dump() const {
8787 dbgs() << "Scoreboard:\n";
8888
18541854 return V;
18551855 }
18561856
1857 #ifdef LLVM_ENABLE_DUMP
1857 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
18581858 LLVM_DUMP_METHOD void dump(ScheduleDAG *DAG) const override {
18591859 // Emulate pop() without clobbering NodeQueueIds.
18601860 std::vector DumpQueue = Queue;
20252025 // Register Pressure Tracking
20262026 //===----------------------------------------------------------------------===//
20272027
2028 #ifdef LLVM_ENABLE_DUMP
2028 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
20292029 LLVM_DUMP_METHOD void RegReductionPQBase::dumpRegPressure() const {
20302030 for (const TargetRegisterClass *RC : TRI->regclasses()) {
20312031 unsigned Id = RC->getID();
650650
651651 void ScheduleDAGSDNodes::dumpNode(const SUnit *SU) const {
652652 // Cannot completely remove virtual function even in release mode.
653 #ifdef LLVM_ENABLE_DUMP
653 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
654654 if (!SU->getNode()) {
655655 dbgs() << "PHYS REG COPY\n";
656656 return;
670670 #endif
671671 }
672672
673 #ifdef LLVM_ENABLE_DUMP
673 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
674674 void ScheduleDAGSDNodes::dumpSchedule() const {
675675 for (unsigned i = 0, e = Sequence.size(); i != e; i++) {
676676 if (SUnit *SU = Sequence[i])
400400 });
401401 }
402402
403 #ifdef LLVM_ENABLE_DUMP
403 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
404404 LLVM_DUMP_METHOD void SDNode::dump() const { dump(nullptr); }
405405
406406 LLVM_DUMP_METHOD void SDNode::dump(const SelectionDAG *G) const {
633633 return Node.getNumOperands() == 0;
634634 }
635635
636 #ifdef LLVM_ENABLE_DUMP
636 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
637637 static void DumpNodes(const SDNode *N, unsigned indent, const SelectionDAG *G) {
638638 for (const SDValue &Op : N->op_values()) {
639639 if (shouldPrintInline(*Op.getNode()))
687687 }
688688 }
689689
690 #ifdef LLVM_ENABLE_DUMP
690 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
691691 using VisitedSDNodeSet = SmallPtrSet;
692692
693693 static void DumpNodesr(raw_ostream &OS, const SDNode *N, unsigned indent,
760760 printrWithDepth(OS, G, 10);
761761 }
762762
763 #ifdef LLVM_ENABLE_DUMP
763 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
764764 LLVM_DUMP_METHOD
765765 void SDNode::dumprWithDepth(const SelectionDAG *G, unsigned depth) const {
766766 printrWithDepth(dbgs(), G, depth);
249249 }
250250 }
251251
252 #ifdef LLVM_ENABLE_DUMP
252 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
253253 LLVM_DUMP_METHOD void SlotIndexes::dump() const {
254254 for (IndexList::const_iterator itr = indexList.begin();
255255 itr != indexList.end(); ++itr) {
276276 os << "invalid";
277277 }
278278
279 #ifdef LLVM_ENABLE_DUMP
279 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
280280 // Dump a SlotIndex to stderr.
281281 LLVM_DUMP_METHOD void SlotIndex::dump() const {
282282 print(dbgs());
391391 Edit->anyRematerializable(nullptr);
392392 }
393393
394 #ifdef LLVM_ENABLE_DUMP
394 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
395395 LLVM_DUMP_METHOD void SplitEditor::dump() const {
396396 if (RegAssign.empty()) {
397397 dbgs() << " empty\n";
532532 MachineFunctionPass::getAnalysisUsage(AU);
533533 }
534534
535 #ifdef LLVM_ENABLE_DUMP
535 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
536536 LLVM_DUMP_METHOD void StackColoring::dumpBV(const char *tag,
537537 const BitVector &BV) const {
538538 dbgs() << tag << " : { ";
423423 return true;
424424 }
425425
426 #ifdef LLVM_ENABLE_DUMP
426 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
427427 LLVM_DUMP_METHOD
428428 void TargetRegisterInfo::dumpReg(unsigned Reg, unsigned SubRegIndex,
429429 const TargetRegisterInfo *TRI) {
155155 OS << '\n';
156156 }
157157
158 #ifdef LLVM_ENABLE_DUMP
158 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
159159 LLVM_DUMP_METHOD void VirtRegMap::dump() const {
160160 print(dbgs());
161161 }
36223622 printMetadataImpl(OS, *this, MST, M, /* OnlyAsOperand */ false);
36233623 }
36243624
3625 #ifdef LLVM_ENABLE_DUMP
3625 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
36263626 // Value::dump - allow easy printing of Values from the debugger.
36273627 LLVM_DUMP_METHOD
36283628 void Value::dump() const { print(dbgs(), /*IsForDebug=*/true); dbgs() << '\n'; }
618618 return SetNode ? SetNode->end() : nullptr;
619619 }
620620
621 #ifdef LLVM_ENABLE_DUMP
621 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
622622 LLVM_DUMP_METHOD void AttributeSet::dump() const {
623623 dbgs() << "AS =\n";
624624 dbgs() << " { ";
827827 ID.AddPointer(Set.SetNode);
828828 }
829829
830 #ifdef LLVM_ENABLE_DUMP
830 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
831831 LLVM_DUMP_METHOD void AttributeListImpl::dump() const {
832832 AttributeList(const_cast(this)).dump();
833833 }
12871287 return pImpl ? pImpl->NumAttrSets : 0;
12881288 }
12891289
1290 #ifdef LLVM_ENABLE_DUMP
1290 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
12911291 LLVM_DUMP_METHOD void AttributeList::dump() const {
12921292 dbgs() << "PAL[\n";
12931293
938938 OS << "[" << Lower << "," << Upper << ")";
939939 }
940940
941 #ifdef LLVM_ENABLE_DUMP
941 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
942942 LLVM_DUMP_METHOD void ConstantRange::dump() const {
943943 print(dbgs());
944944 }
357357 return wrap(&unwrap(Ty)->getContext());
358358 }
359359
360 #ifdef LLVM_ENABLE_DUMP
360 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
361361 LLVM_DUMP_METHOD void LLVMDumpType(LLVMTypeRef Ty) {
362362 return unwrap(Ty)->dump();
363363 }
9898 return Last;
9999 }
100100
101 #ifdef LLVM_ENABLE_DUMP
101 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
102102 LLVM_DUMP_METHOD void DebugLoc::dump() const {
103103 if (!Loc)
104104 return;
107107 FPtr->print(OS);
108108 }
109109
110 #ifdef LLVM_ENABLE_DUMP
110 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
111111 /// dump - Dump GCOVFile content to dbgs() for debugging purposes.
112112 LLVM_DUMP_METHOD void GCOVFile::dump() const {
113113 print(dbgs());
355355 Block->print(OS);
356356 }
357357
358 #ifdef LLVM_ENABLE_DUMP
358 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
359359 /// dump - Dump GCOVFunction content to dbgs() for debugging purposes.
360360 LLVM_DUMP_METHOD void GCOVFunction::dump() const {
361361 print(dbgs());
433433 }
434434 }
435435
436 #ifdef LLVM_ENABLE_DUMP
436 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
437437 /// dump - Dump GCOVBlock content to dbgs() for debugging purposes.
438438 LLVM_DUMP_METHOD void GCOVBlock::dump() const {
439439 print(dbgs());
123123 OS << "Pass::print not implemented for pass: '" << getPassName() << "'!\n";
124124 }
125125
126 #ifdef LLVM_ENABLE_DUMP
126 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
127127 // dump - call print(cerr);
128128 LLVM_DUMP_METHOD void Pass::dump() const {
129129 print(dbgs(), nullptr);
9999 return makeUniqueName(V, UniqueName);
100100 }
101101
102 #ifdef LLVM_ENABLE_DUMP
102 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
103103 // dump - print out the symbol table
104104 //
105105 LLVM_DUMP_METHOD void ValueSymbolTable::dump() const {
135135 llvm_unreachable("Invalid expression kind!");
136136 }
137137
138 #ifdef LLVM_ENABLE_DUMP
138 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
139139 LLVM_DUMP_METHOD void MCExpr::dump() const {
140140 dbgs() << *this;
141141 dbgs() << '\n';
305305
306306 } // end namespace llvm
307307
308 #ifdef LLVM_ENABLE_DUMP
308 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
309309 LLVM_DUMP_METHOD void MCFragment::dump() const {
310310 raw_ostream &OS = errs();
311311
3434 OS << ">";
3535 }
3636
37 #ifdef LLVM_ENABLE_DUMP
37 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
3838 LLVM_DUMP_METHOD void MCOperand::dump() const {
3939 print(dbgs());
4040 dbgs() << "\n";
6565 OS << ">";
6666 }
6767
68 #ifdef LLVM_ENABLE_DUMP
68 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
6969 LLVM_DUMP_METHOD void MCInst::dump() const {
7070 print(dbgs());
7171 dbgs() << "\n";
1717 OS << '"' << getInstance() << '"';
1818 }
1919
20 #ifdef LLVM_ENABLE_DUMP
20 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
2121 LLVM_DUMP_METHOD void MCLabel::dump() const {
2222 print(dbgs());
2323 }
130130
131131 void MCParsedAsmOperand::dump() const {
132132 // Cannot completely remove virtual function even in release mode.
133 #ifdef LLVM_ENABLE_DUMP
133 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
134134 dbgs() << " " << *this;
135135 #endif
136136 }
8484 return IP;
8585 }
8686
87 #ifdef LLVM_ENABLE_DUMP
87 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
8888 LLVM_DUMP_METHOD void MCSection::dump() const {
8989 raw_ostream &OS = errs();
9090
8080 OS << '"';
8181 }
8282
83 #ifdef LLVM_ENABLE_DUMP
83 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
8484 LLVM_DUMP_METHOD void MCSymbol::dump() const {
8585 dbgs() << *this;
8686 }
3636 OS << " + " << getConstant();
3737 }
3838
39 #ifdef LLVM_ENABLE_DUMP
39 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
4040 LLVM_DUMP_METHOD void MCValue::dump() const {
4141 print(dbgs());
4242 }
255255 OS << "\n";
256256 }
257257
258 #ifdef LLVM_ENABLE_DUMP
258 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
259259 LLVM_DUMP_METHOD void SubtargetFeatures::dump() const {
260260 print(dbgs());
261261 }
169169 << ", FixupSection=" << FixupSection->getSectionName();
170170 }
171171
172 #ifdef LLVM_ENABLE_DUMP
172 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
173173 LLVM_DUMP_METHOD void dump() const { print(dbgs()); }
174174 #endif
175175 };
6060 O << "]>\n";
6161 }
6262
63 #ifdef LLVM_ENABLE_DUMP
63 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
6464 LLVM_DUMP_METHOD void Arg::dump() const { print(dbgs()); }
6565 #endif
6666
203203 }
204204 }
205205
206 #ifdef LLVM_ENABLE_DUMP
206 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
207207 LLVM_DUMP_METHOD void ArgList::dump() const { print(dbgs()); }
208208 #endif
209209
8585 O << ">\n";
8686 }
8787
88 #ifdef LLVM_ENABLE_DUMP
88 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
8989 LLVM_DUMP_METHOD void Option::dump() const { print(dbgs()); }
9090 #endif
9191
8181 return OS;
8282 }
8383
84 #ifdef LLVM_ENABLE_DUMP
84 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
8585 LLVM_DUMP_METHOD void LineLocation::dump() const { print(dbgs()); }
8686 #endif
8787
9696 OS << "\n";
9797 }
9898
99 #ifdef LLVM_ENABLE_DUMP
99 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
100100 LLVM_DUMP_METHOD void SampleRecord::dump() const { print(dbgs(), 0); }
101101 #endif
102102
149149 return OS;
150150 }
151151
152 #ifdef LLVM_ENABLE_DUMP
152 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
153153 LLVM_DUMP_METHOD void FunctionSamples::dump() const { print(dbgs(), 0); }
154154 #endif
44854485 OS << Buffer << "\n";
44864486 }
44874487
4488 #ifdef LLVM_ENABLE_DUMP
4488 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
44894489 LLVM_DUMP_METHOD void APFloat::dump() const { print(dbgs()); }
44904490 #endif
44914491
21192119 return S.str();
21202120 }
21212121
2122 #ifdef LLVM_ENABLE_DUMP
2122 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
21232123 LLVM_DUMP_METHOD void APInt::dump() const {
21242124 SmallString<40> S, U;
21252125 this->toStringUnsigned(U);
3131 Percent);
3232 }
3333
34 #ifdef LLVM_ENABLE_DUMP
34 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
3535 LLVM_DUMP_METHOD void BranchProbability::dump() const { print(dbgs()) << '\n'; }
3636 #endif
3737
172172 OS << ")";
173173 }
174174
175 #ifdef LLVM_ENABLE_DUMP
175 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
176176 LLVM_DUMP_METHOD void Twine::dump() const {
177177 print(dbgs());
178178 }
4747 StringRecTy StringRecTy::Shared;
4848 DagRecTy DagRecTy::Shared;
4949
50 #ifdef LLVM_ENABLE_DUMP
50 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
5151 LLVM_DUMP_METHOD void RecTy::dump() const { print(errs()); }
5252 #endif
5353
171171
172172 void Init::anchor() {}
173173
174 #ifdef LLVM_ENABLE_DUMP
174 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
175175 LLVM_DUMP_METHOD void Init::dump() const { return print(errs()); }
176176 #endif
177177
15801580 return cast(getNameInit())->getValue();
15811581 }
15821582
1583 #ifdef LLVM_ENABLE_DUMP
1583 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
15841584 LLVM_DUMP_METHOD void RecordVal::dump() const { errs() << *this; }
15851585 #endif
15861586
16591659 }
16601660 }
16611661
1662 #ifdef LLVM_ENABLE_DUMP
1662 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
16631663 LLVM_DUMP_METHOD void Record::dump() const { errs() << *this; }
16641664 #endif
16651665
18531853 FieldName + "' does not have a dag initializer!");
18541854 }
18551855
1856 #ifdef LLVM_ENABLE_DUMP
1856 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
18571857 LLVM_DUMP_METHOD void MultiClass::dump() const {
18581858 errs() << "Record:\n";
18591859 Rec.dump();
5353 void dump() const;
5454 };
5555
56 #ifdef LLVM_ENABLE_DUMP
56 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
5757 LLVM_DUMP_METHOD void SubMultiClassReference::dump() const {
5858 errs() << "Multiclass:\n";
5959
260260 return phiInfoElementGetSources(findPHIInfoElement(DestReg)).size();
261261 }
262262
263 #ifdef LLVM_ENABLE_DUMP
263 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
264264 LLVM_DUMP_METHOD void PHILinearize::dump(MachineRegisterInfo *MRI) {
265265 const TargetRegisterInfo *TRI = MRI->getTargetRegisterInfo();
266266 dbgs() << "=PHIInfo Start=\n";
5151 return SU.getInstr();
5252 }
5353
54 #ifdef LLVM_ENABLE_DUMP
54 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
5555 LLVM_DUMP_METHOD
5656 static void printRegion(raw_ostream &OS,
5757 MachineBasicBlock::iterator Begin,
3030
3131 #define DEBUG_TYPE "machine-scheduler"
3232
33 #ifdef LLVM_ENABLE_DUMP
33 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
3434 LLVM_DUMP_METHOD
3535 void llvm::printLivesAt(SlotIndex SI,
3636 const LiveIntervals &LIS,
174174 (getVGPRNum() < O.getVGPRNum());
175175 }
176176
177 #ifdef LLVM_ENABLE_DUMP
177 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
178178 LLVM_DUMP_METHOD
179179 void GCNRegPressure::print(raw_ostream &OS, const SISubtarget *ST) const {
180180 OS << "VGPRs: " << getVGPRNum();
432432 return advance(End);
433433 }
434434
435 #ifdef LLVM_ENABLE_DUMP
435 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
436436 LLVM_DUMP_METHOD
437437 static void reportMismatch(const GCNRPTracker::LiveRegSet &LISLR,
438438 const GCNRPTracker::LiveRegSet &TrackedLR,
319319 #endif
320320 }
321321
322 #ifdef LLVM_ENABLE_DUMP
322 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
323323 /// print block size and offset information - debugging
324324 LLVM_DUMP_METHOD void ARMConstantIslands::dumpBBs() {
325325 DEBUG({
9696 return false;
9797 }
9898
99 #ifdef LLVM_ENABLE_DUMP
99 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
100100 LLVM_DUMP_METHOD void ARMConstantPoolValue::dump() const {
101101 errs() << " " << *this;
102102 }
130130 INITIALIZE_PASS(HexagonSplitDoubleRegs, "hexagon-split-double",
131131 "Hexagon Split Double Registers", false, false)
132132
133 #ifdef LLVM_ENABLE_DUMP
133 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
134134 LLVM_DUMP_METHOD void HexagonSplitDoubleRegs::dump_partition(raw_ostream &os,
135135 const USet &Part, const TargetRegisterInfo &TRI) {
136136 dbgs() << '{';
6060 return GV != nullptr || CP != nullptr || ES != nullptr || JT != -1;
6161 }
6262
63 #ifdef LLVM_ENABLE_DUMP
63 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
6464 LLVM_DUMP_METHOD void dump() {
6565 errs() << "MSP430ISelAddressMode " << this << '\n';
6666 if (BaseType == RegBase && Base.Reg.getNode() != nullptr) {
424424 U.getMaxDisp(), U.NegOk);
425425 }
426426
427 #ifdef LLVM_ENABLE_DUMP
427 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
428428 /// print block size and offset information - debugging
429429 LLVM_DUMP_METHOD void MipsConstantIslands::dumpBBs() {
430430 for (unsigned J = 0, E = BBInfo.size(); J !=E; ++J) {
952952 return Changed;
953953 }
954954
955 #ifdef LLVM_ENABLE_DUMP
955 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
956956 // For debug purposes, dump the contents of the swap vector.
957957 LLVM_DUMP_METHOD void PPCVSXSwapRemoval::dumpSwapVector() {
958958
168168 // Shuffle live registers to match the expectations of successor blocks.
169169 void finishBlockStack();
170170
171 #ifdef LLVM_ENABLE_DUMP
171 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
172172 void dumpStack() const {
173173 dbgs() << "Stack contents:";
174174 for (unsigned i = 0; i != StackTop; ++i) {
101101 Base_Reg = Reg;
102102 }
103103
104 #ifdef LLVM_ENABLE_DUMP
104 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
105105 void dump() {
106106 dbgs() << "X86ISelAddressMode " << this << '\n';
107107 dbgs() << "Base_Reg ";
132132 };
133133 } // end anonymous namespace
134134
135 #ifdef LLVM_ENABLE_DUMP
135 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
136136 LLVM_DUMP_METHOD void SuspendCrossingInfo::dump(StringRef Label,
137137 BitVector const &BV) const {
138138 dbgs() << Label << ":";
645645 return PA;
646646 }
647647
648 #ifdef LLVM_ENABLE_DUMP
648 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
649649 LLVM_DUMP_METHOD void GVN::dump(DenseMap& d) const {
650650 errs() << "{\n";
651651 for (DenseMap::iterator I = d.begin(),
194194
195195 } // end anonymous namespace
196196
197 #ifdef LLVM_ENABLE_DUMP
197 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
198198 void RegSortData::print(raw_ostream &OS) const {
199199 OS << "[NumUses=" << UsedByIndices.count() << ']';
200200 }
561561 return false;
562562 }
563563
564 #ifdef LLVM_ENABLE_DUMP
564 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
565565 void Formula::print(raw_ostream &OS) const {
566566 bool First = true;
567567 if (BaseGV) {
13561356 return TTI.isLSRCostLess(C, Other.C);
13571357 }
13581358
1359 #ifdef LLVM_ENABLE_DUMP
1359 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
13601360 void Cost::print(raw_ostream &OS) const {
13611361 if (InsnsCost)
13621362 OS << C.Insns << " instruction" << (C.Insns == 1 ? " " : "s ");
14001400 return !L->contains(UserInst);
14011401 }
14021402
1403 #ifdef LLVM_ENABLE_DUMP
1403 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
14041404 void LSRFixup::print(raw_ostream &OS) const {
14051405 OS << "UserInst=";
14061406 // Store is common and interesting enough to be worth special-casing.
15061506 RegUses.dropRegister(S, LUIdx);
15071507 }
15081508
1509 #ifdef LLVM_ENABLE_DUMP
1509 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
15101510 void LSRUse::print(raw_ostream &OS) const {
15111511 OS << "LSR Use: Kind=";
15121512 switch (Kind) {
38793879
38803880 } // end anonymous namespace
38813881
3882 #ifdef LLVM_ENABLE_DUMP
3882 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
38833883 void WorkItem::print(raw_ostream &OS) const {
38843884 OS << "in formulae referencing " << *OrigReg << " in use " << LUIdx
38853885 << " , add offset " << Imm;
53405340 ImplementSolution(Solution);
53415341 }
53425342
5343 #ifdef LLVM_ENABLE_DUMP
5343 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
53445344 void LSRInstance::print_factors_and_types(raw_ostream &OS) const {
53455345 if (Factors.empty() && Types.empty()) return;
53465346
291291 /// need to replace with undef.
292292 ArrayRef getDeadOperands() const { return DeadOperands; }
293293
294 #ifdef LLVM_ENABLE_DUMP
294 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
295295 void print(raw_ostream &OS, const_iterator I, StringRef Indent = " ") const;
296296 void printSlice(raw_ostream &OS, const_iterator I,
297297 StringRef Indent = " ") const;
308308
309309 friend class AllocaSlices::SliceBuilder;
310310
311 #ifdef LLVM_ENABLE_DUMP
311 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
312312 /// \brief Handle to alloca instruction to simplify method interfaces.
313313 AllocaInst &AI;
314314 #endif
10261026
10271027 AllocaSlices::AllocaSlices(const DataLayout &DL, AllocaInst &AI)
10281028 :
1029 #ifdef LLVM_ENABLE_DUMP
1029 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
10301030 AI(AI),
10311031 #endif
10321032 PointerEscapingInstr(nullptr) {
10581058 std::sort(Slices.begin(), Slices.end());
10591059 }
10601060
1061 #ifdef LLVM_ENABLE_DUMP
1061 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
10621062
10631063 void AllocaSlices::print(raw_ostream &OS, const_iterator I,
10641064 StringRef Indent) const {
10971097 }
10981098 LLVM_DUMP_METHOD void AllocaSlices::dump() const { print(dbgs()); }
10991099
1100 #endif // LLVM_ENABLE_DUMP
1100 #endif // !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
11011101
11021102 /// Walk the range of a partitioning looking for a common type to cover this
11031103 /// sequence of slices.
765765
766766 } // end anonymous namespace
767767
768 #ifdef LLVM_ENABLE_DUMP
768 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
769769 LLVM_DUMP_METHOD void MatchableInfo::dump() const {
770770 errs() << TheDef->getName() << " -- " << "flattened:\"" << AsmString <<"\"\n";
771771
12321232 OS << "#ifdef DBGFIELD\n"
12331233 << "#error \"GenSubtargetInfo.inc requires a DBGFIELD macro\"\n"
12341234 << "#endif\n"
1235 << "#ifdef LLVM_ENABLE_DUMP\n"
1235 << "#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)\n"
12361236 << "#define DBGFIELD(x) x,\n"
12371237 << "#else\n"
12381238 << "#define DBGFIELD(x)\n"
1515
1616 using namespace llvm;
1717
18 #ifdef LLVM_ENABLE_DUMP
18 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
1919 LLVM_DUMP_METHOD void SubtargetFeatureInfo::dump() const {
2020 errs() << getEnumName() << " " << Index << "\n" << *TheDef;
2121 }