aboutsummaryrefslogtreecommitdiff
path: root/libgo
diff options
context:
space:
mode:
authorQing Zhao <qing.zhao@oracle.com>2018-07-13 14:10:45 +0000
committerQing Zhao <qinzhao@gcc.gnu.org>2018-07-13 14:10:45 +0000
commitb2272b138c1e7f6a1cb867d614951d516f88a9f1 (patch)
treec0ff90bac1be9a15892993c77b7e1b8b791f2416 /libgo
parentb02160e5ac1dc57bbecd3387b61fcad8c7a57672 (diff)
downloadgcc-b2272b138c1e7f6a1cb867d614951d516f88a9f1.zip
gcc-b2272b138c1e7f6a1cb867d614951d516f88a9f1.tar.gz
gcc-b2272b138c1e7f6a1cb867d614951d516f88a9f1.tar.bz2
3nd Patch for PR78009
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78809 Inline strcmp with small constant strings The design doc for PR78809 is at: https://www.mail-archive.com/gcc@gcc.gnu.org/msg83822.html this patch is for the third part of change of PR78809. C. for strcmp (s1, s2), strncmp (s1, s2, n), and memcmp (s1, s2, n) if the result is NOT used to do simple equality test against zero, one of "s1" or "s2" is a small constant string, n is a constant, and the Min value of the length of the constant string and "n" is smaller than a predefined threshold T, inline the call by a byte-to-byte comparision sequence to avoid calling overhead. adding test case strcmpopt_5.c into gcc.dg for part C of PR78809. adding test case strcmpopt_6.c into gcc.dg to test the following case: When the specified length exceeds one of the arguments of the call to memcmp, the call to memcmp should NOT be inlined. From-SVN: r262636
Diffstat (limited to 'libgo')
0 files changed, 0 insertions, 0 deletions