[PATCH] D101129: [gcov] Set nounwind and respect module flags metadata "frame-pointer" & "uwtable" for synthesized functions
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 22 20:35:55 PDT 2021
MaskRay created this revision.
MaskRay added reviewers: calixte, nickdesaulniers, sylvestre.ledru.
Herald added a subscriber: hiraditya.
MaskRay requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
This applies the D100251 <https://reviews.llvm.org/D100251> mechanism to the gcov instrumentation pass.
With this patch, `-fno-omit-frame-pointer` in
`clang -fprofile-arcs -O1 -fno-omit-frame-pointer` will be respected for synthesized
`__llvm_gcov_writeout,__llvm_gcov_reset,__llvm_gcov_init` functions: the frame pointer
will be kept (note: on many targets -O1 eliminates the frame pointer by default).
`clang -fno-exceptions -fno-asynchronous-unwind-tables -g -fsanitize=address` will
produce .debug_frame instead of .eh_frame.
Fix: https://github.com/ClangBuiltLinux/linux/issues/955
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D101129
Files:
llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp
llvm/test/Transforms/GCOVProfiling/function-numbering.ll
llvm/test/Transforms/GCOVProfiling/module-flags.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D101129.339858.patch
Type: text/x-patch
Size: 5444 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210423/e5eb70dc/attachment.bin>
More information about the llvm-commits
mailing list