[PATCH] D19855: [PGO] Don't value-instrument llvm.global_ctors and llvm.global_dtors functions
David Li via llvm-commits
llvm-commits at lists.llvm.org
Tue May 3 09:39:25 PDT 2016
davidxl added a comment.
This does not work well for O0 compilation. __cxx_global_var_init also needs to be skipped, but it is not directly referenced by llvm.global_ctors. Probably just skip functions in startup section.
@llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @_GLOBAL__sub_I_t.cc, i8* null }]
Function Attrs: uwtable
define internal void @__cxx_global_var_init() #0 section ".text.startup" {
call void @_ZN1AC1Ev(%struct.A* @a)
ret void
}
; Function Attrs: uwtable
define internal void @_GLOBAL__sub_I_t.cc() #0 section ".text.startup" {
call void @__cxx_global_var_init()
ret void
}
http://reviews.llvm.org/D19855
More information about the llvm-commits
mailing list