aboutsummaryrefslogtreecommitdiff
path: root/gcc/c/c-parser.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2021-09-15 14:17:08 +0800
committerliuhongt <hongtao.liu@intel.com>2021-09-17 16:17:00 +0800
commitc3a2437fec1963d9150b7cf6bd03c1d8d184a301 (patch)
tree2d03ffaa6a282a4d2839930a3c1762ff2e7bd527 /gcc/c/c-parser.c
parent61b03ade93b0f47dd888cd5228f017979c494263 (diff)
downloadgcc-c3a2437fec1963d9150b7cf6bd03c1d8d184a301.zip
gcc-c3a2437fec1963d9150b7cf6bd03c1d8d184a301.tar.gz
gcc-c3a2437fec1963d9150b7cf6bd03c1d8d184a301.tar.bz2
x86: Update memcpy/memset inline strategies for -mtune=tremont
Simply memcpy and memset inline strategies to avoid branches for -mtune=tremont: 1. Create Tremont cost model from generic cost model. 2. With MOVE_RATIO and CLEAR_RATIO == 17, GCC will use integer/vector load and store for up to 16 * 16 (256) bytes when the data size is fixed and known. 3. Inline only if data size is known to be <= 256. a. Use "rep movsb/stosb" with simple code sequence if the data size is a constant. b. Use loop if data size is not a constant. 4. Use memcpy/memset libray function if data size is unknown or > 256. * config/i386/i386-options.c (processor_cost_table): Use tremont_cost for Tremont. * config/i386/x86-tune-costs.h (tremont_memcpy): New. (tremont_memset): Likewise. (tremont_cost): Likewise. * config/i386/x86-tune.def (X86_TUNE_PREFER_KNOWN_REP_MOVSB_STOSB): Enable for Tremont.
Diffstat (limited to 'gcc/c/c-parser.c')
0 files changed, 0 insertions, 0 deletions