[PATCH] D23734: Add -fprofile-dir= to clang.

Nick Lewycky via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 30 16:18:28 PDT 2016

nlewycky added inline comments.

Comment at: lib/Transforms/Instrumentation/GCOVProfiling.cpp:447
@@ -432,3 +446,3 @@
         return Filename.str();
compnerd wrote:
> It really feels like these two cases can be collapsed.
I don't see a great way to do that, so I picked the one which minimizes the cost of the common case. Having an !llvm.gcov node but no CU for the specific .o is uncommon: to get here you're building a program with some .bc's built with a frontend that emits an !llvm.gcov and some .bc's without, and then you llvm-linked them and are running the insert-gcov-profiling pass afterwards. Also, I assume that copying SmallString<128>'s around is slow, while looking up Value*'s is faster.

If you have a specific idea, I'm happy to try it. I'm not thrilled with the way it's written now.

Comment at: test/Transforms/GCOVProfiling/three-element-mdnode.ll:27
@@ +26,2 @@
+!10 = !{i32 1, !"Debug Info Version", i32 3}
The way this test was written, !10 would be parsed before !9. Swizzled it around to make !9 the !llvm.module.flags and !10 the !llvm.gcov node.


More information about the llvm-commits mailing list