[PATCH] D22825: Add a counter-function insertion pass

Honggyu Kim via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 27 18:57:23 PDT 2016


honggyu.kim added inline comments.

================
Comment at: test/Transforms/CountingFunctionInserter/mcount.ll:26
@@ +25,3 @@
+attributes #0 = { "counting-function"="mcount" }
+attributes #1 = { "counting-function"=".mcount" }
+
----------------
Is there a reason that we have to explicitly provide name of "counting-function" attribute? Would it be better to get the name from TargetInfo? I need to find a way to get TargetInfo in FunctionPass first thought.  I think we better not to increase target-dependency in IR level even if it's just attributes because mcount name is kind of target-dependent.


https://reviews.llvm.org/D22825





More information about the llvm-commits mailing list