Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Event Timeline
If you want to generate the count for functions there is the possibility that the function name is not unique so you will end up with different counts for the same function. While the DebugLoc is not unique but it is better than just using the function name as an identifier.
llvm/test/tools/llvm-remarkutil/annotation-count-with-dbg-loc.test | ||
---|---|---|
8 | add newline | |
llvm/tools/llvm-remarkutil/RemarkUtil.cpp | ||
265 | We can reduce duplication in the output string here: if (UseDebugLoc) OF->os() << "Source," OF->os() << "Function,InstructionCount\n"; | |
287 | Similar to the case above, we can just emit the debug location here, and then eliminate the else. // Emit debug location if the user wants it. if (UseDebugLoc) { std::string Loc = ...; OF->os() << Loc << ","; } // Always emit function name and instruction count. OF->os() << Remark.FunctionName << ...; | |
316 | Same here | |
325 | I think we can factor this out into a "shouldSkipRemark" and share it between the instruction count + annotation remark modes. | |
342 | Same as other feedback for string output |
add newline