[PATCH] Disable frame pointer elimination when -pg is used
tomasz.miasko at gmail.com
Sat Nov 22 07:49:25 PST 2014
This patch disables frame pointer elimination and leaf frame pointer elimination when mcount instrumentation is requested ("-pg").
Currently we catch the case when -fomit-frame-pointer and -pg are explicitly used together, but we miss:
* Explicit use of -momit-leaf-frame-pointer.
* Defaults enabling mentioned optimizations on given optimization level or triple.
This also emits unused argument warnings when -fno-omit-frame-pointer or -mno-omit-leaf-frame-pointer are combined with -pg. It can be changed very simply, but I am not sure if this is desirable or not?
clang -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -pg
clang: warning: argument unused during compilation: '-fno-omit-frame-pointer'
clang: warning: argument unused during compilation: '-mno-omit-leaf-frame-pointer'
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 2759 bytes
Desc: not available
More information about the cfe-commits