I forgot to add emission of CG profile for COFF object file, when adding the support(https://reviews.llvm.org/D81775)
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/Target/TargetLoweringObjectFile.cpp | ||
---|---|---|
164 ↗ | (On Diff #292846) | I had to revert this change in rG90242caca2074dab5a9b76e5bc36d9fafd2179a7. I think the fix might be to return null if the call graph edge target is marked dllimport here. |
llvm/lib/Target/TargetLoweringObjectFile.cpp | ||
---|---|---|
164 ↗ | (On Diff #292846) | I was thinking about a discussion in https://reviews.llvm.org/D81775?id=270540#inline-751699, which might be the cause. I was trying to do the same as ELF. Not sure if that's the cause. |
lgtm
llvm/lib/Target/TargetLoweringObjectFile.cpp | ||
---|---|---|
165 ↗ | (On Diff #293899) | Thanks! You can see the diff here if you are curious: |
For symbols haven't seen, just set them to external not weak external.
Previously I did it that way, because http://llvm.org/docs/Extensions.html#sht-llvm-call-graph-profile-section-call-graph-profile says
If either symbol is undefined, then that symbol is defined as if .weak symbol has been written at the end of the file.
llvm/lib/MC/MCWinCOFFStreamer.cpp | ||
---|---|---|
344 ↗ | (On Diff #294817) | It's meaningless to set symbol to WeakExternal and External at same time here. At the end, the symbol just become WeakExternal. |
Can you remove the weak external marking in a separate change from relanding? It changes existing functionality of the .cg_profile directive, so it can be committed independently, which is nice for making changes as small and independent as possible.
Can we have a separate NFC refactor commit, to move that lump of code into its own emitCGProfile method? It might make the functional bits easier to follow. Also we have a private change in that area, and the ping-pong for this change has been a real headache.
Will put the refactor part to a separate NFC commit.
Reland this as fix at D88456 seems work. (https://bugs.chromium.org/p/chromium/issues/detail?id=1130780#c18)
clang-tidy: warning: 'auto V' can be declared as 'auto *V' [llvm-qualified-auto]
not useful