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. https://reviews.llvm.org/D23734 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits