[PATCH] D19515: [PGO] Prohibit the recording the function address if it's internal and COMDAT.

Rong Xu via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 27 11:31:39 PDT 2016


xur added a comment.

will move the check down in the commit.


================
Comment at: test/Transforms/PGOProfile/comdat_internal.ll:15
@@ +14,3 @@
+; CHECK: @__profc__stdin__foo = private global [1 x i64] zeroinitializer, section "__llvm_prf_cnts", comdat($__profv__stdin__foo), align 8
+; CHECK: @__profd__stdin__foo = private global { i64, i64, i64*, i8*, i8*, i32, [1 x i16] } { i64 -5640069336071256030, i64 12884901887, i64* getelementptr inbounds ([1 x i64], [1 x i64]* @__profc__stdin__foo, i32 0, i32 0), i8* null, i8* null, i32 1, [1 x i16] zeroinitializer }, section "__llvm_prf_data", comdat($__profv__stdin__foo), align 8
+; CHECK: @__llvm_prf_nm = private constant [21 x i8] c"\0B\13x\DA\B3).I\C9\CC\B3\B3J\CB\CF\07\00\18a\04\1B", section "__llvm_prf_names"
----------------
davidxl wrote:
> Do you want to explicitly have a CHECK-NOT here? That way the test is more robust.
we check if the field set to 0 (ie. i8* null), rather a bitcast of foo's address.
I think this is enough. 


http://reviews.llvm.org/D19515





More information about the llvm-commits mailing list