r193381 - in /branches/google/main/gcc: ChangeL...
harshit@gcc.gnu.org
harshit@gcc.gnu.org
Sat Nov 10 00:08:00 GMT 2012
Author: harshit
Date: Sat Nov 10 00:08:01 2012
New Revision: 193381
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=193381
Log:
Adding function attributes: 'always_patch_for_instrumentation' and
'never_patch_for_instrumentation' to always patch a function or to never
patch a function, respectively, when given the option
-mpatch-functions-for-instrumentation. Additionally, the attribute
always_patch_for_instrumentation disables inlining of that function.
2012-11-09 Harshit Chopra <harshit@google.com>
* gcc/c-family/c-common.c (handle_always_patch_for_instrumentation_attribute):
Handle always_patch_for_instrumentation attribute and turn inlining off for
the function.
(handle_never_patch_for_instrumentation_attribute): Handle
never_patch_for_instrumentation attribute of a function.
* gcc/config/i386/i386.c (has_attribute): Checks the presence of an
attribute.
(check_should_patch_current_function): Takes into account
always_patch_for_instrumentation or never_patch_for_instrumentation attribute
when deciding that a function should be patched.
* gcc/testsuite/gcc.target/i386/patch-functions-force-no-patching.c (int main):
Test case to test for never_patch_for_instrumentation attribute.
* gcc/testsuite/gcc.target/i386/patch-functions-force-patching.c: Test
case to test for always_patch_for_instrumentation attribute.
Added:
branches/google/main/gcc/testsuite/gcc.target/i386/patch-functions-force-no-patching.c
branches/google/main/gcc/testsuite/gcc.target/i386/patch-functions-force-patching.c
Modified:
branches/google/main/gcc/ChangeLog.google-main
branches/google/main/gcc/c-family/c-common.c
branches/google/main/gcc/config/i386/i386.c
More information about the Gcc-cvs
mailing list