diff options
author | Arthur Eubanks <aeubanks@google.com> | 2021-10-18 13:49:53 -0700 |
---|---|---|
committer | Arthur Eubanks <aeubanks@google.com> | 2021-10-18 13:56:48 -0700 |
commit | ecd25edfc5d908a1010fdf81419d779e8347de79 (patch) | |
tree | fc01d2990ab0a7e3ef66b997c54391438433de3f /llvm/lib/Analysis/InlineCost.cpp | |
parent | 9d1db3d4a1970ebb88803fdd862ce1d633b46bdc (diff) | |
download | llvm-ecd25edfc5d908a1010fdf81419d779e8347de79.zip llvm-ecd25edfc5d908a1010fdf81419d779e8347de79.tar.gz llvm-ecd25edfc5d908a1010fdf81419d779e8347de79.tar.bz2 |
[InlineCost] Add empty line between call sites when printing inline costs
Diffstat (limited to 'llvm/lib/Analysis/InlineCost.cpp')
-rw-r--r-- | llvm/lib/Analysis/InlineCost.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/llvm/lib/Analysis/InlineCost.cpp b/llvm/lib/Analysis/InlineCost.cpp index 4b5c1bf..a77dd32 100644 --- a/llvm/lib/Analysis/InlineCost.cpp +++ b/llvm/lib/Analysis/InlineCost.cpp @@ -1013,7 +1013,7 @@ public: // Prints the same analysis as dump(), but its definition is not dependent // on the build. - void print(); + void print(raw_ostream &OS); Optional<InstructionCostDetail> getCostDetails(const Instruction *I) { if (InstructionCostDetailMap.find(I) != InstructionCostDetailMap.end()) @@ -2711,10 +2711,10 @@ InlineResult CallAnalyzer::analyze() { return finalizeAnalysis(); } -void InlineCostCallAnalyzer::print() { -#define DEBUG_PRINT_STAT(x) dbgs() << " " #x ": " << x << "\n" +void InlineCostCallAnalyzer::print(raw_ostream &OS) { +#define DEBUG_PRINT_STAT(x) OS << " " #x ": " << x << "\n" if (PrintInstructionComments) - F.print(dbgs(), &Writer); + F.print(OS, &Writer); DEBUG_PRINT_STAT(NumConstantArgs); DEBUG_PRINT_STAT(NumConstantOffsetPtrArgs); DEBUG_PRINT_STAT(NumAllocaArgs); @@ -2733,7 +2733,7 @@ void InlineCostCallAnalyzer::print() { #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) /// Dump stats about this call's analysis. -LLVM_DUMP_METHOD void InlineCostCallAnalyzer::dump() { print(); } +LLVM_DUMP_METHOD void InlineCostCallAnalyzer::dump() { print(dbgs()); } #endif /// Test that there are no attribute conflicts between Caller and Callee @@ -3127,7 +3127,8 @@ InlineCostAnnotationPrinterPass::run(Function &F, ICCA.analyze(); OS << " Analyzing call of " << CalledFunction->getName() << "... (caller:" << CI->getCaller()->getName() << ")\n"; - ICCA.print(); + ICCA.print(OS); + OS << "\n"; } } } |