diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2021-09-15 14:17:08 +0800 |
---|---|---|
committer | liuhongt <hongtao.liu@intel.com> | 2021-09-17 16:17:00 +0800 |
commit | c3a2437fec1963d9150b7cf6bd03c1d8d184a301 (patch) | |
tree | 2d03ffaa6a282a4d2839930a3c1762ff2e7bd527 /gcc/c/c-parser.c | |
parent | 61b03ade93b0f47dd888cd5228f017979c494263 (diff) | |
download | gcc-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