aboutsummaryrefslogtreecommitdiff
path: root/gcc/params.def
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 /gcc/params.def
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 'gcc/params.def')
-rw-r--r--gcc/params.def4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/params.def b/gcc/params.def
index a3906c2..df3a06b 100644
--- a/gcc/params.def
+++ b/gcc/params.def
@@ -446,6 +446,10 @@ DEFPARAM(BUILTIN_EXPECT_PROBABILITY,
"builtin-expect-probability",
"Set the estimated probability in percentage for builtin expect. The default value is 90% probability.",
90, 0, 100)
+DEFPARAM(BUILTIN_STRING_CMP_INLINE_LENGTH,
+ "builtin-string-cmp-inline-length",
+ "The maximum length of a constant string for a builtin string cmp call eligible for inlining. The default value is 3.",
+ 3, 0, 100)
DEFPARAM(TRACER_DYNAMIC_COVERAGE_FEEDBACK,
"tracer-dynamic-coverage-feedback",
"The percentage of function, weighted by execution frequency, that must be covered by trace formation. Used when profile feedback is available.",