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

David Li via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 27 11:38:15 PDT 2016


davidxl added inline comments.

================
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"
----------------
xur wrote:
> 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. 
That is not good enough in a sense that other people may not know the intention of this 0 value and update the case with non zero value when this is broken. 


http://reviews.llvm.org/D19515





More information about the llvm-commits mailing list