diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-06-26 18:50:24 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-06-26 18:50:24 +0000 |
commit | 92bfaaee65daa7dbfe38d8a68a2c319cca22796a (patch) | |
tree | 6629c6fbf16d67b6b1ae6de297c37f51a25cd8d9 /gcc/doc/invoke.texi | |
parent | e25b9d5584e89fb7b929b2afe52ba6675d8e7cb0 (diff) | |
download | gcc-92bfaaee65daa7dbfe38d8a68a2c319cca22796a.tar.gz |
* doc/invoke.texi (-fsemantic-interposition): Document.
* common.opt (fsemantic-interposition): New flag.
* varasm.c (decl_replaceable_p): Use it.
* gcc.dg/tree-ssa/interposition.c: New testcase.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@212049 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/doc/invoke.texi')
-rw-r--r-- | gcc/doc/invoke.texi | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index bb557a2207e..4df5f8113b5 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -411,6 +411,7 @@ Objective-C and Objective-C++ Dialects}. -fschedule-insns -fschedule-insns2 -fsection-anchors @gol -fselective-scheduling -fselective-scheduling2 @gol -fsel-sched-pipelining -fsel-sched-pipelining-outer-loops @gol +-fsemantic-interposition @gol -fshrink-wrap -fsignaling-nans -fsingle-precision-constant @gol -fsplit-ivs-in-unroller -fsplit-wide-types -fssa-phiopt -fstack-protector @gol -fstack-protector-all -fstack-protector-strong -fstrict-aliasing @gol @@ -7738,6 +7739,22 @@ This option has no effect unless one of @option{-fselective-scheduling} or When pipelining loops during selective scheduling, also pipeline outer loops. This option has no effect unless @option{-fsel-sched-pipelining} is turned on. +@item -fsemantic-interposition +@opindex fsemantic-interposition +Some object formats, like ELF, allow interposing of symbols by dynamic linker. +This means that for symbols exported from the DSO compiler can not perform +inter-procedural propagation, inlining and other optimizations in anticipation +that the function or variable in question may change. While this feature is +useful, for example, to rewrite memory allocation functions by a debugging +implementation, it is expensive in the terms of code quality. +With @option{-fno-semantic-inteposition} compiler assumest that if interposition +happens for functions the overwritting function will have +precisely same semantics (and side effects). Similarly if interposition happens +for variables, the constructor of the variable will be the same. The flag +has no effect for functions explicitly declared inline, where +interposition changing semantic is never allowed and for symbols explicitly +declared weak. + @item -fshrink-wrap @opindex fshrink-wrap Emit function prologues only before parts of the function that need it, |