Hi all,

This patch adds __artificial__ attribute to the intrinsics
in arm_neon.h so that costs are associated to the user
function during profiling and during the intrinsics are
are hidden in trace.

The attribute does not affect code generation.

No new tests for this since it would require a gdb test
but regression tests on aarch64-none-elf was performed.

The attribute was added with the following bash script:

#!/bin/bash

# first apply to the ones in #define blocks and add extra \ at the end
sed -i -r 's/(__inline.+)(__attribute__\s*)\(\((.+)\)\)\s*\\/\1\\\n\2 \(\(\3, 
__artificial__\)\) \\/m' \
 gcc/config/aarch64/arm_neon.h

# Then write all normal functions
sed -i -r 's/(__inline.+)(__attribute__\s*)\(\((.+)\)\)/\1\n\2 \(\(\3, 
__artificial__\)\)/m' \
 gcc/config/aarch64/arm_neon.h

# Then correct any trailing whitespaces we might have introduced
sed -i 's/[ \t]*$//' \
 gcc/config/aarch64/arm_neon.h

# And then finish up by correcting some attribute values which don't fit the 
patterns above.
sed -i -r 's/(__attribute__\s+)\(\((__always_inline__)\)\)\s+\\/\1\(\(\2, 
__artificial__\)\) \\/m' \
 gcc/config/aarch64/arm_neon.h

It would be easier I think to review/run the script than the changes.
But just for completeness I have attached the G-zipped patch file.

Ok for trunk?

PS. I don't have commit rights, so if OK can someone apply it for me?

Thanks,
Tamar

gcc/
2016-08-19  Tamar Christina  <tamar.christ...@arm.com>

        * config/aarch64/arm_neon.h: Add __artificial__ attribute
          to all inlined functions

Attachment: attr.gzip
Description: attr.gzip

Reply via email to