Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
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 | ||
259 | We can reduce duplication in the output string here: if (UseDebugLoc) OF->os() << "Source," OF->os() << "Function,InstructionCount\n"; | |
278 | 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 << ...; | |
312 | Same here | |
324 | I think we can factor this out into a "shouldSkipRemark" and share it between the instruction count + annotation remark modes. | |
335 | Same as other feedback for string output |
add newline