[PATCH] D44965: [llvm][Instrumentation/MC] Add Call Graph Profile pass and object file emission.
Michael Spencer via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 29 15:31:02 PDT 2018
Bigcheese added a comment.
In writing the documentation I ran into an issue defining the precise semantics of `.cg_profile` when it includes a symbol which has not previously been referenced. In an updated patch I'm treating it as if `.weak <symbol>` was written if <symbol> has not yet been used. This leads to the following behavior:
.section .test,"aw", at progbits
a: .word b
.cg_profile a, b, 32
.cg_profile freq, a, 11
.cg_profile late, late2, 20
.cg_profile .L.local, b, 42
.globl late
late:
late2:
late3:
.L.local:
a: local
late3: local
b: global
freq: weak
late: global
late2: weak
.L.local: not in symbol table
Note that `a` and `late2` disagree about what binding they have based on if they came before or after `.cg_profile`. Also `.L.local` generates a null symbol index because it doesn't get put in the symbol table.
https://reviews.llvm.org/D44965
More information about the llvm-commits
mailing list