[all-commits] [llvm/llvm-project] 614de2: [gcov] Set nounwind and respect module flags metad...
Fangrui Song via All-commits
all-commits at lists.llvm.org
Mon Apr 26 13:30:44 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 614de225c92bc3998a83a274e84dfb94ec8a7840
https://github.com/llvm/llvm-project/commit/614de225c92bc3998a83a274e84dfb94ec8a7840
Author: Fangrui Song <i at maskray.me>
Date: 2021-04-26 (Mon, 26 Apr 2021)
Changed paths:
M llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp
M llvm/test/Transforms/GCOVProfiling/function-numbering.ll
A llvm/test/Transforms/GCOVProfiling/module-flags.ll
Log Message:
-----------
[gcov] Set nounwind and respect module flags metadata "frame-pointer" & "uwtable" for synthesized functions
This applies the 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 -fprofile-arcs` will
produce .debug_frame instead of .eh_frame.
Fix: https://github.com/ClangBuiltLinux/linux/issues/955
Reviewed By: nickdesaulniers
Differential Revision: https://reviews.llvm.org/D101129
More information about the All-commits
mailing list